diff options
author | Eric Wong <e@80x24.org> | 2016-01-16 03:21:06 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-04-05 18:58:27 +0000 |
commit | 8ceeea662e01a65951d5d07fc9993087242d6206 (patch) | |
tree | bdada3bd8391ee5f43bb3a99fca30a9031b537a7 /lib/PublicInbox/Git.pm | |
parent | ff5d4363edb4fd30830826742acfc3f1c9fa5864 (diff) | |
download | public-inbox-8ceeea662e01a65951d5d07fc9993087242d6206.tar.gz |
We will use core.abbrev=12 by default if unset, as the git default of 7 is too low for long-term usability of links. Some of our callers used 16, which was probably excessive.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index ac556426..23a3e6c7 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -13,6 +13,11 @@ use POSIX qw(dup2); require IO::Handle; use PublicInbox::Spawn qw(spawn popen_rd); +# Documentation/SubmittingPatches recommends 12 (Linux v4.4) +my $abbrev = `git config core.abbrev` || 12; + +sub abbrev { "--abbrev=$abbrev" } + sub new { my ($class, $git_dir) = @_; bless { git_dir => $git_dir }, $class |