{"thread":{"id":"6855","subject":"[PATCH] Attempt to improve git-rebase lead-in description.","startedAt":"2007-02-17T09:31:50Z","lastAt":"2007-02-18T06:31:24Z","messageCount":3,"participants":["Shawn O. Pearce","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"34861","messageId":"20070217093150.GA25871@spearce.org","threadId":"6855","inReplyTo":null,"subject":"[PATCH] Attempt to improve git-rebase lead-in description.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-17T09:31:50Z","receivedAt":"2007-02-17T09:31:50Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"It was mentioned on #git this morning that the lead-in description\nof git-rebase is very confusing.  Too many branch this and branch\nthat in a very short run of text.\n\nThis new description attempts to walk the user through the command\nsyntax, while also describing exactly what git-rebase is doing to\ntheir repository.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n Documentation/git-rebase.txt |   22 ++++++++++++++--------\n 1 files changed, 14 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex f2ef1f7..a66b2d7 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -13,11 +13,20 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n-git-rebase replaces <branch> with a new branch of the same name.  When\n-the --onto option is provided the new branch starts out with a HEAD equal\n-to <newbase>, otherwise it is equal to <upstream>.  It then attempts to\n-create a new commit for each commit from the original <branch> that does\n-not exist in the <upstream> branch.\n+If <branch> is specified, git-rebase will perform an automatic\n+`git checkout <branch>` before doing anything else.  Otherwise\n+it remains on the current branch.\n+\n+All changes made by commits in the current branch but that are not\n+in <upstream> are saved to a temporary area.  This is the same set\n+of commits that would be shown by `git log <upstream>..HEAD`.\n+\n+The current branch is reset to <upstream>, or <newbase> if the\n+--onto option was supplied.  This has the exact same effect as\n+`git reset --hard <upstream>` (or <newbase>).\n+\n+The commits that were previously saved into the temporary area are\n+then reapplied to the current branch, one by one, in order.\n \n It is possible that a merge failure will prevent this process from being\n completely automatic.  You will have to resolve any such merge failure\n@@ -26,9 +35,6 @@ that caused the merge failure with `git rebase --skip`.  To restore the\n original <branch> and remove the .dotest working files, use the command\n `git rebase --abort` instead.\n \n-Note that if <branch> is not specified on the command line, the currently\n-checked out branch is used.\n-\n Assume the following history exists and the current branch is \"topic\":\n \n ------------\n-- \n1.5.0.552.ge1b1c\n"},{"id":"34936","messageId":"er8d34$ssm$1@sea.gmane.org","threadId":"6855","inReplyTo":"20070217093150.GA25871@spearce.org","subject":"Re: [PATCH] Attempt to improve git-rebase lead-in description.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-02-18T02:21:14Z","receivedAt":"2007-02-18T02:21:14Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Shawn O. Pearce wrote:\n\n> +\n> +The commits that were previously saved into the temporary area are\n> +then reapplied to the current branch, one by one, in order.\n\nWhich is true for git-format-patch/git-am --3way driven \"git rebase\",\nbut not for git-merge driven \"git rebase --merge\".\n\nThe description is certainly more user-friendly, but I'd rather it avoid\nmentioning saving to temporary area.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"34937","messageId":"20070218063124.GA31350@spearce.org","threadId":"6855","inReplyTo":"er8d34$ssm$1@sea.gmane.org","subject":"Re: [PATCH] Attempt to improve git-rebase lead-in description.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-18T06:31:24Z","receivedAt":"2007-02-18T06:31:24Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> wrote:\n> Shawn O. Pearce wrote:\n> > +\n> > +The commits that were previously saved into the temporary area are\n> > +then reapplied to the current branch, one by one, in order.\n> \n> Which is true for git-format-patch/git-am --3way driven \"git rebase\",\n> but not for git-merge driven \"git rebase --merge\".\n> \n> The description is certainly more user-friendly, but I'd rather it avoid\n> mentioning saving to temporary area.\n\n[note: Jakub broke this thread and sent the message twice, once\n to me privately and again to the list.  I originally accidentally\n replied to Jakub's privately sent copy.]\n\nUhhh...  go read the source for `git-rebase -m`.  We still put the\ncommits into a temporary area (.git/.dotest-merge), except we store\njust their SHA-1 and message rather than the patch.  Its still a\ntemporary area.\n\nEven if we did not store the commits in a temporary area, they\nstill are conceptually, as the ODB is storing them, and they aren't\nconnected to a ref anymore, as the ref was reset.\n\nMy description is accurate, in either mode.\n\n-- \nShawn.\n"}]}