diff options
author | Jeff King <peff@peff.net> | 2007-12-03 00:30:01 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-02 23:35:46 -0800 |
commit | 69e7491835a0aa4e1a793a7c131783d8bb1cbb2b (patch) | |
tree | cfa2dbbec33eb2cfb6a2c0778e17d7b7089bcba4 /t | |
parent | Make git status usage say git status instead of git commit (diff) | |
download | tgif-69e7491835a0aa4e1a793a7c131783d8bb1cbb2b.tar.xz |
quote_path: fix collapsing of relative paths
The code tries to collapse identical leading components
between the prefix and the path. So if we're in "dir1", the
path "dir1/file" should become just "file". However, we were
ending up with "../dir1/file". The included test expected
the wrong output.
The "len" parameter to quote_path can be negative to mean
"this is a NUL terminated string". Simply count it so that
the loop can rely on it being the length of the path.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7502-status.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7502-status.sh b/t/t7502-status.sh index 269b3341a2..d6ae69d46e 100755 --- a/t/t7502-status.sh +++ b/t/t7502-status.sh @@ -68,7 +68,7 @@ cat > expect << \EOF # Changed but not updated: # (use "git add <file>..." to update what will be committed) # -# modified: ../dir1/modified +# modified: modified # # Untracked files: # (use "git add <file>..." to include in what will be committed) |