[PATCH] Allow GIT_DIR to be an absolute path
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 6, 2005, 23:36 UTC
- Message-ID
- <Pine.LNX.4.63.0511070034160.23992@wbgn013.biozentrum.uni-wuerzburg.de>
This fixes a problem in safe_create_leading_directories() when the argument starts with a '/' (i.e. the path is absolute).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
I did not thoroughly check if there are more places where a relative path is assumed. Could well be the only one.
sha1_file.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
applies-to: 8a2743d0d424a3bc0ff120cdba66ee20b59f5a56 e1f7e03e178889c53367745810130ef3e933d2aa
diff --git a/sha1_file.c b/sha1_file.c index 642f00d..544db4e 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -50,7 +50,7 @@ int get_sha1_hex(const char *hex, unsign int safe_create_leading_directories(char *path) { - char *pos = path; + char *pos = path+1; while (pos) { pos = strchr(pos, '/'); --- 0.99.9.GIT