git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
	Tay Ray Chuan <rctay89@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] branch: say "Reset to" in reflog entries for 'git branch -f' operations
Date: Fri, 09 Apr 2010 14:20:16 +0200	[thread overview]
Message-ID: <4BBF1B80.8050307@viscovery.net> (raw)
In-Reply-To: <vpqk4sgltoh.fsf@bauges.imag.fr>

Am 4/9/2010 14:03, schrieb Matthieu Moy:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> But I also have a functional question: Is "start_from" really the ref
>> *to* which the branch is reset? I hope reset does it right.
> 
> I don't know which is which, but if start_from is the destination of
> the ref, then it should be renamed. I don't think we want to have this
> 
> 		snprintf(msg, sizeof msg, "branch: Reset to %s",
>                                                          ^^
>  			 start_name);
>                          ^^^^^
> 
> in the code.

I think the patch is right.

The "start" part refers to where the branch forks off of existing history.

In the case were an existing branch is pointed to a new commit, the "Reset
to" is indeed correct. IIUC, the "start_name" is what was given on the
command line as fork point (or HEAD if not given). For example, after

   git branch -f thebranch master~23

the reflog of 'thebranch' would now read as "Reset to master~23".

-- Hannes

  reply	other threads:[~2010-04-09 12:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09  7:45 [PATCH] branch: say "Reset to" in reflog entries for 'git branch -f' operations Tay Ray Chuan
2010-04-09 11:55 ` Michael J Gruber
2010-04-09 12:03   ` Matthieu Moy
2010-04-09 12:20     ` Johannes Sixt [this message]
2010-04-09 12:18   ` Tay Ray Chuan
2010-04-09 12:38 ` [PATCH v2] " Tay Ray Chuan

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=4BBF1B80.8050307@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=rctay89@gmail.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.
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).