{"thread":{"id":"31587","subject":"[PATCH] Documentation/git-filter-branch: Move note about effect of removing commits","startedAt":"2012-09-18T15:55:08Z","lastAt":"2012-09-18T19:50:05Z","messageCount":4,"participants":["Andreas Schwab","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"199375","messageId":"m2627biaw3.fsf@igel.home","threadId":"31587","inReplyTo":null,"subject":"[PATCH] Documentation/git-filter-branch: Move note about effect of removing commits","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2012-09-18T15:55:08Z","receivedAt":"2012-09-18T15:55:08Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"The note that explains that changes introduced by removed commits are\npreserved should be placed directly after the paragraph that describes\nsuch commits removal.  Otherwise the reference to \"the commits\" appears\nout of context.\n\nSigned-off-by: Andreas Schwab <schwab@linux-m68k.org>\n---\n Documentation/git-filter-branch.txt | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt\nindex 15e7ac8..6e2d9ea 100644\n--- a/Documentation/git-filter-branch.txt\n+++ b/Documentation/git-filter-branch.txt\n@@ -304,6 +304,11 @@ committed a merge between P1 and P2, it will be propagated properly\n and all children of the merge will become merge commits with P1,P2\n as their parents instead of the merge commit.\n \n+*NOTE* the changes introduced by the commits, and which are not reverted\n+by subsequent commits, will still be in the rewritten branch. If you want\n+to throw out _changes_ together with the commits, you should use the\n+interactive mode of 'git rebase'.\n+\n You can rewrite the commit log messages using `--msg-filter`.  For\n example, 'git svn-id' strings in a repository created by 'git svn' can\n be removed this way:\n@@ -329,11 +334,6 @@ git filter-branch --msg-filter '\n ' HEAD~10..HEAD\n --------------------------------------------------------\n \n-*NOTE* the changes introduced by the commits, and which are not reverted\n-by subsequent commits, will still be in the rewritten branch. If you want\n-to throw out _changes_ together with the commits, you should use the\n-interactive mode of 'git rebase'.\n-\n \n Consider this history:\n \n-- \n1.7.12\n\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"199384","messageId":"7vwqzrmbk1.fsf@alter.siamese.dyndns.org","threadId":"31587","inReplyTo":"m2627biaw3.fsf@igel.home","subject":"Re: [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-18T18:27:10Z","receivedAt":"2012-09-18T18:27:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Schwab <schwab@linux-m68k.org> writes:\n\n> The note that explains that changes introduced by removed commits are\n> preserved should be placed directly after the paragraph that describes\n> such commits removal.  Otherwise the reference to \"the commits\" appears\n> out of context.\n>\n> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>\n> ---\n>  Documentation/git-filter-branch.txt | 10 +++++-----\n>  1 file changed, 5 insertions(+), 5 deletions(-)\n>\n> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt\n> index 15e7ac8..6e2d9ea 100644\n> --- a/Documentation/git-filter-branch.txt\n> +++ b/Documentation/git-filter-branch.txt\n> @@ -304,6 +304,11 @@ committed a merge between P1 and P2, it will be propagated properly\n>  and all children of the merge will become merge commits with P1,P2\n>  as their parents instead of the merge commit.\n>  \n> +*NOTE* the changes introduced by the commits, and which are not reverted\n> +by subsequent commits, will still be in the rewritten branch. If you want\n> +to throw out _changes_ together with the commits, you should use the\n> +interactive mode of 'git rebase'.\n> +\n>  You can rewrite the commit log messages using `--msg-filter`.  For\n>  example, 'git svn-id' strings in a repository created by 'git svn' can\n>  be removed this way:\n> @@ -329,11 +334,6 @@ git filter-branch --msg-filter '\n>  ' HEAD~10..HEAD\n>  --------------------------------------------------------\n>  \n> -*NOTE* the changes introduced by the commits, and which are not reverted\n> -by subsequent commits, will still be in the rewritten branch. If you want\n> -to throw out _changes_ together with the commits, you should use the\n> -interactive mode of 'git rebase'.\n> -\n>  \n>  Consider this history:\n\nYeah, makes sense.  \"Consider this history\" that follows this\npost-context is about \"To restrict rewriting to only part of the\nhistory, ...\" so this section may need further line swapping,\nthough.  The the current text flows like this:\n\n * To remove commits, you can do this, and this even handles merges.\n\n * You can rewrite the log message with --msg-filter.\n\n * You can rewrite only part of the commit DAG with revision range.\n\n * You can add 'Acked-by' with --msg-filter.\n\n * Note that you may want to consider using \"rebase -i\" if you want\n   to remove the changes.\n\n * Illustration of rewriting parts of commits.\n\nbut as you pointed out, \"Note that\" is better to be after \"To remove\ncommits\".  Also, \"only part of the DAG with range\" is better to be\nimmediately before the illustration.\n\nSo something like this instead?\n\n Documentation/git-filter-branch.txt | 19 +++++++++----------\n 1 file changed, 9 insertions(+), 10 deletions(-)\n\ndiff --git i/Documentation/git-filter-branch.txt w/Documentation/git-filter-branch.txt\nindex 15e7ac8..e2301f5 100644\n--- i/Documentation/git-filter-branch.txt\n+++ w/Documentation/git-filter-branch.txt\n@@ -304,6 +304,11 @@ committed a merge between P1 and P2, it will be propagated properly\n and all children of the merge will become merge commits with P1,P2\n as their parents instead of the merge commit.\n \n+*NOTE* the changes introduced by the commits, and which are not reverted\n+by subsequent commits, will still be in the rewritten branch. If you want\n+to throw out _changes_ together with the commits, you should use the\n+interactive mode of 'git rebase'.\n+\n You can rewrite the commit log messages using `--msg-filter`.  For\n example, 'git svn-id' strings in a repository created by 'git svn' can\n be removed this way:\n@@ -314,11 +319,6 @@ git filter-branch --msg-filter '\n '\n -------------------------------------------------------\n \n-To restrict rewriting to only part of the history, specify a revision\n-range in addition to the new branch name.  The new branch name will\n-point to the top-most revision that a 'git rev-list' of this range\n-will print.\n-\n If you need to add 'Acked-by' lines to, say, the last 10 commits (none\n of which is a merge), use this command:\n \n@@ -329,11 +329,10 @@ git filter-branch --msg-filter '\n ' HEAD~10..HEAD\n --------------------------------------------------------\n \n-*NOTE* the changes introduced by the commits, and which are not reverted\n-by subsequent commits, will still be in the rewritten branch. If you want\n-to throw out _changes_ together with the commits, you should use the\n-interactive mode of 'git rebase'.\n-\n+To restrict rewriting to only part of the history, specify a revision\n+range in addition to the new branch name.  The new branch name will\n+point to the top-most revision that a 'git rev-list' of this range\n+will print.\n \n Consider this history:\n \n"},{"id":"199388","messageId":"m2wqzrgn58.fsf@igel.home","threadId":"31587","inReplyTo":"7vwqzrmbk1.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2012-09-18T19:13:23Z","receivedAt":"2012-09-18T19:13:23Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> So something like this instead?\n\nI agree it's even better.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"199398","messageId":"7v392fm7pu.fsf@alter.siamese.dyndns.org","threadId":"31587","inReplyTo":"m2wqzrgn58.fsf@igel.home","subject":"Re: [PATCH] Documentation/git-filter-branch: Move note about effect of removing commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-18T19:50:05Z","receivedAt":"2012-09-18T19:50:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Schwab <schwab@linux-m68k.org> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> So something like this instead?\n>\n> I agree it's even better.\n>\n> Andreas.\n\nThanks for proofreading.  I'll squash in the differences to your\npatch.\n"}]}