* [PATCH] Attempt to improve git-rebase lead-in description.
@ 2007-02-17 9:31 Shawn O. Pearce
2007-02-18 2:21 ` Jakub Narebski
0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-02-17 9:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
It was mentioned on #git this morning that the lead-in description
of git-rebase is very confusing. Too many branch this and branch
that in a very short run of text.
This new description attempts to walk the user through the command
syntax, while also describing exactly what git-rebase is doing to
their repository.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
Documentation/git-rebase.txt | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index f2ef1f7..a66b2d7 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -13,11 +13,20 @@ SYNOPSIS
DESCRIPTION
-----------
-git-rebase replaces <branch> with a new branch of the same name. When
-the --onto option is provided the new branch starts out with a HEAD equal
-to <newbase>, otherwise it is equal to <upstream>. It then attempts to
-create a new commit for each commit from the original <branch> that does
-not exist in the <upstream> branch.
+If <branch> is specified, git-rebase will perform an automatic
+`git checkout <branch>` before doing anything else. Otherwise
+it remains on the current branch.
+
+All changes made by commits in the current branch but that are not
+in <upstream> are saved to a temporary area. This is the same set
+of commits that would be shown by `git log <upstream>..HEAD`.
+
+The current branch is reset to <upstream>, or <newbase> if the
+--onto option was supplied. This has the exact same effect as
+`git reset --hard <upstream>` (or <newbase>).
+
+The commits that were previously saved into the temporary area are
+then reapplied to the current branch, one by one, in order.
It is possible that a merge failure will prevent this process from being
completely automatic. You will have to resolve any such merge failure
@@ -26,9 +35,6 @@ that caused the merge failure with `git rebase --skip`. To restore the
original <branch> and remove the .dotest working files, use the command
`git rebase --abort` instead.
-Note that if <branch> is not specified on the command line, the currently
-checked out branch is used.
-
Assume the following history exists and the current branch is "topic":
------------
--
1.5.0.552.ge1b1c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Attempt to improve git-rebase lead-in description.
2007-02-17 9:31 [PATCH] Attempt to improve git-rebase lead-in description Shawn O. Pearce
@ 2007-02-18 2:21 ` Jakub Narebski
2007-02-18 6:31 ` Shawn O. Pearce
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Narebski @ 2007-02-18 2:21 UTC (permalink / raw)
To: git
Shawn O. Pearce wrote:
> +
> +The commits that were previously saved into the temporary area are
> +then reapplied to the current branch, one by one, in order.
Which is true for git-format-patch/git-am --3way driven "git rebase",
but not for git-merge driven "git rebase --merge".
The description is certainly more user-friendly, but I'd rather it avoid
mentioning saving to temporary area.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Attempt to improve git-rebase lead-in description.
2007-02-18 2:21 ` Jakub Narebski
@ 2007-02-18 6:31 ` Shawn O. Pearce
0 siblings, 0 replies; 3+ messages in thread
From: Shawn O. Pearce @ 2007-02-18 6:31 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski <jnareb@gmail.com> wrote:
> Shawn O. Pearce wrote:
> > +
> > +The commits that were previously saved into the temporary area are
> > +then reapplied to the current branch, one by one, in order.
>
> Which is true for git-format-patch/git-am --3way driven "git rebase",
> but not for git-merge driven "git rebase --merge".
>
> The description is certainly more user-friendly, but I'd rather it avoid
> mentioning saving to temporary area.
[note: Jakub broke this thread and sent the message twice, once
to me privately and again to the list. I originally accidentally
replied to Jakub's privately sent copy.]
Uhhh... go read the source for `git-rebase -m`. We still put the
commits into a temporary area (.git/.dotest-merge), except we store
just their SHA-1 and message rather than the patch. Its still a
temporary area.
Even if we did not store the commits in a temporary area, they
still are conceptually, as the ODB is storing them, and they aren't
connected to a ref anymore, as the ref was reset.
My description is accurate, in either mode.
--
Shawn.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-18 6:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-17 9:31 [PATCH] Attempt to improve git-rebase lead-in description Shawn O. Pearce
2007-02-18 2:21 ` Jakub Narebski
2007-02-18 6:31 ` Shawn O. Pearce
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).