author | Junio C Hamano <gitster@pobox.com> | |
Mon, 2 May 2011 22:58:30 +0000 (15:58 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 2 May 2011 22:58:30 +0000 (15:58 -0700) |
* nd/maint-setup:
Kill off get_relative_cwd()
setup: return correct prefix if worktree is '/'
Conflicts:
dir.c
setup.c
Kill off get_relative_cwd()
setup: return correct prefix if worktree is '/'
Conflicts:
dir.c
setup.c
1 | 2 | |||
---|---|---|---|---|
dir.c | patch | | diff1 | | diff2 | | blob | history |
dir.h | patch | | diff1 | | diff2 | | blob | history |
setup.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc dir.c
Simple merge
diff --cc dir.h
Simple merge
diff --cc setup.c
index 03cd84f2fcbf9cdbc25116308a9c2c9407af8e71,f0468c6864195e0ff9532f9ec5251d5288b38397..b6e6b5ae272b3ecae7dfa2cb446aef97e826884a
+++ b/setup.c
return NULL;
}
- if (!prefixcmp(cwd, worktree) &&
- cwd[strlen(worktree)] == '/') { /* cwd inside worktree */
+ offset = dir_inside_of(cwd, worktree);
+ if (offset >= 0) { /* cwd inside worktree? */
- set_git_dir(make_absolute_path(gitdirenv));
+ set_git_dir(real_path(gitdirenv));
if (chdir(worktree))
die_errno("Could not chdir to '%s'", worktree);
cwd[len++] = '/';