Re: [PATCH v2] checkout: add --no-widen for restoring files in sparse checkout mode

2013-04-01 Thread Jonathan Nieder
Duy Nguyen wrote: On Mon, Apr 1, 2013 at 11:48 AM, Jonathan Nieder jrnie...@gmail.com wrote: I'm afraid I can't imagine when --no-respect-skip-worktree would be useful. That can easily be a failure of my imagination, though. There may be scripts that expect git checkout -- foo to reset

Re: [PATCH v2] checkout: add --no-widen for restoring files in sparse checkout mode

2013-03-31 Thread Jonathan Nieder
Hi, Nguyễn Thái Ngọc Duy wrote: git checkout -- paths is usually used to restore all modified files in paths. In sparse checkout mode, this command is overloaded with another meaning: to add back all files in paths that are excluded by sparse patterns. Add --no-widen option to do what

Re: [PATCH v2] checkout: add --no-widen for restoring files in sparse checkout mode

2013-03-31 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Nguyễn Thái Ngọc Duy wrote: git checkout -- paths is usually used to restore all modified files in paths. In sparse checkout mode, this command is overloaded with another meaning: to add back all files in paths that are excluded by sparse patterns.

Re: [PATCH v2] checkout: add --no-widen for restoring files in sparse checkout mode

2013-03-31 Thread Duy Nguyen
On Mon, Apr 1, 2013 at 11:48 AM, Jonathan Nieder jrnie...@gmail.com wrote: Hi, Nguyễn Thái Ngọc Duy wrote: git checkout -- paths is usually used to restore all modified files in paths. In sparse checkout mode, this command is overloaded with another meaning: to add back all files in paths

[PATCH v2] checkout: add --no-widen for restoring files in sparse checkout mode

2013-03-30 Thread Nguyễn Thái Ngọc Duy
git checkout -- paths is usually used to restore all modified files in paths. In sparse checkout mode, this command is overloaded with another meaning: to add back all files in paths that are excluded by sparse patterns. Add --no-widen option to do what normal mode does: restore all modified