summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-28 13:39:45 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-28 13:39:45 -0700
commit15cee32e2cd6c64ce684c7830453668363c8b2be (patch)
treefbef1b4557951360b847f65edfc2c70f7d940959 /revision.c
parentMerge branch 'master' into next (diff)
parentMerge branch 'jc/mailinfo' (diff)
downloadtgif-15cee32e2cd6c64ce684c7830453668363c8b2be.tar.xz
Merge branch 'master' into next
* master: Fix memory leak in "git rev-list --objects" gitview: Move the console error messages to message dialog gitview: Add key binding for F5. Let git-clone to pass --template=dir option to git-init-db. Make cvsexportcommit create parent directories as needed. Document current cvsexportcommit limitations. Do not call 'cmp' with non-existant -q flag. Fix "--abbrev=xyz" for revision listing t1002: use -U0 instead of --unified=0 format-patch: -n and -k are mutually exclusive.
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 2294b16ea2..42c077a4cb 100644
--- a/revision.c
+++ b/revision.c
@@ -733,6 +733,14 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
revs->abbrev = DEFAULT_ABBREV;
continue;
}
+ if (!strncmp(arg, "--abbrev=", 9)) {
+ revs->abbrev = strtoul(arg + 9, NULL, 10);
+ if (revs->abbrev < MINIMUM_ABBREV)
+ revs->abbrev = MINIMUM_ABBREV;
+ else if (revs->abbrev > 40)
+ revs->abbrev = 40;
+ continue;
+ }
if (!strcmp(arg, "--abbrev-commit")) {
revs->abbrev_commit = 1;
continue;