Re: [PATCH v2 02/18] Add a new builtin: branch-diff
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 6, 2018, 20:51 UTC
- Message-ID
- <CAPig+cS0pvdg78fGUu8m2xspDDMHxi=uAMCkbLuthy7R4p3fQw@mail.gmail.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1805061419530.77@tvgsbejvaqbjf.bet>
On Sun, May 6, 2018 at 8:21 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 19 quoted lines
> On Sun, 6 May 2018, Junio C Hamano wrote: >> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: >> > On Sat, 5 May 2018, Jeff King wrote: >> >> One minor point about the name: will it become annoying as a tab >> >> completion conflict with git-branch? >> >> 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`? > > But then, we do not really use the term `topic branch` a lot in Git, *and* > the operation in question is not really about showing differences between > topic branches, but between revisions of topic branches. > > So far, the solution I like best is to use `git branch --diff <...>`, > which also neatly side-steps the problem of cluttering the top-level > command list (because tab completion).
Let's, please, not fall into the trap of polluting git-branch with utterly unrelated functionality, as has happened a few times with other Git commands. Let's especially not do so merely for the sake of tab-completion. git-branch is for branch management; it's not for diff'ing.
Of the suggestions thus far, Junio's git-topic-diff seems the least worse, and doesn't suffer from tab-completion problems.
Building on Duy's suggestion: git-interdiff could be a superset of the current git-branch-diff:
# standard interdiff
git interdiff womp-v1 womp-v2
# 'tbdiff'-like output
git interdiff --topic womp-v1 womp-v2(Substitute "--topic" by any other better name.)