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

2013-03-24 Thread Eric Sunshine
On Sun, Mar 24, 2013 at 1:06 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 8edcdca..45a2b53 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -180,6 +180,13 @@ branch by

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

2013-03-24 Thread Jonathan Nieder
Hi, Nguyễn Thái Ngọc Duy wrote: --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -180,6 +180,13 @@ branch by running git rm -rf . from the top level of the working tree. Afterwards you will be ready to prepare your new files, repopulating the working tree, by

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

2013-03-24 Thread Kirill Müller
Hi On 03/24/2013 07:17 PM, Jonathan Nieder wrote: Hi, Nguyễn Thái Ngọc Duy wrote: --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -180,6 +180,13 @@ branch by running git rm -rf . from the top level of the working tree. Afterwards you will be ready to prepare

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

2013-03-24 Thread Duy Nguyen
On Mon, Mar 25, 2013 at 1:17 AM, Jonathan Nieder jrnie...@gmail.com wrote: +--sparse:: + In sparse checkout mode, `git checkout -- paths` would + update all entries matched by paths regardless sparse + patterns. This option only updates entries matched by paths + and sparse

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

2013-03-24 Thread Jonathan Nieder
Duy Nguyen wrote: On Mon, Mar 25, 2013 at 1:17 AM, Jonathan Nieder jrnie...@gmail.com wrote: Hm, should this be the default? In principle, I would expect git checkout -- . to make the worktree match the index, respecting the sparse checkout. And something like git

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

2013-03-23 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 --sparse option to do what normal mode does: restore all modified files