{"thread":{"id":"23389","subject":"[PATCH] branch: say \"Reset to\" in reflog entries for 'git branch -f' operations","startedAt":"2010-04-09T07:45:12Z","lastAt":"2010-04-09T12:38:18Z","messageCount":6,"participants":["Tay Ray Chuan","Michael J Gruber","Matthieu Moy","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"139020","messageId":"1270799112-4308-1-git-send-email-rctay89@gmail.com","threadId":"23389","inReplyTo":null,"subject":"[PATCH] branch: say \"Reset to\" in reflog entries for 'git branch -f' operations","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-04-09T07:45:12Z","receivedAt":"2010-04-09T07:45:12Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"In 5f856dd (fix reflog entries for \"git-branch\"), it is mentioned that\n'git branch -f' is intended to be equivalent to 'git reset'. Since we\nusually say \"reset to <commit>\" in the git-reset Documentation and\nelsewhere, it would make sense to say \"Reset to\" here as well.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n\n  I happened to be perusing my branch's reflog when I spotted this.\n\n branch.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/branch.c b/branch.c\nindex 9e1f63e..2ab42aa 100644\n--- a/branch.c\n+++ b/branch.c\n@@ -198,7 +198,7 @@ void create_branch(const char *head,\n \t\tlog_all_ref_updates = 1;\n\n \tif (forcing)\n-\t\tsnprintf(msg, sizeof msg, \"branch: Reset from %s\",\n+\t\tsnprintf(msg, sizeof msg, \"branch: Reset to %s\",\n \t\t\t start_name);\n \telse if (!dont_change_ref)\n \t\tsnprintf(msg, sizeof msg, \"branch: Created from %s\",\n--\n1.7.1.rc0.240.gba75f\n"},{"id":"139029","messageId":"4BBF159A.1000206@drmicha.warpmail.net","threadId":"23389","inReplyTo":"1270799112-4308-1-git-send-email-rctay89@gmail.com","subject":"Re: [PATCH] branch: say \"Reset to\" in reflog entries for 'git branch -f' operations","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-04-09T11:55:06Z","receivedAt":"2010-04-09T11:55:06Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Tay Ray Chuan venit, vidit, dixit 09.04.2010 15:45:\n> In 5f856dd (fix reflog entries for \"git-branch\"), it is mentioned that\n> 'git branch -f' is intended to be equivalent to 'git reset'. Since we\n> usually say \"reset to <commit>\" in the git-reset Documentation and\n> elsewhere, it would make sense to say \"Reset to\" here as well.\n> \n\nI know the patch is not large, but one really has to read it after\nwondering: Huh? What is branch -f doing now before the patch? To me it\nsounded as if it didn't write to the reflog at all. So, how about\n\nelsewhere, it would make sense to say \"Reset to\" here as well rather\nthan \"Rest from\".\n\nBut I also have a functional question: Is \"start_from\" really the ref\n*to* which the branch is reset? I hope reset does it right.\n\n> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>\n> ---\n> \n>   I happened to be perusing my branch's reflog when I spotted this.\n> \n>  branch.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/branch.c b/branch.c\n> index 9e1f63e..2ab42aa 100644\n> --- a/branch.c\n> +++ b/branch.c\n> @@ -198,7 +198,7 @@ void create_branch(const char *head,\n>  \t\tlog_all_ref_updates = 1;\n> \n>  \tif (forcing)\n> -\t\tsnprintf(msg, sizeof msg, \"branch: Reset from %s\",\n> +\t\tsnprintf(msg, sizeof msg, \"branch: Reset to %s\",\n>  \t\t\t start_name);\n>  \telse if (!dont_change_ref)\n>  \t\tsnprintf(msg, sizeof msg, \"branch: Created from %s\",\n> --\n> 1.7.1.rc0.240.gba75f\n> \n"},{"id":"139030","messageId":"vpqk4sgltoh.fsf@bauges.imag.fr","threadId":"23389","inReplyTo":"4BBF159A.1000206@drmicha.warpmail.net","subject":"Re: [PATCH] branch: say \"Reset to\" in reflog entries for 'git branch -f' operations","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-04-09T12:03:10Z","receivedAt":"2010-04-09T12:03:10Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> But I also have a functional question: Is \"start_from\" really the ref\n> *to* which the branch is reset? I hope reset does it right.\n\nI don't know which is which, but if start_from is the destination of\nthe ref, then it should be renamed. I don't think we want to have this\n\n\t\tsnprintf(msg, sizeof msg, \"branch: Reset to %s\",\n                                                         ^^\n \t\t\t start_name);\n                         ^^^^^\n\nin the code.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"139032","messageId":"w2nbe6fef0d1004090518hee66e33esd93e767580837b55@mail.gmail.com","threadId":"23389","inReplyTo":"4BBF159A.1000206@drmicha.warpmail.net","subject":"Re: [PATCH] branch: say \"Reset to\" in reflog entries for 'git branch -f' operations","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-04-09T12:18:54Z","receivedAt":"2010-04-09T12:18:54Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi,\n\nOn Fri, Apr 9, 2010 at 7:55 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> I know the patch is not large, but one really has to read it after\n> wondering: Huh? What is branch -f doing now before the patch? To me it\n> sounded as if it didn't write to the reflog at all. So, how about\n>\n> elsewhere, it would make sense to say \"Reset to\" here as well rather\n> than \"Rest from\".\n\nSounds good.\n\n> But I also have a functional question: Is \"start_from\" really the ref\n> *to* which the branch is reset? I hope reset does it right.\n\n(I think you mean \"start_name\" instead of \"start_from\".)\n\nWell, \"start_name\" determines where the branch/ref points to. I don't\nthink any branch can \"start\", except that it can diverge.\n\nBut that's outside the scope of this patch.\n\n-- \nCheers,\nRay Chuan\n"},{"id":"139033","messageId":"4BBF1B80.8050307@viscovery.net","threadId":"23389","inReplyTo":"vpqk4sgltoh.fsf@bauges.imag.fr","subject":"Re: [PATCH] branch: say \"Reset to\" in reflog entries for 'git branch -f' operations","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-04-09T12:20:16Z","receivedAt":"2010-04-09T12:20:16Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 4/9/2010 14:03, schrieb Matthieu Moy:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>> But I also have a functional question: Is \"start_from\" really the ref\n>> *to* which the branch is reset? I hope reset does it right.\n> \n> I don't know which is which, but if start_from is the destination of\n> the ref, then it should be renamed. I don't think we want to have this\n> \n> \t\tsnprintf(msg, sizeof msg, \"branch: Reset to %s\",\n>                                                          ^^\n>  \t\t\t start_name);\n>                          ^^^^^\n> \n> in the code.\n\nI think the patch is right.\n\nThe \"start\" part refers to where the branch forks off of existing history.\n\nIn the case were an existing branch is pointed to a new commit, the \"Reset\nto\" is indeed correct. IIUC, the \"start_name\" is what was given on the\ncommand line as fork point (or HEAD if not given). For example, after\n\n   git branch -f thebranch master~23\n\nthe reflog of 'thebranch' would now read as \"Reset to master~23\".\n\n-- Hannes\n"},{"id":"139034","messageId":"1270816698-3464-1-git-send-email-rctay89@gmail.com","threadId":"23389","inReplyTo":"1270799112-4308-1-git-send-email-rctay89@gmail.com","subject":"[PATCH v2] branch: say \"Reset to\" in reflog entries for 'git branch -f' operations","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-04-09T12:38:18Z","receivedAt":"2010-04-09T12:38:18Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"In 5f856dd (fix reflog entries for \"git-branch\"), it is mentioned that\n'git branch -f' is intended to be equivalent to 'git reset'. Since we\nusually say \"reset to <commit>\" in the git-reset Documentation and\nelsewhere, it would make sense to say \"Reset to\" here as well, instead\nof \"Reset from\" previously.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n\nChanged from v1:\n - Mention old reflog message in patch message, as suggested by\n   Michael J Gruber.\n\n branch.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/branch.c b/branch.c\nindex 9e1f63e..2ab42aa 100644\n--- a/branch.c\n+++ b/branch.c\n@@ -198,7 +198,7 @@ void create_branch(const char *head,\n \t\tlog_all_ref_updates = 1;\n\n \tif (forcing)\n-\t\tsnprintf(msg, sizeof msg, \"branch: Reset from %s\",\n+\t\tsnprintf(msg, sizeof msg, \"branch: Reset to %s\",\n \t\t\t start_name);\n \telse if (!dont_change_ref)\n \t\tsnprintf(msg, sizeof msg, \"branch: Created from %s\",\n--\n1.7.1.rc0.240.gba75f\n"}]}