texlive[44221] Master/tlpkg/TeXLive/TLTREE.pm: fix TLREE from_git to

commits+preining at tug.org commits+preining at tug.org
Sat May 6 13:20:07 CEST 2017


Revision: 44221
          http://tug.org/svn/texlive?view=revision&revision=44221
Author:   preining
Date:     2017-05-06 13:20:06 +0200 (Sat, 06 May 2017)
Log Message:
-----------
fix TLREE from_git to properly report revisions

Modified Paths:
--------------
    trunk/Master/tlpkg/TeXLive/TLTREE.pm

Modified: trunk/Master/tlpkg/TeXLive/TLTREE.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLTREE.pm	2017-05-06 09:59:47 UTC (rev 44220)
+++ trunk/Master/tlpkg/TeXLive/TLTREE.pm	2017-05-06 11:20:06 UTC (rev 44221)
@@ -80,7 +80,7 @@
   my %files;
   my @lines;
 
-  my @foo = `cd $svnroot; git log --pretty=format:COMMIT=%h --name-only --diff-filter=A`;
+  my @foo = `cd $svnroot; git log --pretty=format:COMMIT=%h --name-only`;
   if ($retval != 0) {
     $retval /= 256 if $retval > 0;
     tldie("TLTree: git log in $svnroot returned $retval, stopping.\n");
@@ -97,7 +97,9 @@
       $rev++;
       next;
     } else {
-      $files{$l} = $rev;
+      # we only use the first occurrence of $f from the top,
+      # that is the most recent change
+      $files{$l} = $rev if (not(defined($files{$l})));
     }
   }
 
@@ -114,7 +116,7 @@
 sub init_from_gitsvn {
   my $self = shift;
   my $svnroot = $self->{'svnroot'};
-  my @foo = `cd $svnroot; git log --pretty=format:%h --name-only --diff-filter=A`;
+  my @foo = `cd $svnroot; git log --pretty=format:%h --name-only`;
   chomp(@foo);
   my $retval = $?;
   if ($retval != 0) {



More information about the tex-live-commits mailing list