git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: Birger Skogeng Pedersen <birger.sp@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: git-gui: missing some patches from git?
Date: Wed, 18 Sep 2019 20:44:04 +0530	[thread overview]
Message-ID: <20190918151404.rqjohdderwxfqtdm@yadavpratyush.com> (raw)
In-Reply-To: <20190918092721.GA76617@archbookpro.localdomain>

On 18/09/19 02:27AM, Denton Liu wrote:
> On Wed, Sep 18, 2019 at 09:02:37AM +0200, Birger Skogeng Pedersen wrote:
> > Hi Pratyush,
> > 
> > 
> > I was comparing your git-gui repo[1] with the source code of
> > git/git-gui[2]. There seems to be a couple of things missing.
> > 
> > For example, I created a patch back in March 2018[3]. Junio pulled it
> > so the changes are really there in git/git-gui/git-gui.sh (see this[4]
> > line). This was while there was no git-gui maintainer. I guess the
> > change never got merged to git-gui, but directly to git.
> > 
> > Not sure what you should to about it, I just wanted to let you know.

This is something I've been aware of, but I have followed the strategy 
of ignoring the problem till someone complains. Well, that someone has 
now complained.

I'm not particularly comfortable with cross-tree/sub-tree merges, so 
I've been dreading doing this for a while. Guess now its time to get my 
hands dirty.

> > 
> > [1] https://github.com/prati0100/git-gui
> > [2] https://github.com/gitster/git/tree/master/git-gui
> > [3] https://public-inbox.org/git/20180302100148.23899-1-birgersp@gmail.com/
> > [4] https://github.com/gitster/git/blob/master/git-gui/git-gui.sh#L3885
> > 
> > 
> > Birger
> 
> As an exercise in writing throwaway scripts, I created this monstrosity.
> If you're interested in merging all of the git-gui branches that came
> from mainline back into git-gui's master, perhaps we could do something
> like this:

Ah! Thanks a lot for this. This reduces some of the work I've been 
dreading.

> 
> 	#!/bin/sh
> 
> 	branches=
> 	# note that all instances of "master" refer to git.git's "master"
> 	# also, 5ab7227 is the latest commit in Pat's git-gui repo
> 	for c in $(git rev-list --children master 5ab7227 | grep ^5ab7227 | cut -d' ' -f2-)
> 	do 
> 		merge_commit=$(git rev-list $c..master --ancestry-path --merges | tail -n1)
> 		branch_name=$(git show -s --format=%s $merge_commit | sed -e "s/Merge branch '\\([^']*\\)' of .*/\\1/")
> 
> 		#echo $branch_name: $(git rev-parse $merge_commit^2)
> 		git branch -f "$branch_name" $merge_commit^2
> 		branches="$branches $branch_name"
> 	done
> 	# this also assumes git-gui's master is checked out
> 	git merge $branches

Assuming I have git.git cloned in ../git (relative to git-gui.git), I 
ran:

  git pull -Xsubtree=git-gui ../git $branches

instead of:

  git merge $branches

because git-gui's tree doesn't have those commits and branches yet, so 
we can't merge straight away. This seems to have worked, but I thought 
I'd mention it in case it would cause some subtle problems.

> This script should resurrect all of the branches that were based on
> 5ab7227 from mainline's master. Then (assuming you have git-gui's
> master checked out), it should do a big octopus merge to bring all of
> the changes in.
> 
> We end up with the following branches being merged:
> 
> 	js/msgfmt-on-windows: 492595cfc70f97cd99d4c460db1ba01b73dab932

This branch is already in git-gui (with the exception of one commit. 
More on that below).

> 	tz/fsf-address-update: 63100874c1653dd6a137f74143eda322550eabc7
> 	jn/reproducible-build: 474642b4a47c74a1f277955d7387d1886546fa01
> 	ls/no-double-utf8-author-name: 331450f18a7fd298ddd6b85cc5e8ed9dba09f9da
> 	js/misc-git-gui-stuff: 76756d67061076c046973bff2089ad49f5dc2eb6
> 	bb/ssh-key-files: 6a47fa0efa342daa53c6386538fda313420351a5
> 	bp/bind-kp-enter: 146a6f1097f451c6b6d332916a515b7ce8c07e9a
> 	cb/ttk-style: f50d5055bf9bb2aa35e629d31943334afc4a9f10
> 	py/call-do-quit-before-exit: 5440eb0ea2651c45a0e46f2335ecbb8d1f42c584
> 
> Then perhaps you could do a request-pull and development could continue
> on your fork?
> 
> Not sure if this is even desirable but here's the script just in case it
> ends up useful. I had fun writing it.

Just to pick your brain: in what case would this not be desirable?
 
> Also note that we end up missing two commits that made changes to
> git-gui/ under mainline git (not directly to the git-gui repo): 
> 
> 	* 7560f547e6 (treewide: correct several "up-to-date" to "up to date", 2017-08-23)
> 	* 00ddc9d13c (Fix build with core.autocrlf=true, 2017-05-09)

One more commit that is missing: 492595cfc7 (git-gui (MinGW): make use of MSys2's msgfmt, 2017-07-25)

This commit is comes from the merge of js/msgfmt-on-windows, which has 
all the commits from the merge 5ab7227 (Merge remote-tracking branch 'philoakley/dup-gui', 2017-03-18)
in git-gui.

While merging js/msgfmt-on-windows should get this commit into git-gui, 
I'd rather have it separate,

> 
> Hope any of this is useful to anyone,

It is very useful. Thanks :)

-- 
Regards,
Pratyush Yadav

  reply	other threads:[~2019-09-18 15:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  7:02 git-gui: missing some patches from git? Birger Skogeng Pedersen
2019-09-18  9:27 ` Denton Liu
2019-09-18 15:14   ` Pratyush Yadav [this message]
2019-09-18 16:56     ` Denton Liu
2019-09-18 17:49     ` Junio C Hamano
2019-09-18 19:22       ` Pratyush Yadav
2019-09-19 18:32       ` Pratyush Yadav
2019-09-19 18:47         ` Denton Liu
2019-09-19 19:03           ` Pratyush Yadav
2019-09-19 19:11             ` Denton Liu
2019-09-19 19:33               ` Denton Liu
2019-09-24 14:06               ` Pratyush Yadav
2019-09-18 17:31 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190918151404.rqjohdderwxfqtdm@yadavpratyush.com \
    --to=me@yadavpratyush.com \
    --cc=birger.sp@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).