Re: [PATCH v2 02/18] Add a new builtin: branch-diff
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 7, 2018, 05:39 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1805062355190.77@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqr2moqlw8.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Mon, 7 May 2018, Junio C Hamano wrote:
Show 19 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> >> If tbdiff were "Thomas's branch diff", I would call this jbdiff ;-)
> >> but I think the 't' in there stands for "topic", not "Thomas's".
> >>
> >> How about "git topic-diff"?
> >
> > Or `git topic-branch-diff`?
>
> Yeah something along that line, which is about comparing each step
> in two iterations of a single topic. It would be wonderful if it
> also supported a short-hand
>
> $ git tbdiff --reflog 1.day.ago js/branch-diff
>
> that turned into:
>
> $ git tbdiff js/branch-diff..js/branch-diff@{1.day.ago} \
> js/branch-diff@{1.day.ago}..js/branch-diffOr even easier: `git tbdiff js/branch-diff@{1.day.ago}...js/branch-diff`.> That compares "what was on the topic a day ago" with "what is new on > the topic since that time", which is exactly what an individual > contributor wants when reviewing how the topic was polished, I would > say.
It would be easy to introduce, but I am wary about its usefulness. Unless you re-generate the branch from patches (which I guess you do a lot, but I don't), you are likely to compare incomplete patch series: say, when you call `git rebase -i` to reword 05/18's commit message, your command will only compare 05--18 of the patch series.
Worse, if js/branch-diff needs to be uprooted (e.g. because it now depends on some different patch, or because it already depended on a separate patch series that was now updated), your `git branch --diff` call will compare more than just my patches: it will assume that those dependencies are part of the patch series, because they changed, too.
Show 11 quoted lines
> [Footnote]
>
> A variant I often use when accepting a rerolled series is
>
> $ git checkout js/branch-diff
> $ git checkout master...
> $ git am ./+js-branch-diff-v2
> $ git tbdiff ..@{-1} @{-1}..
>
> so this is not only for individual contributors but also helps
> integrators.Yes, and I also pointed out (twice) that it will help interested parties follow what I do with my merging-rebases in Git for Windows.
Ciao, Dscho