Re: [PATCH v4] branch: introduce --show-current display option

2018-10-18 Thread Eric Sunshine
On Thu, Oct 18, 2018 at 5:51 AM Johannes Schindelin wrote: > On Wed, 17 Oct 2018, Eric Sunshine wrote: > > On Wed, Oct 17, 2018 at 6:18 AM Johannes Schindelin > > wrote: > > > My suspicion: it is essentially the `(exit 117)` that adds about 100ms to > > > every of those 67 test cases. > > > >

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-18 Thread Johannes Schindelin
Hi Eric, On Wed, 17 Oct 2018, Eric Sunshine wrote: > On Wed, Oct 17, 2018 at 6:18 AM Johannes Schindelin > wrote: > > I realized yesterday that the &&-chain linting we use for every single > > test case takes a noticeable chunk of time: > > > > $ time ./t0006-date.sh --quiet > >

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-17 Thread Daniels Umanovskis
On 10/17/18 11:39 AM, Rafael Ascensão wrote: > On Fri, Oct 12, 2018 at 03:33:21PM +0200, Daniels Umanovskis wrote: >> Intended both for scripting and interactive/informative use. >> Unlike git branch --list, no filtering is needed to just get the >> branch name. > > Are we going forward with

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-17 Thread Eric Sunshine
On Wed, Oct 17, 2018 at 6:18 AM Johannes Schindelin wrote: > I realized yesterday that the &&-chain linting we use for every single > test case takes a noticeable chunk of time: > > $ time ./t0006-date.sh --quiet > real0m20.973s > $ time ./t0006-date.sh --quiet

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-17 Thread Johannes Schindelin
Hi Eric, On Tue, 16 Oct 2018, Eric Sunshine wrote: > On Tue, Oct 16, 2018 at 7:09 PM Junio C Hamano wrote: > > Eric Sunshine writes: > > > This cleanup "checkout" needs to be encapsulated within a > > > test_when_finished(), doesn't it? Preferably just after the "git > > > checkout -b"

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-17 Thread Rafael Ascensão
On Fri, Oct 12, 2018 at 03:33:21PM +0200, Daniels Umanovskis wrote: > Intended both for scripting and interactive/informative use. > Unlike git branch --list, no filtering is needed to just get the > branch name. Are we going forward with advertising this as a scriptable alternative? > + }

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-16 Thread Eric Sunshine
On Tue, Oct 16, 2018 at 7:09 PM Junio C Hamano wrote: > Eric Sunshine writes: > > This cleanup "checkout" needs to be encapsulated within a > > test_when_finished(), doesn't it? Preferably just after the "git > > checkout -b" invocation. > > In the meantime, here is what I'll have in 'pu' on

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-16 Thread Junio C Hamano
Eric Sunshine writes: >> +test_expect_success 'git branch `--show-current` works properly when tag >> exists' ' >> + cat >expect <<-\EOF && >> + branch-and-tag-name >> + EOF >> + test_when_finished "git branch -D branch-and-tag-name" && >> + git checkout -b

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-16 Thread Junio C Hamano
Daniels Umanovskis writes: > +test_expect_success 'git branch `--show-current` works properly with > worktrees' ' > + cat >expect <<-\EOF && > + branch-one > + branch-two > + EOF > + git checkout branch-one && > + git worktree add worktree branch-two && > + ( > +

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-12 Thread Eric Sunshine
On Fri, Oct 12, 2018 at 9:34 AM Daniels Umanovskis wrote: > When called with --show-current, git branch will print the current > branch name and terminate. Only the actual name gets printed, > without refs/heads. In detached HEAD state, nothing is output. > > Signed-off-by: Daniels Umanovskis >

[PATCH v4] branch: introduce --show-current display option

2018-10-12 Thread Daniels Umanovskis
When called with --show-current, git branch will print the current branch name and terminate. Only the actual name gets printed, without refs/heads. In detached HEAD state, nothing is output. Intended both for scripting and interactive/informative use. Unlike git branch --list, no filtering is