Re: [PATCH v2 02/18] Add a new builtin: branch-diff
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 6, 2018, 12:04 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1805061401260.77@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20180506003842.GT26695@zaya.teonanacatl.net>
Hi Todd,
On Sat, 5 May 2018, Todd Zullinger wrote:
Show 9 quoted lines
> I wrote: > > Would it be possible and reasonable to teach 'git branch' to > > call this as a subcommand, i.e. as 'git branch diff'? Then > > the completion wouldn't offer git branch-diff. > > Of course right after I sent this, it occurred to me that > 'git branch diff' would make mask the ability to create a > branch named diff. Using 'git branch --diff ...' wouldn't > suffer that problem.
Yep, I immediately thought of --diff instead of diff when I read your previous mail on that matter. And I like this idea!
Of course, it will complicate the code to set up the pager a bit (for `branch-diff`, I could default to "on" all the time). But IIRC we recently changed the --list cmdmode to set the pager to "auto", so I'll just copy that.
Show 6 quoted lines
> It does add a bit more overhead to the 'git branch' command, > in terms of documentation and usage. I'm not sure it's too > much though. The git-branch summary wouldn't change much: > > -git-branch - List, create, or delete branches > +git-branch - List, create, delete, or diff branches
Indeed.
Unless I hear objections, I will work on moving to `git branch --diff` (it might take a while, though, I will be traveling for work this week).
Ciao, Johannes