git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Rafael Ascensão" <rafa.almas@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: daniels@umanovskis.se, git@vger.kernel.org
Subject: Re: [PATCH] branch: make --show-current use already resolved HEAD
Date: Thu, 8 Nov 2018 04:36:21 +0000	[thread overview]
Message-ID: <20181108043621.izmneiyjvgzd22uc@rigel> (raw)
In-Reply-To: <xmqqa7mk9xw9.fsf@gitster-ct.c.googlers.com>

I did something that resulted in the mailing list not being cc'd.
Apologies to Junio and Daniels for the double send. :(

On Thu, Nov 08, 2018 at 10:11:02AM +0900, Junio C Hamano wrote:
> I'd prefer to see scriptors avoid using "git branch", too.
> 
> Unlike end-user facing documentation where we promise "we do X and
> will continue to do so because of Y" to the readers, the log message
> is primarily for recording the original motivation of the change, so
> that we can later learn "we did X back then because we thought Y".
> When we want to revise X, we revisit if the reason Y is still valid.
> 
> So in that sense, the door to "break" the scriptability is still
> open.
> 

Over at #git, commit messages are sometimes consulted to disambiguate or
clarify certain details. Often the documentation is correct but people
dispute over interpretations.

If someone came asking if `git branch` is parsable, I would advise
against and direct them to the plumbing or format alternative. But if
someone came over with a link to this commit asking the same question,
I suspect the answer would be: it's probably safe to parse the output of
this specific option because the commit says so. Thanks for clarifying
this is wrong.

> >  
> >  static const char *head;
> >  static struct object_id head_oid;
> > +static int head_flags = 0;
> 
> You've eliminated the "now unnecessary" helper and do everything
> inside cmd_branch(), so perhaps this can be made function local, no?
> 

I was not sure if these 3 lines were global intentionally or if it was
just an artifact from the past. Since it looks like the latter, I'll
make them local.

--
Rafael Ascensão

      reply	other threads:[~2018-11-08  4:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 19:04 [PATCH v5] branch: introduce --show-current display option Daniels Umanovskis
2018-10-25 19:30 ` Eric Sunshine
2018-10-26  0:52   ` Junio C Hamano
2018-11-01 22:01     ` Jeff King
2018-10-26  1:53   ` Junio C Hamano
2018-11-07 22:56 ` [PATCH] branch: make --show-current use already resolved HEAD Rafael Ascensão
2018-11-08  1:11   ` Junio C Hamano
2018-11-08  4:36     ` Rafael Ascensão [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181108043621.izmneiyjvgzd22uc@rigel \
    --to=rafa.almas@gmail.com \
    --cc=daniels@umanovskis.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).