aboutsummaryrefslogtreecommitdiffstats
path: root/Perl
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2018-06-06 15:38:36 +0100
committerSteve McIntyre <steve@einval.com>2018-06-06 15:46:07 +0100
commitaaf5e6eaca4dd60eae83cdf0ade84365b1bfbe2e (patch)
tree8979ee19bb3a2e07862e77e778e8c0248d2715d6 /Perl
parent51b28351dee24ec4203aff79cf4e32e8a4d64c78 (diff)
Change git log command line used for extracting commit hashes
Used to use --first-parent but that meant we were missing some commits, so removed it. Unfortunately this slows things down slightly and boosts the space needed for the cache. Also added --no-renames to avoid ugly warning about skipping inexact rename detection. In our use case, we don't particularly care about renames - we're just wanting to know what happened to a file in each commit.
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Local/VCS_git.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Perl/Local/VCS_git.pm b/Perl/Local/VCS_git.pm
index c11e536af98..a39b8912452 100644
--- a/Perl/Local/VCS_git.pm
+++ b/Perl/Local/VCS_git.pm
@@ -189,7 +189,7 @@ sub cache_file {
_safe_chdir($topdir, $startdir) or die "Can't chdir to $topdir: $!\n";
my (@commits);
- open (GITLOG, "git log -p -m --first-parent --name-only --numstat --format=format:\"%H %ct\" -- $file |") or die "Can't fork git log: $!\n";
+ open (GITLOG, "git log --no-renames -p -m --name-only --numstat --format=format:\"%H %ct\" -- $file |") or die "Can't fork git log: $!\n";
my ($cmt_date, $cmt_rev);
while (my $line = <GITLOG>) {
chomp $line;
@@ -322,7 +322,7 @@ sub cache_repo {
my (@commits);
my $count = 0;
- open (GITLOG, "git log -p -m --first-parent --name-only --numstat --format=format:\"%H %ct\" |") or die "Can't fork git log: $!\n";
+ open (GITLOG, "git log --no-renames -p -m --name-only --numstat --format=format:\"%H %ct\" |") or die "Can't fork git log: $!\n";
my ($cmt_date, $cmt_rev);
while (my $line = <GITLOG>) {
chomp $line;
@@ -693,7 +693,7 @@ sub path_info
}
} else {
# We don't, so we need to talk to git. (2a above)
- open (GITLOG, "git log -p -m --first-parent --name-only --numstat --format=format:\"%H %ct\" $dir|")
+ open (GITLOG, "git log --no-renames -p -m --name-only --numstat --format=format:\"%H %ct\" $dir|")
or die "Failed to fork git log: $!\n";
my $cmt_date;
my $cmt_rev;

© 2014-2024 Faster IT GmbH | imprint | privacy policy