Re-add files (git) if the copyright has been updated, thanks to Justin Lecher (jlec...
authoridl0r <idl0r@gentoo.org>
Thu, 7 May 2009 11:26:04 +0000 (11:26 -0000)
committeridl0r <idl0r@gentoo.org>
Thu, 7 May 2009 11:26:04 +0000 (11:26 -0000)
svn path=/trunk/gentoolkit-dev/; revision=617

ChangeLog
src/echangelog/echangelog

index ff855ec9e1b73127ca2369d00d650f0132f767ab..d2e364b9c80457280e276bfa945f7698181babb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-07: Christian Ruppert <idl0r@gentoo.org>
+       * echangelog: Re-add files (git) if the copyright has been updated, thanks
+       to Justin Lecher (jlec) <jlec@j-schmitz.net>.
+
 2009-05-06: Christian Ruppert <idl0r@gentoo.org>
        * ekeyword: Improved die message, bug 257853.
        * echangelog: Fixed git detection. Add support for project-wide variables
index 551d9b9a461d1afbad6cdf3406a4546757ca0388..c27834dcfee376a5c145d9b22a59904272f3d740 100755 (executable)
@@ -686,6 +686,12 @@ for my $e (grep /\.ebuild$/, @files) {
                # Move things around and show the diff
                system "diff -U 0 $e $e.new";
                rename "$e.new", $e or warn("Can't rename $e.new: $!\n");
+
+               # git requires to re-add this file else it wouln't be included in the commit.
+               if ($vcs eq "git")
+               {
+                       system("$vcs{$vcs}{add} ${e}");
+               }
        }
 }