[X2Go-Commits] [maintenancescripts] 01/01: git/hooks/update-script._irkerhook.py_: also pass the common ancestor for rebased ("parent") when getting the diff tree.

git-admin at x2go.org git-admin at x2go.org
Mon May 4 01:23:02 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository maintenancescripts.

commit 3050f064bd42f0b66397d0cd6f4877780bdf0d9a
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Mon May 4 01:22:46 2015 +0200

    git/hooks/update-script._irkerhook.py_: also pass the common ancestor for rebased ("parent") when getting the diff tree.
---
 git/hooks/update-script._irkerhook.py_ |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/git/hooks/update-script._irkerhook.py_ b/git/hooks/update-script._irkerhook.py_
index 49578e9..917e3a1 100755
--- a/git/hooks/update-script._irkerhook.py_
+++ b/git/hooks/update-script._irkerhook.py_
@@ -278,10 +278,12 @@ class GitExtractor(GenericExtractor):
         if not commit.rev:
             commit.rev = commit.commit[:12]
         # Extract the meta-information for the commit
+        parent = ''
         if self.rebase == '':
             commit.files = do("git diff-tree -r --name-only " + shellquote(commit.commit))
         else:
-            commit.files = do("git diff-tree -r --name-only " + shellquote(self.rebase) + ".." + shellquote(commit.commit))
+            parent = do("git merge-base " + shellquote(self.rebase) + " " + shellquote(commit.commit))
+            commit.files = do("git diff-tree -r --name-only " + shellquote(parent) + ".." + shellquote(commit.commit))
         commit.files = " ".join(commit.files.strip().split("\n")[1:])
         # Design choice: for git we ship only the first message line, which is
         # conventionally supposed to be a summary of the commit.  Under
@@ -307,7 +309,6 @@ class GitExtractor(GenericExtractor):
         commit.author_date, commit.commit_date = \
             do("git log -1 '--pretty=format:%ai|%ci' " + shellquote(commit.commit)).split("|")
         if self.rebase != '':
-            parent = do("git merge-base " + shellquote(self.rebase) + " " + shellquote(commit.commit))
             commit.commit = commit.commit + ";hb=" + parent
         return commit
 

--
Alioth's /srv/git/code.x2go.org/maintenancescripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git


More information about the x2go-commits mailing list