git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Csaba Henk <csaba@lowlife.hu>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>
Subject: Re: git symbolic-ref vs. reflog (vs. rebase)
Date: Mon, 2 May 2011 14:08:28 +0530	[thread overview]
Message-ID: <BANLkTimMCsXuP45WFDG-1FvkicLm5idKEQ@mail.gmail.com> (raw)
In-Reply-To: <7vk4ecvf2c.fsf@alter.siamese.dyndns.org>

On Sat, Apr 30, 2011 at 4:30 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Jeff King <peff@peff.net> writes:
>
>> I think every caller should be using "-m" these days.  I know we can't
>> _require_ it for historical reasons. But shouldn't symbolic-ref always
>> write a reflog entry? Even something like "we changed and I can't tell
>> you why" to cover older scripts that call symbolic-ref?
>
> I think the particular instance Csaba saw in rebase may want to pass the
> reason why it flipped the HEAD.
>
> Flipping HEAD temporarily to another ref to do something, only to flip it
> back before giving the control back to the user, might be something a
> script may want to have a choice of not logging, so I am mildly negative
> on changing the command to unconditionally log empty entry without being
> told.
>
> "update-ref" seems to write an empty entry even when not given an "-m"
> option, and we can view it as robbing a similar choice from the scripts.
> We might want to fix it.  I dunno.

What if symbolic-ref and/or update-ref were changed so that the default
invocation would add a reflog entry with a default (empty?) note, however,
also provide an option with which suppressing the reflog can be requested?

Csaba

      parent reply	other threads:[~2011-05-02  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-29 15:03 git symbolic-ref vs. reflog (vs. rebase) Csaba Henk
2011-04-29 16:19 ` Junio C Hamano
2011-04-29 17:21   ` Csaba Henk
2011-04-30  4:13     ` Jeff King
2011-05-02  8:46       ` Csaba Henk
2011-05-27 20:13         ` [PATCH 1/2] rebase: create HEAD reflog entry when aborting Jeff King
2011-05-27 20:16         ` [PATCH 2/2] rebase: write a reflog entry when finishing Jeff King
2011-04-29 22:48   ` git symbolic-ref vs. reflog (vs. rebase) Jeff King
2011-04-29 23:00     ` Junio C Hamano
2011-04-30  3:58       ` Jeff King
2011-05-02  8:38       ` Csaba Henk [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

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

  git send-email \
    --in-reply-to=BANLkTimMCsXuP45WFDG-1FvkicLm5idKEQ@mail.gmail.com \
    --to=csaba@lowlife.hu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
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 NNTP newsgroup(s).