{"thread":{"id":"46978","subject":"[PATCH] doc: list filter-branch subdirectory-filter first","startedAt":"2017-10-16T23:17:20Z","lastAt":"2017-10-18T00:11:22Z","messageCount":4,"participants":["David Glasser","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"330492","messageId":"0102015f277a12fe-c69362e3-b14c-4b5c-abaa-4693fd6632c2-000000@eu-west-1.amazonses.com","threadId":"46978","inReplyTo":null,"subject":"[PATCH] doc: list filter-branch subdirectory-filter first","fromName":"David Glasser","fromEmail":"glasser@meteor.com","sentAt":"2017-10-16T23:17:12Z","receivedAt":"2017-10-16T23:17:20Z","isPatch":true,"sender":{"key":"glasser@meteor.com","avatar":null},"body":"From: David Glasser <glasser@davidglasser.net>\n\nThe docs claim that filters are applied in the listed order, so\nsubdirectory-filter should come first.\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 9e5169aa64f4f..605583c0ad2b5 100644\n--- a/Documentation/git-filter-branch.txt\n+++ b/Documentation/git-filter-branch.txt\n@@ -89,6 +89,11 @@ OPTIONS\n \tcan be used or modified in the following filter steps except\n \tthe commit filter, for technical reasons.\n \n+--subdirectory-filter <directory>::\n+\tOnly look at the history which touches the given subdirectory.\n+\tThe result will contain that directory (and only that) as its\n+\tproject root. Implies <<Remap_to_ancestor>>.\n+\n --env-filter <command>::\n \tThis filter may be used if you only need to modify the environment\n \tin which the commit will be performed.  Specifically, you might\n@@ -167,11 +172,6 @@ be removed, buyer beware. There is also no support for changing the\n author or timestamp (or the tag message for that matter). Tags which point\n to other tags will be rewritten to point to the underlying commit.\n \n---subdirectory-filter <directory>::\n-\tOnly look at the history which touches the given subdirectory.\n-\tThe result will contain that directory (and only that) as its\n-\tproject root. Implies <<Remap_to_ancestor>>.\n-\n --prune-empty::\n \tSome filters will generate empty commits that leave the tree untouched.\n \tThis option instructs git-filter-branch to remove such commits if they\n\n--\nhttps://github.com/git/git/pull/415\n"},{"id":"330507","messageId":"xmqqy3oapk3u.fsf@gitster.mtv.corp.google.com","threadId":"46978","inReplyTo":"0102015f277a12fe-c69362e3-b14c-4b5c-abaa-4693fd6632c2-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH] doc: list filter-branch subdirectory-filter first","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-17T02:46:13Z","receivedAt":"2017-10-17T02:46:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Glasser <glasser@meteor.com> writes:\n\n> From: David Glasser <glasser@davidglasser.net>\n>\n> The docs claim that filters are applied in the listed order, so\n> subdirectory-filter should come first.\n> ---\n>  Documentation/git-filter-branch.txt | 10 +++++-----\n>  1 file changed, 5 insertions(+), 5 deletions(-)\n\nGood.  Could you sign it off?\n\nSomewhat related tangent is that we may want to also reorder the\noutput from \"git filter-branch -h\" to the order of filter\napplication.  For that matter, the order in which the SYNOPSIS\nsection lists these command line arguments may want to match, both\nfor consistency and as an extra reminder to the users.\n\n"},{"id":"330539","messageId":"0102015f29b9128b-a8d6e31c-06f5-421c-989a-230a484482d3-000000@eu-west-1.amazonses.com","threadId":"46978","inReplyTo":"0102015f277a12fe-c69362e3-b14c-4b5c-abaa-4693fd6632c2-000000@eu-west-1.amazonses.com","subject":"[PATCH v2] doc: list filter-branch subdirectory-filter first","fromName":"David Glasser","fromEmail":"glasser@meteor.com","sentAt":"2017-10-17T09:45:15Z","receivedAt":"2017-10-17T09:45:24Z","isPatch":true,"sender":{"key":"glasser@meteor.com","avatar":null},"body":"From: David Glasser <glasser@davidglasser.net>\n\nThe docs claim that filters are applied in the listed order, so\nsubdirectory-filter should come first.\n\nFor consistency, apply the same order to the SYNOPSIS and the script's usage, as\nwell as the switch while parsing arguments.\n\nAdd missing --prune-empty to the script's usage.\n\nSigned-off-by: David Glasser <glasser@davidglasser.net>\n---\n Documentation/git-filter-branch.txt | 20 ++++++++++----------\n git-filter-branch.sh                | 20 ++++++++++----------\n 2 files changed, 20 insertions(+), 20 deletions(-)\n\ndiff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt\nindex 9e5169aa64f4f..394f74451a659 100644\n--- a/Documentation/git-filter-branch.txt\n+++ b/Documentation/git-filter-branch.txt\n@@ -8,11 +8,11 @@ git-filter-branch - Rewrite branches\n SYNOPSIS\n --------\n [verse]\n-'git filter-branch' [--setup <command>] [--env-filter <command>]\n-\t[--tree-filter <command>] [--index-filter <command>]\n-\t[--parent-filter <command>] [--msg-filter <command>]\n-\t[--commit-filter <command>] [--tag-name-filter <command>]\n-\t[--subdirectory-filter <directory>] [--prune-empty]\n+'git filter-branch' [--setup <command>] [--subdirectory-filter <directory>]\n+\t[--env-filter <command>] [--tree-filter <command>]\n+\t[--index-filter <command>] [--parent-filter <command>]\n+\t[--msg-filter <command>] [--commit-filter <command>]\n+\t[--tag-name-filter <command>] [--prune-empty]\n \t[--original <namespace>] [-d <directory>] [-f | --force]\n \t[--] [<rev-list options>...]\n \n@@ -89,6 +89,11 @@ OPTIONS\n \tcan be used or modified in the following filter steps except\n \tthe commit filter, for technical reasons.\n \n+--subdirectory-filter <directory>::\n+\tOnly look at the history which touches the given subdirectory.\n+\tThe result will contain that directory (and only that) as its\n+\tproject root. Implies <<Remap_to_ancestor>>.\n+\n --env-filter <command>::\n \tThis filter may be used if you only need to modify the environment\n \tin which the commit will be performed.  Specifically, you might\n@@ -167,11 +172,6 @@ be removed, buyer beware. There is also no support for changing the\n author or timestamp (or the tag message for that matter). Tags which point\n to other tags will be rewritten to point to the underlying commit.\n \n---subdirectory-filter <directory>::\n-\tOnly look at the history which touches the given subdirectory.\n-\tThe result will contain that directory (and only that) as its\n-\tproject root. Implies <<Remap_to_ancestor>>.\n-\n --prune-empty::\n \tSome filters will generate empty commits that leave the tree untouched.\n \tThis option instructs git-filter-branch to remove such commits if they\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 3a74602ef3771..b7827e745a92a 100755\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -81,12 +81,12 @@ set_ident () {\n \tfinish_ident COMMITTER\n }\n \n-USAGE=\"[--setup <command>] [--env-filter <command>]\n-\t[--tree-filter <command>] [--index-filter <command>]\n-\t[--parent-filter <command>] [--msg-filter <command>]\n-\t[--commit-filter <command>] [--tag-name-filter <command>]\n-\t[--subdirectory-filter <directory>] [--original <namespace>]\n-\t[-d <directory>] [-f | --force]\n+USAGE=\"[--setup <command>] [--subdirectory-filter <directory>]\n+\t[--env-filter <command>] [--tree-filter <command>]\n+\t[--index-filter <command>] [--parent-filter <command>]\n+\t[--msg-filter <command>] [--commit-filter <command>]\n+\t[--tag-name-filter <command>] [--prune-empty]\n+\t[--original <namespace>] [-d <directory>] [-f | --force]\n \t[--] [<rev-list options>...]\"\n \n OPTIONS_SPEC=\n@@ -153,6 +153,10 @@ do\n \t--setup)\n \t\tfilter_setup=\"$OPTARG\"\n \t\t;;\n+\t--subdirectory-filter)\n+\t\tfilter_subdir=\"$OPTARG\"\n+\t\tremap_to_ancestor=t\n+\t\t;;\n \t--env-filter)\n \t\tfilter_env=\"$OPTARG\"\n \t\t;;\n@@ -174,10 +178,6 @@ do\n \t--tag-name-filter)\n \t\tfilter_tag_name=\"$OPTARG\"\n \t\t;;\n-\t--subdirectory-filter)\n-\t\tfilter_subdir=\"$OPTARG\"\n-\t\tremap_to_ancestor=t\n-\t\t;;\n \t--original)\n \t\torig_namespace=$(expr \"$OPTARG/\" : '\\(.*[^/]\\)/*$')/\n \t\t;;\n\n--\nhttps://github.com/git/git/pull/415\n"},{"id":"330584","messageId":"xmqq7evtmi1o.fsf@gitster.mtv.corp.google.com","threadId":"46978","inReplyTo":"0102015f29b9128b-a8d6e31c-06f5-421c-989a-230a484482d3-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH v2] doc: list filter-branch subdirectory-filter first","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-18T00:11:15Z","receivedAt":"2017-10-18T00:11:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Glasser <glasser@meteor.com> writes:\n\n> From: David Glasser <glasser@davidglasser.net>\n>\n> The docs claim that filters are applied in the listed order, so\n> subdirectory-filter should come first.\n>\n> For consistency, apply the same order to the SYNOPSIS and the script's usage, as\n> well as the switch while parsing arguments.\n>\n> Add missing --prune-empty to the script's usage.\n>\n> Signed-off-by: David Glasser <glasser@davidglasser.net>\n> ---\n\nThanks for being extra careful.  Will queue.\n"}]}