All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH 0/2] Improve rebase documenation
@ 2013-05-19 11:52 Philip Oakley
  2013-05-19 11:52 ` [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits Philip Oakley
  2013-05-19 11:52 ` [RFC/PATCH 2/2] Doc rebase: describe the priority of published work Philip Oakley
  0 siblings, 2 replies; 8+ messages in thread
From: Philip Oakley @ 2013-05-19 11:52 UTC (permalink / raw)
  To: GitList

Recent discussions have shown that rebase isn't as well understood as
as perhaps it should be for the basic user. 

Add a softer introductory paragraph to the man page description, and
in the second patch, add a second paragraph explaining the build up of
the command so that users have a historical context in which to
rationalise the command structure.

The second patch/paragraph will probably need the quoting checking as
to which are quoting the generic command and which are the same text
as a command example.

Basic wording is borrowed from on-list clarifications.

Philip Oakley (2):
  Doc rebase: Describe rebase as excluding merge commits
  Doc rebase: describe the priority of published work

 Documentation/git-rebase.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
1.8.1.msysgit.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits
  2013-05-19 11:52 [RFC/PATCH 0/2] Improve rebase documenation Philip Oakley
@ 2013-05-19 11:52 ` Philip Oakley
  2013-05-19 18:08   ` Jonathan Nieder
  2013-05-19 11:52 ` [RFC/PATCH 2/2] Doc rebase: describe the priority of published work Philip Oakley
  1 sibling, 1 reply; 8+ messages in thread
From: Philip Oakley @ 2013-05-19 11:52 UTC (permalink / raw)
  To: GitList

Describe rebase in the description section.

Include a softer paraphrased version from the crytic, well-loved,
but sometimes parodied, Name description, and tell users that merge
commits are excluded by default.

Signed-off-by: Philip Oakley <philipoakley@iee.org>

---

http://article.gmane.org/gmane.comp.version-control.git/217410
http://article.gmane.org/gmane.comp.version-control.git/217495
---
 Documentation/git-rebase.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index aca8405..87a8095 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -16,6 +16,10 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
+'git rebase' will transfer local commits, excluding merge commits
+by default, to the head of the branch's upstream, or onto a new base
+if given.
+
 If <branch> is specified, 'git rebase' will perform an automatic
 `git checkout <branch>` before doing anything else.  Otherwise
 it remains on the current branch.
-- 
1.8.1.msysgit.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RFC/PATCH 2/2] Doc rebase: describe the priority of published work
  2013-05-19 11:52 [RFC/PATCH 0/2] Improve rebase documenation Philip Oakley
  2013-05-19 11:52 ` [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits Philip Oakley
@ 2013-05-19 11:52 ` Philip Oakley
  1 sibling, 0 replies; 8+ messages in thread
From: Philip Oakley @ 2013-05-19 11:52 UTC (permalink / raw)
  To: GitList

Give details of the implied priority in the description section.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
wording based on:
http://article.gmane.org/gmane.comp.version-control.git/222581
http://article.gmane.org/gmane.comp.version-control.git/223816
http://article.gmane.org/gmane.comp.version-control.git/217410
http://article.gmane.org/gmane.comp.version-control.git/222763
---
 Documentation/git-rebase.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 87a8095..24d16ef 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -20,6 +20,12 @@ DESCRIPTION
 by default, to the head of the branch's upstream, or onto a new base
 if given.
 
+In its minimal form, having built locally on the (current) branch,
+use `git rebase` to catch up with its published upstream state to
+create a new linear history. Importantly, `git rebase` is a way to
+replay your work on top of the work of others. It is not about
+integrating other people's changes into your work.
+
 If <branch> is specified, 'git rebase' will perform an automatic
 `git checkout <branch>` before doing anything else.  Otherwise
 it remains on the current branch.
-- 
1.8.1.msysgit.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits
  2013-05-19 11:52 ` [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits Philip Oakley
@ 2013-05-19 18:08   ` Jonathan Nieder
  2013-05-19 22:41     ` Philip Oakley
  2013-05-20  4:43     ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Nieder @ 2013-05-19 18:08 UTC (permalink / raw)
  To: Philip Oakley; +Cc: GitList

Philip Oakley wrote:

> Describe rebase in the description section.

It already does that. :)  I think you mean "start with a summary",
which is a valuable improvement.

> Include a softer paraphrased version from the crytic, well-loved,
> but sometimes parodied, Name description, and tell users that merge
> commits are excluded by default.

I don't really follow this paragraph.  Are you saying "The NAME line
is cryptic, but let's copy it anyway, since it is better than nothing"?

[...]
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -16,6 +16,10 @@ SYNOPSIS
>  
>  DESCRIPTION
>  -----------
> +'git rebase' will transfer local commits, excluding merge commits
> +by default, to the head of the branch's upstream, or onto a new base
> +if given.
> +

Not about this patch, but some day it would be nice to standardize on
one tense for the DESCRIPTION sections of manpages.  Some git commands
use the imperative ("Reply local commits, excluding merge commits, on
top of ..."), some use the present indicative ("Replays local commits,
excluding merge commits, ..."), and some use the future ("Will replay
local commits, excluding merge commits, ...").

The traditional tense for Unix manpages is the present indicative.
But you are right to match the rest of the description here.

>  If <branch> is specified, 'git rebase' will perform an automatic
>  `git checkout <branch>` before doing anything else.  Otherwise
>  it remains on the current branch.

The description has become very long by now.  I wonder if it's
possible to break it into chunks, like so?

	DESCRIPTION
	-----------
	<brief description of the purpose of the command, including some token
	mention of *why* a user would want to use it (e.g., "so that the patches
	apply cleanly to their new base").>

	It proceeds using the following steps:

	 1. If <branch> is specified, ...
	 2. Decides which commits will need to be applied.
	    These are plain, non-merge commits that are ancestors of HEAD but
	    not of <upstream>.
	 3. Checks out <upstream>.  (<Explanation that technically it
	    detaches HEAD at this step.>)
	 4. Reapplies the commits listed on step (2), one by one, in order.
	    If merge failures are encountered, the program will exit and allow
	    the user to resolve them and resume or cancel the rebase.  See
	    the RESPONDING TO MERGE CONFLICTS section below for details.
	 5. Once all of the commits from step (2) have been applied, updates
	    <branch> to point to the new HEAD.

	The result is an updated <branch> that ...

	OPTIONS
	-------
	...

	EXAMPLES
	--------
	Assume the following history exists and the current branch is "topic":
	...

Description of specific options like "--preserve-merges" and "--onto"
could move out of the DESCRIPTION section and to the OPTIONS section.

What do you think?

Thanks,
Jonathan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits
  2013-05-19 18:08   ` Jonathan Nieder
@ 2013-05-19 22:41     ` Philip Oakley
  2013-05-20  4:43     ` Junio C Hamano
  1 sibling, 0 replies; 8+ messages in thread
From: Philip Oakley @ 2013-05-19 22:41 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: GitList

From: "Jonathan Nieder" <jrnieder@gmail.com>
Sent: Sunday, May 19, 2013 7:08 PM
> Philip Oakley wrote:
>
>> Describe rebase in the description section.
>
> It already does that. :)  I think you mean "start with a summary",
> which is a valuable improvement.
Yes.

>
>> Include a softer paraphrased version from the crytic, well-loved,
>> but sometimes parodied, Name description, and tell users that merge
>> commits are excluded by default.
>
> I don't really follow this paragraph.  Are you saying "The NAME line
> is cryptic, but let's copy it anyway, since it is better than 
> nothing"?

I was keeping the 'cryptic/esoteric' NAME line, because it is commented 
on in a few blogs [1]. It is accurate but let's not spoil those blogs...

The fundamental reason for the update was to introduce 'somewhere'  in 
the text the "excluding merge commits by default" note, and I couldn't 
find an easy way of updating the NAME line, and then realised a softer 
introduction wiould kill two birds with one stone.
>
> [...]
>> --- a/Documentation/git-rebase.txt
>> +++ b/Documentation/git-rebase.txt
>> @@ -16,6 +16,10 @@ SYNOPSIS
>>
>>  DESCRIPTION
>>  -----------
>> +'git rebase' will transfer local commits, excluding merge commits
>> +by default, to the head of the branch's upstream, or onto a new base
>> +if given.
>> +
>
> Not about this patch, but some day it would be nice to standardize on
> one tense for the DESCRIPTION sections of manpages.  Some git commands
> use the imperative ("Reply local commits, excluding merge commits, on
> top of ..."), some use the present indicative ("Replays local commits,
> excluding merge commits, ..."), and some use the future ("Will replay
> local commits, excluding merge commits, ...").
>
> The traditional tense for Unix manpages is the present indicative.
> But you are right to match the rest of the description here.
>
>>  If <branch> is specified, 'git rebase' will perform an automatic
>>  `git checkout <branch>` before doing anything else.  Otherwise
>>  it remains on the current branch.
>
> The description has become very long by now.  I wonder if it's
> possible to break it into chunks, like so?
>
> DESCRIPTION
> -----------
> <brief description of the purpose of the command, including some token
> mention of *why* a user would want to use it (e.g., "so that the 
> patches
> apply cleanly to their new base").>
>
> It proceeds using the following steps:
>
> 1. If <branch> is specified, ...
> 2. Decides which commits will need to be applied.
>     These are plain, non-merge commits that are ancestors of HEAD but
>     not of <upstream>.
> 3. Checks out <upstream>.  (<Explanation that technically it
>     detaches HEAD at this step.>)
> 4. Reapplies the commits listed on step (2), one by one, in order.
>     If merge failures are encountered, the program will exit and allow
>     the user to resolve them and resume or cancel the rebase.  See
>     the RESPONDING TO MERGE CONFLICTS section below for details.
> 5. Once all of the commits from step (2) have been applied, updates
>     <branch> to point to the new HEAD.
>
> The result is an updated <branch> that ...
>
> OPTIONS
> -------
> ...
>
> EXAMPLES
> --------
> Assume the following history exists and the current branch is "topic":
> ...
>
> Description of specific options like "--preserve-merges" and "--onto"
> could move out of the DESCRIPTION section and to the OPTIONS section.
>
> What do you think?

It's probably something I'd need help on (to ensure correctness). I'll 
have a go based on your suggestions in the next few days.

>
> Thanks,
> Jonathan
> --

[1] http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/ 
section 3 'update'. 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits
  2013-05-19 18:08   ` Jonathan Nieder
  2013-05-19 22:41     ` Philip Oakley
@ 2013-05-20  4:43     ` Junio C Hamano
  2013-05-20 21:55       ` Philip Oakley
  1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2013-05-20  4:43 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Philip Oakley, GitList

Jonathan Nieder <jrnieder@gmail.com> writes:

> Philip Oakley wrote:
>
>> Describe rebase in the description section.
>
> It already does that. :)  I think you mean "start with a summary",
> which is a valuable improvement.

It indeed is a good idea to give the "high-level introduction" at
the very beginning, but I do not think it should describe only one
of the three major modes of "git rebase" (i.e. no -m, no -i), like
the proposed patch text does.  We should instead say what it is used
for and why the user would want to use it that is common across
these modes at a very high level.

> 	DESCRIPTION
> 	-----------
> 	<brief description of the purpose of the command, including some token
> 	mention of *why* a user would want to use it (e.g., "so that the patches
> 	apply cleanly to their new base").>

Exactly.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits
  2013-05-20  4:43     ` Junio C Hamano
@ 2013-05-20 21:55       ` Philip Oakley
  2013-05-20 22:29         ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Oakley @ 2013-05-20 21:55 UTC (permalink / raw)
  To: Junio C Hamano, Jonathan Nieder; +Cc: GitList

From: "Junio C Hamano" <gitster@pobox.com>
Sent: Monday, May 20, 2013 5:43 AM
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> Philip Oakley wrote:
>>
>>> Describe rebase in the description section.
>>
>> It already does that. :)  I think you mean "start with a summary",
>> which is a valuable improvement.
>
> It indeed is a good idea to give the "high-level introduction" at
> the very beginning, but I do not think it should describe only one
> of the three major modes of "git rebase" (i.e. no -m, no -i), like
> the proposed patch text does.  We should instead say what it is used
> for and why the user would want to use it that is common across
> these modes at a very high level.

That would repeat the NAME issue (of trying too hard to be exact & 
precise). This introductory text is that "summary". The patch 2/2 should 
be the one for the extra detail of the various whys and wherefores - at 
least that was my intent.

>
>> DESCRIPTION
>> -----------
>> <brief description of the purpose of the command, including some 
>> token
>> mention of *why* a user would want to use it (e.g., "so that the 
>> patches
>> apply cleanly to their new base").>
>
> Exactly.
> --

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits
  2013-05-20 21:55       ` Philip Oakley
@ 2013-05-20 22:29         ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2013-05-20 22:29 UTC (permalink / raw)
  To: Philip Oakley; +Cc: Jonathan Nieder, GitList

"Philip Oakley" <philipoakley@iee.org> writes:

> From: "Junio C Hamano" <gitster@pobox.com>
> Sent: Monday, May 20, 2013 5:43 AM
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>>
>>> Philip Oakley wrote:
>>>
>>>> Describe rebase in the description section.
>>>
>>> It already does that. :)  I think you mean "start with a summary",
>>> which is a valuable improvement.
>>
>> It indeed is a good idea to give the "high-level introduction" at
>> the very beginning, but I do not think it should describe only one
>> of the three major modes of "git rebase" (i.e. no -m, no -i), like
>> the proposed patch text does.  We should instead say what it is used
>> for and why the user would want to use it that is common across
>> these modes at a very high level.
>
> That would repeat the NAME issue (of trying too hard to be exact &
> precise). This introductory text is that "summary".

If that is "summary", it should never talk about "skips merges",
which only applies to the mode without -m, no?

The highest level view of what the command is for (the motivation
why the user would want to consider learning how to use the command)
is "You have a history built on top of some commit, and you want to
rebuild the history on top of another commit, e.g. you earlier built
on the tip of a branch that has some other work, and you want to
rebuild the history on top of the updated tip of that other branch".

The details of how the history is "rebuilt" can differ while using
various modes of operation.  Some may skip merges, some may try to
preserve the topology, some may even let you insert new commits by
letting you tell it to stop in the middle.  That is not "summary"
but is part of mode specific description.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-20 22:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-19 11:52 [RFC/PATCH 0/2] Improve rebase documenation Philip Oakley
2013-05-19 11:52 ` [RFC/PATCH 1/2] Doc rebase: Describe rebase as excluding merge commits Philip Oakley
2013-05-19 18:08   ` Jonathan Nieder
2013-05-19 22:41     ` Philip Oakley
2013-05-20  4:43     ` Junio C Hamano
2013-05-20 21:55       ` Philip Oakley
2013-05-20 22:29         ` Junio C Hamano
2013-05-19 11:52 ` [RFC/PATCH 2/2] Doc rebase: describe the priority of published work Philip Oakley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.