* [PATCH 1/2] chdir after computing new cwd in check_repository_format_gently
@ 2008-05-14 5:45 David Reiss
2008-05-14 8:02 ` Johannes Schindelin
0 siblings, 1 reply; 2+ messages in thread
From: David Reiss @ 2008-05-14 5:45 UTC (permalink / raw)
To: git
In preparation for adding a check before the chdir.
This should be a no-op because the cwd is not read in the interim
and any nonlocal exits either chdir to an absolute path or die.
Signed-off-by: David Reiss <dreiss@facebook.com>
---
I sent this in a few weeks ago, but got no response. Probably because I
messed up the formatting. Hopefully I'm getting it right this time.
setup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.c b/setup.c
index b8fd476..c54f2b6 100644
--- a/setup.c
+++ b/setup.c
@@ -443,7 +443,6 @@ const char *setup_git_directory_gently(int *nongit_ok)
check_repository_format_gently(nongit_ok);
return NULL;
}
- chdir("..");
do {
if (!offset) {
if (nongit_ok) {
@@ -455,6 +454,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
die("Not a git repository");
}
} while (cwd[--offset] != '/');
+ chdir("..");
}
inside_git_dir = 0;
--
1.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] chdir after computing new cwd in check_repository_format_gently
2008-05-14 5:45 [PATCH 1/2] chdir after computing new cwd in check_repository_format_gently David Reiss
@ 2008-05-14 8:02 ` Johannes Schindelin
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2008-05-14 8:02 UTC (permalink / raw)
To: David Reiss; +Cc: git
Hi,
On Tue, 13 May 2008, David Reiss wrote:
> In preparation for adding a check before the chdir. This should be a
> no-op because the cwd is not read in the interim and any nonlocal exits
> either chdir to an absolute path or die.
I think it would be clearer if you squashed that commit into the other
one.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-14 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-14 5:45 [PATCH 1/2] chdir after computing new cwd in check_repository_format_gently David Reiss
2008-05-14 8:02 ` Johannes Schindelin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.