On Wed, Jun 4, 2014 at 3:55 AM, Pasha Bolokhov wrote:
>> The case when $GIT_DIR points to a _file_ seems uncovered.
>> setup_git_directory() will transform the file to the directory
>> internally and we never know the .git file's path (so we can't exclude
>> it). So people could accidentally add t
On Thu, May 29, 2014 at 4:42 AM, Duy Nguyen wrote:
+ const char *worktree = get_git_work_tree();
+
+ if (worktree == NULL ||
+ dir_inside_of(n_git, get_git_work_tree()) >= 0) {
+ struct exclude_list *el =
On Thu, May 29, 2014 at 5:11 AM, Pasha Bolokhov
wrote:
>>> + len = strlen(n_git); /* real_path() has stripped trailing slash */
>>> + for (i = len - 1; i > 0 && !is_dir_sep(n_git[i]); i--) ;
>>> + basename = n_git + i;
>>> + if (is_dir_sep(*basename))
>>> + ba
On Wed, May 28, 2014 at 5:36 AM, Duy Nguyen wrote:
> On Tue, May 27, 2014 at 10:56 AM, Pasha Bolokhov
> wrote:
>> @@ -1588,6 +1588,38 @@ void setup_standard_excludes(struct dir_struct *dir)
>> {
>> const char *path;
>> char *xdg_path;
>> + const char *r_git, *gitdir = get_g
On Tue, May 27, 2014 at 10:56 AM, Pasha Bolokhov
wrote:
> @@ -1588,6 +1588,38 @@ void setup_standard_excludes(struct dir_struct *dir)
> {
> const char *path;
> char *xdg_path;
> + const char *r_git, *gitdir = get_git_dir();
> + char *n_git, *basename;
> + int len
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 setup_standard_exclud
6 matches
Mail list logo