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. Per635530a2fcand4f62c2bc57, 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>
This commit is contained in:
committed by
Junio C Hamano
parent
f0f90e34b0
commit
0c47695a69
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user