git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Erik Cervin Edin <erik@cervined.in>,
	Phillip Wood <phillip.wood@dunelm.org.uk>,
	Philippe Blain <levraiphilippeblain@gmail.com>
Subject: [PATCH v2 0/5] Documentation: updates and a correction around 'ORIG_HEAD'
Date: Tue, 10 Jan 2023 13:15:16 +0000	[thread overview]
Message-ID: <pull.1456.v2.git.1673356521.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1456.git.1673120359.gitgitgadget@gmail.com>

 * added a link to the mailing list thread in the commit message of 5/5.

v1: Documentation: updates and a correction around 'ORIG_HEAD'

This series' initial motivation was to clear up a confusion that arose in
[1] where it was noticed that 'ORIG_HEAD' is not guaranteed to point to the
original branch tip at the end of the rebase if 'git reset' is used during
the rebase.

Patch 5/5 adds a note to 'git rebase's documentation to make that explicit.
When taking a look at the existing documentation mentioning 'ORIG_HEAD', I
also found an error in an example (patch 1/5), other small inconsistencies
(patch 2-3/5), and a potential improvement (patch 4/5).

Cheers,

Philippe.

[1]
https://lore.kernel.org/git/1b2b8e98-5506-a1e6-6059-a967757b3bb8@gmail.com/T/#m827179c5adcfb504d67f76d03c8e6942b55e5ed0

Philippe Blain (5):
  git-cherry-pick.txt: do not use 'ORIG_HEAD' in example
  git-reset.txt: mention 'ORIG_HEAD' in the Description
  git-merge.txt: mention 'ORIG_HEAD' in the Description
  revisions.txt: be explicit about commands writing 'ORIG_HEAD'
  git-rebase.txt: add a note about 'ORIG_HEAD' being overwritten

 Documentation/git-cherry-pick.txt | 2 +-
 Documentation/git-merge.txt       | 3 ++-
 Documentation/git-rebase.txt      | 7 +++++++
 Documentation/git-reset.txt       | 3 ++-
 Documentation/revisions.txt       | 3 ++-
 5 files changed, 14 insertions(+), 4 deletions(-)


base-commit: 4dbebc36b0893f5094668ddea077d0e235560b16
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1456%2Fphil-blain%2Fdoc-orig-head-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1456/phil-blain/doc-orig-head-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1456

Range-diff vs v1:

 1:  74b2d5a9144 = 1:  74b2d5a9144 git-cherry-pick.txt: do not use 'ORIG_HEAD' in example
 2:  f25c71fd4c3 = 2:  f25c71fd4c3 git-reset.txt: mention 'ORIG_HEAD' in the Description
 3:  e488ad3ce1d = 3:  e488ad3ce1d git-merge.txt: mention 'ORIG_HEAD' in the Description
 4:  302b789a486 = 4:  302b789a486 revisions.txt: be explicit about commands writing 'ORIG_HEAD'
 5:  9ef427a9a2a ! 5:  7eed8f35376 git-rebase.txt: add a note about 'ORIG_HEAD' being overwritten
     @@ Commit message
      
          Indeed, using other commands that write 'ORIG_HEAD' during the rebase,
          like splitting a commit using 'git reset HEAD^', will lead to 'ORIG_HEAD'
     -    being overwritten.
     +    being overwritten. This causes confusion for some users [1].
      
          Add a note about that in the 'Description' section, and mention the more
          robust alternative of using the branch's reflog.
      
     +    [1] https://lore.kernel.org/git/28ebf03b-e8bb-3769-556b-c9db17e43dbb@gmail.com/T/#m827179c5adcfb504d67f76d03c8e6942b55e5ed0
     +
          Reported-by: Erik Cervin Edin <erik@cervined.in>
          Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
      

-- 
gitgitgadget

  parent reply	other threads:[~2023-01-10 13:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 19:39 [PATCH 0/5] Documentation: updates and a correction around 'ORIG_HEAD' Philippe Blain via GitGitGadget
2023-01-07 19:39 ` [PATCH 1/5] git-cherry-pick.txt: do not use 'ORIG_HEAD' in example Philippe Blain via GitGitGadget
2023-01-08  2:05   ` Junio C Hamano
2023-01-09 13:56     ` Philippe Blain
2023-01-07 19:39 ` [PATCH 2/5] git-reset.txt: mention 'ORIG_HEAD' in the Description Philippe Blain via GitGitGadget
2023-01-07 19:39 ` [PATCH 3/5] git-merge.txt: " Philippe Blain via GitGitGadget
2023-01-07 19:39 ` [PATCH 4/5] revisions.txt: be explicit about commands writing 'ORIG_HEAD' Philippe Blain via GitGitGadget
2023-01-08  2:08   ` Junio C Hamano
2023-01-09 14:00     ` Philippe Blain
2023-01-07 19:39 ` [PATCH 5/5] git-rebase.txt: add a note about 'ORIG_HEAD' being overwritten Philippe Blain via GitGitGadget
2023-01-08  2:16   ` Junio C Hamano
2023-01-09 18:22     ` Philippe Blain
2023-01-10 13:15 ` Philippe Blain via GitGitGadget [this message]
2023-01-10 13:15   ` [PATCH v2 1/5] git-cherry-pick.txt: do not use 'ORIG_HEAD' in example Philippe Blain via GitGitGadget
2023-01-10 13:15   ` [PATCH v2 2/5] git-reset.txt: mention 'ORIG_HEAD' in the Description Philippe Blain via GitGitGadget
2023-01-10 13:15   ` [PATCH v2 3/5] git-merge.txt: " Philippe Blain via GitGitGadget
2023-01-10 13:15   ` [PATCH v2 4/5] revisions.txt: be explicit about commands writing 'ORIG_HEAD' Philippe Blain via GitGitGadget
2023-01-10 13:15   ` [PATCH v2 5/5] git-rebase.txt: add a note about 'ORIG_HEAD' being overwritten Philippe Blain via GitGitGadget
2023-01-10 20:06   ` [PATCH v2 0/5] Documentation: updates and a correction around 'ORIG_HEAD' Phillip Wood
2023-01-13 17:56     ` Junio C Hamano

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=pull.1456.v2.git.1673356521.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=erik@cervined.in \
    --cc=git@vger.kernel.org \
    --cc=levraiphilippeblain@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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).