Thread (13 messages) flat view 13 messages, 5 authors, 2016-06-15

Re: Merge git-gui into 1.5.0 ?

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:42:54

Junio C Hamano [off-list ref] wrote:
"Shawn O. Pearce" [off-list ref] writes:
quoted
It may be saner for all involved if that development happens in
the git-gui.git repository, with drops made to git.git by way of
merging the "subproject" every so often.
Ok, so here is what I did last night.

$ git remote show git-gui
* remote git-gui
  URL: git://repo.or.cz/git-gui.git/
  Tracked remote branches
    master
$ git fetch git-gui
$ git read-tree --prefix=git-gui/ git-gui/master
$ git checkout git-gui
$ git rev-parse git-gui/master >.git/MERGE_HEAD
$ git commit
I just sent you a patch for Makefile in git.git to build git-gui.
I've also setup things so git-gui's versions track independently of
git, yet the correct versions are embedded into the release tarball
and executable in both the standalone and embedded-in-git cases.
A true subproject!

For this to work the gitgui-* tags need to be fetched into your
repository.  I also took the assumption that the git-gui subdirectory
is never modified in git.git, but only through merging git-gui's
commit history.

To play nice I'm prefixing the git-gui tags with 'gitgui-', rather
than 'v', so that they don't conflict with git's own version numbers
within the refs/tags namespace.

I am signing gitgui tags with a GPG key. For ease of distribution
my public key was tagged under spearce-gpg-pub.  The hash for
spearce-gpg-pub is 8bb563fb25a372a9cb14f0a9b9015d409fd82c16.

I'm not sure if it makes sense to push the gitgui-* tags (or
spearce-gpg-pub) to the public git.git repository.  If these tags
aren't present then git-gui will fail to get its version number
and fallback on the hardcoded value in git-gui/GIT-VERSION-GEN.
Anyone who really cares that this is correct could just fetch
the tags on their own from repo.or.cz.

Here's the script I was working with to merge git-gui into git.git:

-->8--
#!/bin/sh

remote=git-gui
branch=master

git-fetch $remote &&
ggh=$(git-rev-parse $remote/$branch) &&
ggt=$(git-rev-parse $ggh^{tree}) &&
tree=$(git ls-tree HEAD \
	| sed "/	git-gui/s/tree .*	/tree $ggt	/" \
	| git mktree) &&
git-read-tree -m -u --exclude-per-directory=.gitignore HEAD $tree &&
git-update-ref ORIG_HEAD HEAD &&
git-update-ref MERGE_HEAD $ggh &&
msg="Merge branch '$branch' of $(git-config remote.$remote.url)

Update to version $(git describe --abbrev=4 $ggh).
" &&
echo "$msg" >.git/MERGE_MSG &&
echo "Merge complete.  Please commit the result." ||
exit
-->8--

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help