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

2018-10-11 Thread Daniels Umanovskis
On 10/12/18 1:15 AM, Junio C Hamano wrote: > It is a bit curious why you remove the branch but not the tag after > this test. [..] > > So two equally valid choices are to remove "branch -d" and then > either: > > (1) leave both branch and tag after this test in the test > repository > >

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

2018-10-11 Thread Junio C Hamano
Daniels Umanovskis writes: > +static void print_current_branch_name(void) Thanks for fixing this (I fixed this in the previous round in my tree but forgot to tell you about it). > diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh > index ee6787614..8d2020aea 100755 > --- a/t/t320

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

2018-10-11 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 nee