Re: [PATCH v5] Add an explicit GIT_DIR to the list of excludes

2014-06-11 Thread Duy Nguyen
On Tue, Jun 10, 2014 at 10:18 AM, Pasha Bolokhov pasha.bolok...@gmail.com wrote: On Thu, Jun 5, 2014 at 3:15 AM, Pasha Bolokhov pasha.bolok...@gmail.com wrote: + /* only add it if GIT_DIR does not end with '.git' or '/.git' */ + if (len 4 || strcmp(n_git + len - 4, .git) || +

Re: [PATCH v5] Add an explicit GIT_DIR to the list of excludes

2014-06-09 Thread Pasha Bolokhov
On Thu, Jun 5, 2014 at 3:15 AM, Pasha Bolokhov pasha.bolok...@gmail.com wrote: + /* only add it if GIT_DIR does not end with '.git' or '/.git' */ + if (len 4 || strcmp(n_git + len - 4, .git) || + (len 4 n_git[len - 5] != '/')) { Hmm.. should we exclude foobar.git

Re: [PATCH v5] Add an explicit GIT_DIR to the list of excludes

2014-06-08 Thread Duy Nguyen
On Thu, Jun 5, 2014 at 3:15 AM, Pasha Bolokhov pasha.bolok...@gmail.com wrote: + /* only add it if GIT_DIR does not end with '.git' or '/.git' */ + if (len 4 || strcmp(n_git + len - 4, .git) || + (len 4 n_git[len - 5] != '/')) { Hmm.. should we exclude foobar.git as

[PATCH v5] Add an explicit GIT_DIR to the list of excludes

2014-06-04 Thread Pasha Bolokhov
When an explicit '--git-dir' option points to a directory inside the work tree, git treats it as if it were any other directory. In particular, 'git status' lists it as untracked, while 'git add -A' stages the metadata directory entirely Add GIT_DIR to the list of excludes in a dedicated function