diff options
author | Jonas Fonseca <fonseca@diku.dk> | 2006-08-25 04:48:04 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-26 08:26:12 +0400 |
commit | f7122265fcb821208c290ad9817d296dec19d523 (patch) | |
tree | 4e8a9f9798af08d8181a44db38f0177f9928fe83 | |
parent | 0ea4d4c94b7662c9668d30d8441c1a9a3376d772 (diff) |
describe: fix off-by-one error in --abbrev=40 handling
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | describe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/describe.c b/describe.c index 2b9301fc12..5dd8b2e397 100644 --- a/describe.c +++ b/describe.c @@ -42,7 +42,7 @@ static void add_to_known_names(const char *path, struct commit_name *name = xmalloc(sizeof(struct commit_name) + len); name->commit = commit; - name->prio = prio; + name->prio = prio; memcpy(name->path, path, len); idx = names; if (idx >= allocs) { @@ -154,7 +154,7 @@ int main(int argc, char **argv) tags = 1; else if (!strncmp(arg, "--abbrev=", 9)) { abbrev = strtoul(arg + 9, NULL, 10); - if (abbrev < MINIMUM_ABBREV || 40 <= abbrev) + if (abbrev < MINIMUM_ABBREV || 40 < abbrev) abbrev = DEFAULT_ABBREV; } else |