Re: [PATCH 1/2] branch: introduce --current display option

2018-10-09 Thread Daniels Umanovskis
Thanks for the feedback! On 10/9/18 9:54 PM, Stefan Beller wrote: > How does it play with worktrees? (I would expect it to just work as expected: > each worktree would print its current branch, but a test might help?) I'll see about writing a test for that. I've never used git-worktree so this is

Re: [PATCH 1/2] branch: introduce --current display option

2018-10-09 Thread Stefan Beller
Welcome to the git mailing list! On Tue, Oct 9, 2018 at 11:31 AM Daniels Umanovskis wrote: > > When called with --current, git branch will print the current > branch name and terminate. It will print HEAD in detached-head state. How does it play with worktrees? (I would expect it to just work as

[PATCH 1/2] branch: introduce --current display option

2018-10-09 Thread Daniels Umanovskis
When called with --current, git branch will print the current branch name and terminate. It will print HEAD in detached-head state. Rationale: finding out the current branch is useful interactively, but especially in scripting. git branch --list prints many branches, and prepends the current one w