[PATCH] rev-list: heed --abbrev-commit option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, rev-list has a default of "0" for abbrev which means that
switching on abbreviations with --abbrev-commit has no visible effect,
even though the option is documented.

Set abbrev to DEFAULT_ABBREV so that --abbrev-commit has the same effect
as for log.

Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>
Reported-by: Eli Barzilay <eli@xxxxxxxxxxxx>
---
I'm actually wondering why log and rev-list don't share the relevant
part of that code.

 builtin/rev-list.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 5679170..eb8e2c2 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -313,7 +313,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
 
 	git_config(git_default_config, NULL);
 	init_revisions(&revs, prefix);
-	revs.abbrev = 0;
+	revs.abbrev = DEFAULT_ABBREV;
 	revs.commit_format = CMIT_FMT_UNSPECIFIED;
 	argc = setup_revisions(argc, argv, &revs, NULL);
 
-- 
1.7.0.3.435.g097f4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]