diff options
author | Jay Soffian <jaysoffian@gmail.com> | 2011-05-18 13:56:04 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-18 12:40:15 -0700 |
commit | 0c47695a69da42df4c4b7a9dad4ba083c604e3d1 (patch) | |
tree | a231ad767ee774f4978d4b3c65571716e44cdb86 /revision.c | |
parent | f0f90e34b00e5401ef51f636b0735e17a9938e0a (diff) | |
download | git-0c47695a69da42df4c4b7a9dad4ba083c604e3d1.tar.gz |
Add log.abbrevCommit config variable
Add log.abbrevCommit config variable as a convenience for users who
often use --abbrev-commit with git log and friends. Allow the option
to be overridden with --no-abbrev-commit. Per 635530a2fc and 4f62c2bc57,
the config variable is ignored when log is given "--pretty=raw".
(Also, a drive-by spelling correction in git log's short help.)
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/revision.c b/revision.c index a7cf79bf2e..be74bf92f5 100644 --- a/revision.c +++ b/revision.c @@ -1429,6 +1429,9 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->abbrev = 40; } else if (!strcmp(arg, "--abbrev-commit")) { revs->abbrev_commit = 1; + revs->abbrev_commit_given = 1; + } else if (!strcmp(arg, "--no-abbrev-commit")) { + revs->abbrev_commit = 0; } else if (!strcmp(arg, "--full-diff")) { revs->diff = 1; revs->full_diff = 1; |