diff options
| author | Steffen Prohaska <prohaska@zib.de> | 2007-11-25 23:29:03 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2007-11-26 12:32:05 -0800 |
| commit | ecf4831d89ba6986249e1bf232b2e2f5f7536223 (patch) | |
| tree | ffb6be8a679cd9bb2b9edfd2699966a15284da63 /diff-lib.c | |
| parent | Fix typo in draft 1.5.4 release notes (diff) | |
| download | git-ecf4831d89ba6986249e1bf232b2e2f5f7536223.tar.gz git-ecf4831d89ba6986249e1bf232b2e2f5f7536223.zip | |
Use is_absolute_path() in diff-lib.c, lockfile.c, setup.c, trace.c
Using the helper function to test for absolute paths makes porting easier.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
| -rw-r--r-- | diff-lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-lib.c b/diff-lib.c index f8e936ae10..d85d8f34ba 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -231,7 +231,7 @@ static int handle_diff_files_args(struct rev_info *revs, static int is_outside_repo(const char *path, int nongit, const char *prefix) { int i; - if (nongit || !strcmp(path, "-") || path[0] == '/') + if (nongit || !strcmp(path, "-") || is_absolute_path(path)) return 1; if (prefixcmp(path, "../")) return 0; |
