lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improve content of tree.gittxt (issue 564990043 by address@hidden)


From: knupero
Subject: Re: Improve content of tree.gittxt (issue 564990043 by address@hidden)
Date: Mon, 15 Jul 2019 14:11:38 -0700

We display BRANCH and HEAD.

If we find a merge-point with master, we display that
merge-point and the history from merge-point to HEAD.
If not, we display up to 10 commits of history.

Finding a merge-point may fail if we are in a git repository
that is not a full clone of the master repository.

Displaying 10 commits might fail after some commits if there
are e.g. cherry-picks from unknown branches in repositories
that are not full clones of our master repository. Errors
are ignored.

Current gub will display the wrong branch unless you apply
the following patch:

--- cut here ---
diff --git a/gub/repository.py b/gub/repository.py
index 5c2c36c551..c91a1156ca 100644
--- a/gub/repository.py
+++ b/gub/repository.py
@@ -701,7 +701,8 @@ cd %(dir_slash_vcs)s && mv *bz2 *deb *gz *zip .. ||
:
             self._update_workdir (destdir)
     def _update_workdir_shallow (self, destdir):
         branch = self.branch # branch is empty?
-        branch = 'master'
+        if not branch:
+            branch = 'master'
         HEAD = self.checksum ()
         if HEAD == 'invalid':
             barf
--- cut here ---

Without the patch, BRANCH is always 'master'. The gub patch
fixes a problem introduced 10 years and one day ago in commit
e0ed3589241383db0b8d77c1c7738ad3432a4fd5 ;-)

https://codereview.appspot.com/564990043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]