{"thread":{"id":"31099","subject":"[PATCH] Make 'git submodule update --force' always check out submodules.","startedAt":"2012-07-25T18:03:32Z","lastAt":"2012-08-17T03:23:57Z","messageCount":5,"participants":["Stefan Zager","Junio C Hamano","Jens Lehmann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"195772","messageId":"1343239412-26780-1-git-send-email-szager@google.com","threadId":"31099","inReplyTo":null,"subject":"[PATCH] Make 'git submodule update --force' always check out submodules.","fromName":"Stefan Zager","fromEmail":"szager@google.com","sentAt":"2012-07-25T18:03:32Z","receivedAt":"2012-07-25T18:03:32Z","isPatch":true,"sender":{"key":"szager@google.com","avatar":null},"body":"Currently, it will only do a checkout if the sha1 registered in the containing\nrepository doesn't match the HEAD of the submodule, regardless of whether the\nsubmodule is dirty.  As discussed on the mailing list, the '--force' flag is a\nstrong indicator that the state of the submodule is suspect, and should be reset\nto HEAD.\n\nSigned-off-by: Stefan Zager <szager@google.com>\n---\n git-submodule.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex dba4d39..621eff7 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -575,7 +575,7 @@ Maybe you want to use 'update --init'?\")\"\n \t\t\tdie \"$(eval_gettext \"Unable to find current revision in submodule path '\\$sm_path'\")\"\n \t\tfi\n \n-\t\tif test \"$subsha1\" != \"$sha1\"\n+\t\tif test \"$subsha1\" != \"$sha1\" -o -n \"$force\"\n \t\tthen\n \t\t\tsubforce=$force\n \t\t\t# If we don't already have a -f flag and the submodule has never been checked out\n-- \n1.7.11.rc2\n"},{"id":"195775","messageId":"7vipdbbs0b.fsf@alter.siamese.dyndns.org","threadId":"31099","inReplyTo":"1343239412-26780-1-git-send-email-szager@google.com","subject":"Re: [PATCH] Make 'git submodule update --force' always check out submodules.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-25T18:44:04Z","receivedAt":"2012-07-25T18:44:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Zager <szager@google.com> writes:\n\n> Currently, it will only do a checkout if the sha1 registered in the containing\n> repository doesn't match the HEAD of the submodule, regardless of whether the\n> submodule is dirty.  As discussed on the mailing list, the '--force' flag is a\n> strong indicator that the state of the submodule is suspect, and should be reset\n> to HEAD.\n>\n> Signed-off-by: Stefan Zager <szager@google.com>\n> ---\n\nLooks sensible (again -- see http://thread.gmane.org/gmane.comp.version-control.git/197532\nfor the original discussion).  Can submodule folks Ack it?\n\nThanks.\n\n\n>  git-submodule.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index dba4d39..621eff7 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -575,7 +575,7 @@ Maybe you want to use 'update --init'?\")\"\n>  \t\t\tdie \"$(eval_gettext \"Unable to find current revision in submodule path '\\$sm_path'\")\"\n>  \t\tfi\n>  \n> -\t\tif test \"$subsha1\" != \"$sha1\"\n> +\t\tif test \"$subsha1\" != \"$sha1\" -o -n \"$force\"\n>  \t\tthen\n>  \t\t\tsubforce=$force\n>  \t\t\t# If we don't already have a -f flag and the submodule has never been checked out\n"},{"id":"195786","messageId":"50105C60.4050303@web.de","threadId":"31099","inReplyTo":"7vipdbbs0b.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Make 'git submodule update --force' always check out submodules.","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2012-07-25T20:51:44Z","receivedAt":"2012-07-25T20:51:44Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 25.07.2012 20:44, schrieb Junio C Hamano:\n> Stefan Zager <szager@google.com> writes:\n> \n>> Currently, it will only do a checkout if the sha1 registered in the containing\n>> repository doesn't match the HEAD of the submodule, regardless of whether the\n>> submodule is dirty.  As discussed on the mailing list, the '--force' flag is a\n>> strong indicator that the state of the submodule is suspect, and should be reset\n>> to HEAD.\n>>\n>> Signed-off-by: Stefan Zager <szager@google.com>\n>> ---\n> \n> Looks sensible (again -- see http://thread.gmane.org/gmane.comp.version-control.git/197532\n> for the original discussion).  Can submodule folks Ack it?\n\nI like it. Still I'd vote for amending the documentation like the\noriginal thread proposed and would appreciate to have a test or two,\nbut apart from that I have no objections.\n\n>>  git-submodule.sh | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/git-submodule.sh b/git-submodule.sh\n>> index dba4d39..621eff7 100755\n>> --- a/git-submodule.sh\n>> +++ b/git-submodule.sh\n>> @@ -575,7 +575,7 @@ Maybe you want to use 'update --init'?\")\"\n>>  \t\t\tdie \"$(eval_gettext \"Unable to find current revision in submodule path '\\$sm_path'\")\"\n>>  \t\tfi\n>>  \n>> -\t\tif test \"$subsha1\" != \"$sha1\"\n>> +\t\tif test \"$subsha1\" != \"$sha1\" -o -n \"$force\"\n>>  \t\tthen\n>>  \t\t\tsubforce=$force\n>>  \t\t\t# If we don't already have a -f flag and the submodule has never been checked out\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n"},{"id":"195799","messageId":"7vwr1ra3x2.fsf@alter.siamese.dyndns.org","threadId":"31099","inReplyTo":"50105C60.4050303@web.de","subject":"Re: [PATCH] Make 'git submodule update --force' always check out submodules.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-25T22:09:45Z","receivedAt":"2012-07-25T22:09:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> writes:\n\n> Am 25.07.2012 20:44, schrieb Junio C Hamano:\n>> Stefan Zager <szager@google.com> writes:\n>> \n>>> Currently, it will only do a checkout if the sha1 registered in the containing\n>>> repository doesn't match the HEAD of the submodule, regardless of whether the\n>>> submodule is dirty.  As discussed on the mailing list, the '--force' flag is a\n>>> strong indicator that the state of the submodule is suspect, and should be reset\n>>> to HEAD.\n>>>\n>>> Signed-off-by: Stefan Zager <szager@google.com>\n>>> ---\n>> \n>> Looks sensible (again -- see http://thread.gmane.org/gmane.comp.version-control.git/197532\n>> for the original discussion).  Can submodule folks Ack it?\n>\n> I like it. Still I'd vote for amending the documentation like the\n> original thread proposed and would appreciate to have a test or two,\n> but apart from that I have no objections.\n\nOK, then I'll queue this so that we won't forget about the topic for\nnow, and docs and tests can be done as follow-up patches to the\ntopic.\n\nThanks.\n"},{"id":"197157","messageId":"7v7gsyxktu.fsf@alter.siamese.dyndns.org","threadId":"31099","inReplyTo":"50105C60.4050303@web.de","subject":"Re: [PATCH] Make 'git submodule update --force' always check out submodules.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-17T03:23:57Z","receivedAt":"2012-08-17T03:23:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> writes:\n\n> Am 25.07.2012 20:44, schrieb Junio C Hamano:\n>> Stefan Zager <szager@google.com> writes:\n>> \n>>> Currently, it will only do a checkout if the sha1 registered in the containing\n>>> repository doesn't match the HEAD of the submodule, regardless of whether the\n>>> submodule is dirty.  As discussed on the mailing list, the '--force' flag is a\n>>> strong indicator that the state of the submodule is suspect, and should be reset\n>>> to HEAD.\n>>>\n>>> Signed-off-by: Stefan Zager <szager@google.com>\n>>> ---\n>> \n>> Looks sensible (again -- see http://thread.gmane.org/gmane.comp.version-control.git/197532\n>> for the original discussion).  Can submodule folks Ack it?\n>\n> I like it. Still I'd vote for amending the documentation like the\n> original thread proposed and would appreciate to have a test or two,\n> but apart from that I have no objections.\n\nMind ping on missing follow-ups.\n"}]}