{"thread":{"id":"41359","subject":"[PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","startedAt":"2016-02-06T20:25:41Z","lastAt":"2016-02-09T17:40:56Z","messageCount":9,"participants":["Matt McCutchen","Junio C Hamano","Mikko Rapeli"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"277707","messageId":"1454897459.2511.14.camel@mattmccutchen.net","threadId":"41359","inReplyTo":"1454790889.23898.225.camel@mattmccutchen.net","subject":"[PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Matt McCutchen","fromEmail":"matt@mattmccutchen.net","sentAt":"2016-02-06T20:25:41Z","receivedAt":"2016-02-06T20:25:41Z","isPatch":true,"sender":{"key":"matt@mattmccutchen.net","avatar":"https://avatars.githubusercontent.com/u/8885753?v=4"},"body":"I found no evidence of such behavior in the source code.\n\nSigned-off-by: Matt McCutchen <matt@mattmccutchen.net>\n---\nThis is based on the maint branch, a08595f.\n\nTry #2 to get correct email formatting.\n\n Documentation/git-clean.txt | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt\nindex 641681f..51a7e26 100644\n--- a/Documentation/git-clean.txt\n+++ b/Documentation/git-clean.txt\n@@ -37,9 +37,7 @@ OPTIONS\n \tto false, 'git clean' will refuse to delete files or directories\n \tunless given -f, -n or -i. Git will refuse to delete directories\n \twith .git sub directory or file unless a second -f\n-\tis given. This affects also git submodules where the storage area\n-\tof the removed submodule under .git/modules/ is not removed until\n-\t-f is given twice.\n+\tis given.\n \n -i::\n --interactive::\n-- \n2.5.0\n"},{"id":"277667","messageId":"1454790889.23898.225.camel@mattmccutchen.net","threadId":"41359","inReplyTo":null,"subject":"[PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Matt McCutchen","fromEmail":"matt@mattmccutchen.net","sentAt":"2016-02-06T20:34:49Z","receivedAt":"2016-02-06T20:34:49Z","isPatch":true,"sender":{"key":"matt@mattmccutchen.net","avatar":"https://avatars.githubusercontent.com/u/8885753?v=4"},"body":"I found no evidence of such behavior in the source code.\n\nSigned-off-by: Matt McCutchen <matt@mattmccutchen.net>\n---\n\nThis is based on the maint branch, a08595f.\n\n Documentation/git-clean.txt | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt\nindex 641681f..51a7e26 100644\n--- a/Documentation/git-clean.txt\n+++ b/Documentation/git-clean.txt\n@@ -37,9 +37,7 @@ OPTIONS\n \tto false, 'git clean' will refuse to delete files or directories\n \tunless given -f, -n or -i. Git will refuse to delete directories\n \twith .git sub directory or file unless a second -f\n-\tis given. This affects also git submodules where the storage area\n-\tof the removed submodule under .git/modules/ is not removed until\n-\t-f is given twice.\n+\tis given.\n \n -i::\n --interactive::\n-- \n2.5.0\n"},{"id":"277779","messageId":"xmqqvb5y6dx2.fsf@gitster.mtv.corp.google.com","threadId":"41359","inReplyTo":"1454790889.23898.225.camel@mattmccutchen.net","subject":"Re: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-02-08T22:22:01Z","receivedAt":"2016-02-08T22:22:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matt McCutchen <matt@mattmccutchen.net> writes:\n\n> I found no evidence of such behavior in the source code.\n>\n> Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>\n> ---\n\nThat was added last year at bcd57cb9 (Documentation/git-clean.txt:\ndocument that -f may need to be given twice, 2015-02-26).  It would\nbe better to know what got changed since then--that is, was the\nadditional text unnecessary even back then, or we made changes to\nthe system since then and forgot to remove the added text.\n\nMikko, is this need to give -f twice still the case?\n\n>\n> This is based on the maint branch, a08595f.\n>\n>  Documentation/git-clean.txt | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt\n> index 641681f..51a7e26 100644\n> --- a/Documentation/git-clean.txt\n> +++ b/Documentation/git-clean.txt\n> @@ -37,9 +37,7 @@ OPTIONS\n>  \tto false, 'git clean' will refuse to delete files or directories\n>  \tunless given -f, -n or -i. Git will refuse to delete directories\n>  \twith .git sub directory or file unless a second -f\n> -\tis given. This affects also git submodules where the storage area\n> -\tof the removed submodule under .git/modules/ is not removed until\n> -\t-f is given twice.\n> +\tis given.\n>  \n>  -i::\n>  --interactive::\n> -- \n> 2.5.0\n"},{"id":"277782","messageId":"1454971010.2511.89.camel@mattmccutchen.net","threadId":"41359","inReplyTo":"xmqqvb5y6dx2.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Matt McCutchen","fromEmail":"matt@mattmccutchen.net","sentAt":"2016-02-08T22:36:50Z","receivedAt":"2016-02-08T22:36:50Z","isPatch":true,"sender":{"key":"matt@mattmccutchen.net","avatar":"https://avatars.githubusercontent.com/u/8885753?v=4"},"body":"On Mon, 2016-02-08 at 14:22 -0800, Junio C Hamano wrote:\n> Matt McCutchen <matt@mattmccutchen.net> writes:\n> \n> > I found no evidence of such behavior in the source code.\n> > \n> > Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>\n> > ---\n> \n> That was added last year at bcd57cb9 (Documentation/git-clean.txt:\n> document that -f may need to be given twice, 2015-02-26).  It would\n> be better to know what got changed since then--that is, was the\n> additional text unnecessary even back then, or we made changes to\n> the system since then and forgot to remove the added text.\n> \n> Mikko, is this need to give -f twice still the case?\n\nI know you probably want confirmation from Mikko, but I'll offer my\nunderstanding.  There were two statements added in bcd57cb9:\n\n1. -f may need to be given twice to delete nested worktrees and\nembedded repositories.  This is still true.\n\n2. Deletion of submodule repositories under .git/modules is conditional\non -f being given twice.  AFAICT, this was wrong even back then: \"git\nclean\" has never deleted such repositories under any conditions.\n\nMy patch is only removing #2.\n\nMatt\n"},{"id":"277784","messageId":"20160208224739.GH6104@lakka.kapsi.fi","threadId":"41359","inReplyTo":"1454971010.2511.89.camel@mattmccutchen.net","subject":"Re: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Mikko Rapeli","fromEmail":"mikko.rapeli@iki.fi","sentAt":"2016-02-08T22:47:39Z","receivedAt":"2016-02-08T22:47:39Z","isPatch":true,"sender":{"key":"mikko.rapeli@iki.fi","avatar":"https://avatars.githubusercontent.com/u/2036278?v=4"},"body":"On Mon, Feb 08, 2016 at 05:36:50PM -0500, Matt McCutchen wrote:\n> On Mon, 2016-02-08 at 14:22 -0800, Junio C Hamano wrote:\n> > Matt McCutchen <matt@mattmccutchen.net> writes:\n> > \n> > > I found no evidence of such behavior in the source code.\n> > > \n> > > Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>\n> > > ---\n> > \n> > That was added last year at bcd57cb9 (Documentation/git-clean.txt:\n> > document that -f may need to be given twice, 2015-02-26).  It would\n> > be better to know what got changed since then--that is, was the\n> > additional text unnecessary even back then, or we made changes to\n> > the system since then and forgot to remove the added text.\n> > \n> > Mikko, is this need to give -f twice still the case?\n> \n> I know you probably want confirmation from Mikko, but I'll offer my\n> understanding.  There were two statements added in bcd57cb9:\n> \n> 1. -f may need to be given twice to delete nested worktrees and\n> embedded repositories.  This is still true.\n>\n> 2. Deletion of submodule repositories under .git/modules is conditional\n> on -f being given twice.  AFAICT, this was wrong even back then: \"git\n> clean\" has never deleted such repositories under any conditions.\n\nThis is the use case which I've used double -f at work with several build\njobs but with older 1:1.7.9.5-1ubuntu0.2 (Ubuntu 12.04) and 1:1.9.1-1ubuntu0.2\n(Ubuntu 14.04) versions of git.\n\nBut I can confirm that git version 1:2.7.0~rc3-1 (Debian unstable) is no\nlonger removing the git submodule trees from .git/modules with double -f.\n\nAt work, we really want to remove the .git/modules subtrees since we want to\ntest changes to .git/modules structure via normal commits to the git trees.\nThus we need a way removing all non-tracked files from the git tree\nwhich includes obsolete (or for test only) git submodule trees.\n\nI will test the old versions tomorrow again. Maybe in older git versions\nthe code path from 1) deletes also the git modules from 2).\n\n-Mikko\n"},{"id":"277790","messageId":"xmqq4mdi69ti.fsf@gitster.mtv.corp.google.com","threadId":"41359","inReplyTo":"1454971010.2511.89.camel@mattmccutchen.net","subject":"Re: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-02-08T23:50:33Z","receivedAt":"2016-02-08T23:50:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matt McCutchen <matt@mattmccutchen.net> writes:\n\n> On Mon, 2016-02-08 at 14:22 -0800, Junio C Hamano wrote:\n>> Matt McCutchen <matt@mattmccutchen.net> writes:\n>> \n>> > I found no evidence of such behavior in the source code.\n>> > \n>> > Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>\n>> > ---\n>> \n>> That was added last year at bcd57cb9 (Documentation/git-clean.txt:\n>> document that -f may need to be given twice, 2015-02-26).  It would\n>> be better to know what got changed since then--that is, was the\n>> additional text unnecessary even back then, or we made changes to\n>> the system since then and forgot to remove the added text.\n>> \n>> Mikko, is this need to give -f twice still the case?\n>\n> I know you probably want confirmation from Mikko, but I'll offer my\n> understanding.  There were two statements added in bcd57cb9:\n>\n> 1. -f may need to be given twice to delete nested worktrees and\n> embedded repositories.  This is still true.\n>\n> 2. Deletion of submodule repositories under .git/modules is conditional\n> on -f being given twice.  AFAICT, this was wrong even back then: \"git\n> clean\" has never deleted such repositories under any conditions.\n>\n> My patch is only removing #2.\n>\n> Matt\n\nThanks for clarification.\n\n\"The latter half, the removal of the submodules, was never done with\ndouble -f back when the sentence was written, and we still do not do\nso.\" or \"Back when the sentence was written, we used to require\ndouble -f, and we fixed that at commit X but forgot to update this\ntext.\" are two possibilities, and either one explains and justifies\nthis change even stronger than \"There is no code to do such thing in\ntoday's version.\" and that is where my question came from.\n"},{"id":"277793","messageId":"20160209075553.GI6104@lakka.kapsi.fi","threadId":"41359","inReplyTo":"20160208224739.GH6104@lakka.kapsi.fi","subject":"Re: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Mikko Rapeli","fromEmail":"mikko.rapeli@iki.fi","sentAt":"2016-02-09T07:55:53Z","receivedAt":"2016-02-09T07:55:53Z","isPatch":true,"sender":{"key":"mikko.rapeli@iki.fi","avatar":"https://avatars.githubusercontent.com/u/2036278?v=4"},"body":"On Tue, Feb 09, 2016 at 12:47:39AM +0200, Mikko Rapeli wrote:\n> On Mon, Feb 08, 2016 at 05:36:50PM -0500, Matt McCutchen wrote:\n> > On Mon, 2016-02-08 at 14:22 -0800, Junio C Hamano wrote:\n> > > Matt McCutchen <matt@mattmccutchen.net> writes:\n> > > \n> > > > I found no evidence of such behavior in the source code.\n> > > > \n> > > > Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>\n> > > > ---\n> > > \n> > > That was added last year at bcd57cb9 (Documentation/git-clean.txt:\n> > > document that -f may need to be given twice, 2015-02-26).  It would\n> > > be better to know what got changed since then--that is, was the\n> > > additional text unnecessary even back then, or we made changes to\n> > > the system since then and forgot to remove the added text.\n> > > \n> > > Mikko, is this need to give -f twice still the case?\n> > \n> > I know you probably want confirmation from Mikko, but I'll offer my\n> > understanding.  There were two statements added in bcd57cb9:\n> > \n> > 1. -f may need to be given twice to delete nested worktrees and\n> > embedded repositories.  This is still true.\n> >\n> > 2. Deletion of submodule repositories under .git/modules is conditional\n> > on -f being given twice.  AFAICT, this was wrong even back then: \"git\n> > clean\" has never deleted such repositories under any conditions.\n> \n> This is the use case which I've used double -f at work with several build\n> jobs but with older 1:1.7.9.5-1ubuntu0.2 (Ubuntu 12.04) and 1:1.9.1-1ubuntu0.2\n> (Ubuntu 14.04) versions of git.\n\nSorry, can't reproduce the problem where submodules stayed in the tree until\ngit clean was called with two -f's.\n\nYou are right in removing the second part.\n\n> But I can confirm that git version 1:2.7.0~rc3-1 (Debian unstable) is no\n> longer removing the git submodule trees from .git/modules with double -f.\n> \n> At work, we really want to remove the .git/modules subtrees since we want to\n> test changes to .git/modules structure via normal commits to the git trees.\n> Thus we need a way removing all non-tracked files from the git tree\n> which includes obsolete (or for test only) git submodule trees.\n\nThis usecase does not exists in git then. Using gerrit topics git branches\nto test changes to submodule structure does not work since there is no way of\nundoing these changes from the working tree.\n\nI should not have started using submodules in the first place, sigh.\n\n-Mikko\n"},{"id":"277804","messageId":"xmqqpow54wkh.fsf@gitster.mtv.corp.google.com","threadId":"41359","inReplyTo":"20160209075553.GI6104@lakka.kapsi.fi","subject":"Re: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-02-09T17:34:22Z","receivedAt":"2016-02-09T17:34:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mikko Rapeli <mikko.rapeli@iki.fi> writes:\n\n> Sorry, can't reproduce the problem where submodules stayed in the tree until\n> git clean was called with two -f's.\n>\n> You are right in removing the second part.\n\nThanks, then let's do this.\n\n-- >8 --\nFrom: Matt McCutchen <matt@mattmccutchen.net>\nDate: Sat, 6 Feb 2016 15:25:41 -0500\nSubject: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*\n\nThe latter half fo this sentence, the removal of the submodules, was\nnever done with (or without) double -f back when it was written, and\nwe still do not do so.\n\nSigned-off-by: Matt McCutchen <matt@mattmccutchen.net>\nAcked-by: Mikko Rapeli <mikko.rapeli@iki.fi>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-clean.txt | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt\nindex 641681f..51a7e26 100644\n--- a/Documentation/git-clean.txt\n+++ b/Documentation/git-clean.txt\n@@ -37,9 +37,7 @@ OPTIONS\n \tto false, 'git clean' will refuse to delete files or directories\n \tunless given -f, -n or -i. Git will refuse to delete directories\n \twith .git sub directory or file unless a second -f\n-\tis given. This affects also git submodules where the storage area\n-\tof the removed submodule under .git/modules/ is not removed until\n-\t-f is given twice.\n+\tis given.\n \n -i::\n --interactive::\n-- \n2.7.1-358-gd2e280b\n"},{"id":"277806","messageId":"1455039656.2511.177.camel@mattmccutchen.net","threadId":"41359","inReplyTo":"xmqqpow54wkh.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Documentation/git-clean.txt: don't mention deletion of .git/modules/*","fromName":"Matt McCutchen","fromEmail":"matt@mattmccutchen.net","sentAt":"2016-02-09T17:40:56Z","receivedAt":"2016-02-09T17:40:56Z","isPatch":true,"sender":{"key":"matt@mattmccutchen.net","avatar":"https://avatars.githubusercontent.com/u/8885753?v=4"},"body":"On Tue, 2016-02-09 at 09:34 -0800, Junio C Hamano wrote:\n> Mikko Rapeli <mikko.rapeli@iki.fi> writes:\n> \n> > Sorry, can't reproduce the problem where submodules stayed in the\n> > tree until\n> > git clean was called with two -f's.\n> > \n> > You are right in removing the second part.\n> \n> Thanks, then let's do this.\n\nLooks good except for a typo (below).  I'll try to write better commit\nmessages in the future.\n\n> -- >8 --\n> From: Matt McCutchen <matt@mattmccutchen.net>\n> Date: Sat, 6 Feb 2016 15:25:41 -0500\n> Subject: [PATCH] Documentation/git-clean.txt: don't mention deletion\n> of .git/modules/*\n> \n> The latter half fo\n\nof\n\n> this sentence, the removal of the submodules, was\n> never done with (or without) double -f back when it was written, and\n> we still do not do so.\n> \n> Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>\n> Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  Documentation/git-clean.txt | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n> \n> diff --git a/Documentation/git-clean.txt b/Documentation/git-\n> clean.txt\n> index 641681f..51a7e26 100644\n> --- a/Documentation/git-clean.txt\n> +++ b/Documentation/git-clean.txt\n> @@ -37,9 +37,7 @@ OPTIONS\n>  \tto false, 'git clean' will refuse to delete files or\n> directories\n>  \tunless given -f, -n or -i. Git will refuse to delete\n> directories\n>  \twith .git sub directory or file unless a second -f\n> -\tis given. This affects also git submodules where the storage\n> area\n> -\tof the removed submodule under .git/modules/ is not removed\n> until\n> -\t-f is given twice.\n> +\tis given.\n>  \n>  -i::\n>  --interactive::\n"}]}