git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] branch: say "Reset to" in reflog entries for 'git branch -f' operations

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 9, 2010, 11:55 UTC
Message-ID
<4BBF159A.1000206@drmicha.warpmail.net>
In-Reply-To
<1270799112-4308-1-git-send-email-rctay89@gmail.com>
Tay Ray Chuan venit, vidit, dixit 09.04.2010 15:45:
Show 5 quoted lines
> In 5f856dd (fix reflog entries for "git-branch"), it is mentioned that
> 'git branch -f' is intended to be equivalent to 'git reset'. Since we
> usually say "reset to <commit>" in the git-reset Documentation and
> elsewhere, it would make sense to say "Reset to" here as well.
> 

I know the patch is not large, but one really has to read it after wondering: Huh? What is branch -f doing now before the patch? To me it sounded as if it didn't write to the reflog at all. So, how about

elsewhere, it would make sense to say "Reset to" here as well rather than "Rest from".

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.

Show 24 quoted lines
> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
> ---
> 
>   I happened to be perusing my branch's reflog when I spotted this.
> 
>  branch.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/branch.c b/branch.c
> index 9e1f63e..2ab42aa 100644
> --- a/branch.c
> +++ b/branch.c
> @@ -198,7 +198,7 @@ void create_branch(const char *head,
>  		log_all_ref_updates = 1;
> 
>  	if (forcing)
> -		snprintf(msg, sizeof msg, "branch: Reset from %s",
> +		snprintf(msg, sizeof msg, "branch: Reset to %s",
>  			 start_name);
>  	else if (!dont_change_ref)
>  		snprintf(msg, sizeof msg, "branch: Created from %s",
> --
> 1.7.1.rc0.240.gba75f
> 
Previous: Tay Ray ChuanNext: Matthieu Moy
Message 2 of 6 in “branch: say "Reset to" in reflog entries for 'git branch -f' operations”
  1. branch: say "Reset to" in reflog entries for 'git branch -f' operationsTay Ray Chuan, Apr 9, 2010
  2. Michael J GruberApr 9, 2010
  3. Matthieu MoyApr 9, 2010
  4. Johannes SixtApr 9, 2010
  5. Tay Ray ChuanApr 9, 2010
  6. branch: say "Reset to" in reflog entries for 'git branch -f' operationsTay Ray Chuan, Apr 9, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.