Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Document git-ls-tree --fullname
[gitweb.git]
/
builtin-tar-tree.c
diff --git
a/builtin-tar-tree.c
b/builtin-tar-tree.c
index 5f740cf7025bc2a9b46656332c6a54e78ee737e4..7663b9bd8e5f10ee45e34752f631d435687cf1b3 100644
(file)
--- a/
builtin-tar-tree.c
+++ b/
builtin-tar-tree.c
@@
-168,8
+168,9
@@
static int get_path_prefix(const struct strbuf *path, int maxlen)
int i = path->len;
if (i > maxlen)
i = maxlen;
- while (i > 0 && path->buf[i] != '/')
+ do {
i--;
+ } while (i > 0 && path->buf[i] != '/');
return i;
}