git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits
@ 2012-09-18 15:55 Andreas Schwab
  2012-09-18 18:27 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2012-09-18 15:55 UTC (permalink / raw)
  To: git

The note that explains that changes introduced by removed commits are
preserved should be placed directly after the paragraph that describes
such commits removal.  Otherwise the reference to "the commits" appears
out of context.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
---
 Documentation/git-filter-branch.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 15e7ac8..6e2d9ea 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -304,6 +304,11 @@ committed a merge between P1 and P2, it will be propagated properly
 and all children of the merge will become merge commits with P1,P2
 as their parents instead of the merge commit.
 
+*NOTE* the changes introduced by the commits, and which are not reverted
+by subsequent commits, will still be in the rewritten branch. If you want
+to throw out _changes_ together with the commits, you should use the
+interactive mode of 'git rebase'.
+
 You can rewrite the commit log messages using `--msg-filter`.  For
 example, 'git svn-id' strings in a repository created by 'git svn' can
 be removed this way:
@@ -329,11 +334,6 @@ git filter-branch --msg-filter '
 ' HEAD~10..HEAD
 --------------------------------------------------------
 
-*NOTE* the changes introduced by the commits, and which are not reverted
-by subsequent commits, will still be in the rewritten branch. If you want
-to throw out _changes_ together with the commits, you should use the
-interactive mode of 'git rebase'.
-
 
 Consider this history:
 
-- 
1.7.12


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits
  2012-09-18 15:55 [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits Andreas Schwab
@ 2012-09-18 18:27 ` Junio C Hamano
  2012-09-18 19:13   ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2012-09-18 18:27 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: git

Andreas Schwab <schwab@linux-m68k.org> writes:

> The note that explains that changes introduced by removed commits are
> preserved should be placed directly after the paragraph that describes
> such commits removal.  Otherwise the reference to "the commits" appears
> out of context.
>
> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
> ---
>  Documentation/git-filter-branch.txt | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
> index 15e7ac8..6e2d9ea 100644
> --- a/Documentation/git-filter-branch.txt
> +++ b/Documentation/git-filter-branch.txt
> @@ -304,6 +304,11 @@ committed a merge between P1 and P2, it will be propagated properly
>  and all children of the merge will become merge commits with P1,P2
>  as their parents instead of the merge commit.
>  
> +*NOTE* the changes introduced by the commits, and which are not reverted
> +by subsequent commits, will still be in the rewritten branch. If you want
> +to throw out _changes_ together with the commits, you should use the
> +interactive mode of 'git rebase'.
> +
>  You can rewrite the commit log messages using `--msg-filter`.  For
>  example, 'git svn-id' strings in a repository created by 'git svn' can
>  be removed this way:
> @@ -329,11 +334,6 @@ git filter-branch --msg-filter '
>  ' HEAD~10..HEAD
>  --------------------------------------------------------
>  
> -*NOTE* the changes introduced by the commits, and which are not reverted
> -by subsequent commits, will still be in the rewritten branch. If you want
> -to throw out _changes_ together with the commits, you should use the
> -interactive mode of 'git rebase'.
> -
>  
>  Consider this history:

Yeah, makes sense.  "Consider this history" that follows this
post-context is about "To restrict rewriting to only part of the
history, ..." so this section may need further line swapping,
though.  The the current text flows like this:

 * To remove commits, you can do this, and this even handles merges.

 * You can rewrite the log message with --msg-filter.

 * You can rewrite only part of the commit DAG with revision range.

 * You can add 'Acked-by' with --msg-filter.

 * Note that you may want to consider using "rebase -i" if you want
   to remove the changes.

 * Illustration of rewriting parts of commits.

but as you pointed out, "Note that" is better to be after "To remove
commits".  Also, "only part of the DAG with range" is better to be
immediately before the illustration.

So something like this instead?

 Documentation/git-filter-branch.txt | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git i/Documentation/git-filter-branch.txt w/Documentation/git-filter-branch.txt
index 15e7ac8..e2301f5 100644
--- i/Documentation/git-filter-branch.txt
+++ w/Documentation/git-filter-branch.txt
@@ -304,6 +304,11 @@ committed a merge between P1 and P2, it will be propagated properly
 and all children of the merge will become merge commits with P1,P2
 as their parents instead of the merge commit.
 
+*NOTE* the changes introduced by the commits, and which are not reverted
+by subsequent commits, will still be in the rewritten branch. If you want
+to throw out _changes_ together with the commits, you should use the
+interactive mode of 'git rebase'.
+
 You can rewrite the commit log messages using `--msg-filter`.  For
 example, 'git svn-id' strings in a repository created by 'git svn' can
 be removed this way:
@@ -314,11 +319,6 @@ git filter-branch --msg-filter '
 '
 -------------------------------------------------------
 
-To restrict rewriting to only part of the history, specify a revision
-range in addition to the new branch name.  The new branch name will
-point to the top-most revision that a 'git rev-list' of this range
-will print.
-
 If you need to add 'Acked-by' lines to, say, the last 10 commits (none
 of which is a merge), use this command:
 
@@ -329,11 +329,10 @@ git filter-branch --msg-filter '
 ' HEAD~10..HEAD
 --------------------------------------------------------
 
-*NOTE* the changes introduced by the commits, and which are not reverted
-by subsequent commits, will still be in the rewritten branch. If you want
-to throw out _changes_ together with the commits, you should use the
-interactive mode of 'git rebase'.
-
+To restrict rewriting to only part of the history, specify a revision
+range in addition to the new branch name.  The new branch name will
+point to the top-most revision that a 'git rev-list' of this range
+will print.
 
 Consider this history:
 

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

* Re: [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits
  2012-09-18 18:27 ` Junio C Hamano
@ 2012-09-18 19:13   ` Andreas Schwab
  2012-09-18 19:50     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2012-09-18 19:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano <gitster@pobox.com> writes:

> So something like this instead?

I agree it's even better.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits
  2012-09-18 19:13   ` Andreas Schwab
@ 2012-09-18 19:50     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2012-09-18 19:50 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: git

Andreas Schwab <schwab@linux-m68k.org> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> So something like this instead?
>
> I agree it's even better.
>
> Andreas.

Thanks for proofreading.  I'll squash in the differences to your
patch.

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

end of thread, other threads:[~2012-09-18 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 15:55 [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits Andreas Schwab
2012-09-18 18:27 ` Junio C Hamano
2012-09-18 19:13   ` Andreas Schwab
2012-09-18 19:50     ` Junio C Hamano

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).