On 10/12/18 12:56 AM, SZEDER Gábor wrote:
> Ah, OK, just noticed v3 which has already fixed this.
>
Yeah - squashed the wrong commits locally for v2. Thanks for pointing
this out anyway!
On Fri, Oct 12, 2018 at 12:53:26AM +0200, SZEDER Gábor wrote:
> On Wed, Oct 10, 2018 at 10:54:32PM +0200, Daniels Umanovskis wrote:
>
> [...]
>
> > diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
> > index ee6787614..e9bc3b05f 100755
> > --- a/t/t3203-branch-output.sh
> > +++ b/t
On Wed, Oct 10, 2018 at 10:54:32PM +0200, Daniels Umanovskis wrote:
[...]
> diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
> index ee6787614..e9bc3b05f 100755
> --- a/t/t3203-branch-output.sh
> +++ b/t/t3203-branch-output.sh
> @@ -100,6 +100,47 @@ test_expect_success 'git branch
On Thu, Oct 11, 2018 at 04:53:23PM -0400, Jeff King wrote:
> Right, I like that part. It's just that putting "HEAD" there already has
> a meaning: it would find refs/heads/HEAD.
>
> Now I'll grant that's a bad name for a branch (and the source of other
> confusions, and I think perhaps even someth
On Thu, Oct 11, 2018 at 09:35:28PM +0100, Rafael Ascensão wrote:
> On Thu, Oct 11, 2018 at 01:51:36PM -0400, Jeff King wrote:
> > Yeah, I agree.
>
> Not sure which parts you meant, so I'll assume you didn't agree
> with me.
Correct. ;)
I like your general idea, but I agree with Daniel that it i
On 10/11/18 10:35 PM, Rafael Ascensão wrote:
> The output of the proposed command is also a bit inconsistent with the
> usual output given by git branch, specifically the space alignment on
> the left, color and * marker.
The proposed command therefore takes a new switch. It's definitely not
perfe
On Thu, Oct 11, 2018 at 06:36:02PM +0200, Daniels Umanovskis wrote:
> I am not a fan because it would be yet another inconsistency in the Git
> command interface.
The output of the proposed command is also a bit inconsistent with the
usual output given by git branch, specifically the space alignme
On Thu, Oct 11, 2018 at 07:29:58PM +0200, Daniels Umanovskis wrote:
> > Without passing the &flag argument, I do not think there is a
> > reliable way to ask resolve_ref_unsafe() if "HEAD" is a symbolic
> > ref.
>
> If I'm reading the code correctly, resolve_ref_unsafe() will return
> "HEAD" or N
On Thu, Oct 11, 2018 at 06:36:02PM +0200, Daniels Umanovskis wrote:
> On 10/11/18 5:43 PM, Rafael Ascensão wrote:
> > I agree it feels a bit out of place, and still think that
> >
> > $ git branch --list HEAD
> >
> > would be a good candidate to be taught how to print the current branch.
>
On 10/11/18 8:54 AM, Junio C Hamano wrote:
> Is it a normal situation to have refname==NULL, or is it something
> worth reporting as an error?
Looks like that would be in the case of looping symrefs or file backend
failure, so seems a good idea to die() in that case.
> Without passing the &flag a
On 10/11/18 5:43 PM, Rafael Ascensão wrote:
> I agree it feels a bit out of place, and still think that
>
> $ git branch --list HEAD
>
> would be a good candidate to be taught how to print the current branch.
I am not a fan because it would be yet another inconsistency in the Git
command int
On Wed, Oct 10, 2018 at 08:34:40PM -0400, Jeff King wrote:
> It just seems like in its current form it might be in an uncanny valley
> where it is not quite scriptable plumbing, but not as informative as
> other porcelain.
I agree it feels a bit out of place, and still think that
$ git branch
Daniels Umanovskis writes:
> +static void print_current_branch_name()
> +{
> + const char *refname = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
> + const char *shortname;
> + if (refname == NULL || !strcmp(refname, "HEAD"))
> + return;
Is it a normal situation to have ref
On Wed, Oct 10, 2018 at 10:54:32PM +0200, 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.
I also wondered what happens in
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
15 matches
Mail list logo