{"thread":{"id":"26777","subject":"Git submodule update and the --merge flag when submodule is yet to be checked out","startedAt":"2011-03-18T18:25:39Z","lastAt":"2011-03-18T21:35:15Z","messageCount":5,"participants":["Carl Fürstenberg","Junio C Hamano","Spencer E. Olson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163661","messageId":"AANLkTikJo_pjSAmVV3wjWi04io4zWb-_P5p81TYj9tq6@mail.gmail.com","threadId":"26777","inReplyTo":null,"subject":"Git submodule update and the --merge flag when submodule is yet to be checked out","fromName":"Carl Fürstenberg","fromEmail":"azatoth@gmail.com","sentAt":"2011-03-18T18:25:39Z","receivedAt":"2011-03-18T18:25:39Z","isPatch":false,"sender":{"key":"azatoth@gmail.com","avatar":"https://gravatar.com/avatar/0fc9395b8ebd847c13aff2af7b18661fa677054257d81a894c5ecc1c0a72a7cb?d=mp&s=160"},"body":"Sorry for re-posting the question but I though I should explain the\nissue better and to fix the subject line.\nsub\nWhen you are cloning repository containing submodules, and you are\nusing the --merge flag to \"git submodule update\" the first time, then\nthe submodule instance in question will assume you want to delete all\nfiles present in the module.\n\nPlease look at attachment for a testcase and how the result might look like.\nUnless this is not the intended behavior, then I would suggest\nchanging --merge (and possible --rebase) to not assume a non-existent\nrepository\nto be a empty one.\n\nThe man pages says \"Merge the commit recorded in the superproject into\nthe current branch of the submodule\", but we have no current branch of\nthe\nsubmodule.\n\nI would be happy for any reply, and sorry again for the repost.\n\n/Carl Fürstenberg\n"},{"id":"163673","messageId":"7vipvgw3c1.fsf@alter.siamese.dyndns.org","threadId":"26777","inReplyTo":"AANLkTikJo_pjSAmVV3wjWi04io4zWb-_P5p81TYj9tq6@mail.gmail.com","subject":"Re: Git submodule update and the --merge flag when submodule is yet to be checked out","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-18T21:01:18Z","receivedAt":"2011-03-18T21:01:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Carl Fürstenberg <azatoth@gmail.com> writes:\n\n> Sorry for re-posting the question but I though I should explain the\n> issue better and to fix the subject line.\n> sub\n> When you are cloning repository containing submodules, and you are\n> using the --merge flag to \"git submodule update\" the first time, then\n> the submodule instance in question will assume you want to delete all\n> files present in the module.\n\nIs this something we fixed last month?\n\ncommit 1b4735d9f3e0b7ea62c7c22f0afcb45e10c46c7e\nAuthor: Spencer E. Olson <olsonse@umich.edu>\nDate:   Thu Feb 17 09:18:45 2011 -0700\n\n    submodule: no [--merge|--rebase] when newly cloned\n    \n    \"git submodule update\" can be run with either the \"--merge\" or \"--rebase\"\n    option, or submodule.<name>.update configuration variable can be set to\n    \"merge\" or \"rebase, to cause local work to get integrated when updating\n    the submodule.\n    \n    When a submodule is newly cloned, however, it does not have a check out\n    when a rebase or merge is attempted, leading to a failure.  For newly\n    cloned submodules, simply check out the appropriate revision.  There is no\n    local work to integrate with for them.\n    \n    Signed-off-by: Spencer E. Olson <olsonse@umich.edu>\n    Acked-by: Jens Lehmann <Jens.Lehmann@web.de>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n"},{"id":"163674","messageId":"AANLkTi=PgB_QYoVip8_O1ga30KR7R8pJX_8KqsHLjAJV@mail.gmail.com","threadId":"26777","inReplyTo":"7vipvgw3c1.fsf@alter.siamese.dyndns.org","subject":"Re: Git submodule update and the --merge flag when submodule is yet to be checked out","fromName":"Carl Fürstenberg","fromEmail":"azatoth@gmail.com","sentAt":"2011-03-18T21:06:31Z","receivedAt":"2011-03-18T21:06:31Z","isPatch":false,"sender":{"key":"azatoth@gmail.com","avatar":"https://gravatar.com/avatar/0fc9395b8ebd847c13aff2af7b18661fa677054257d81a894c5ecc1c0a72a7cb?d=mp&s=160"},"body":"2011/3/18 Junio C Hamano <gitster@pobox.com>:\n> Carl Fürstenberg <azatoth@gmail.com> writes:\n>\n>> Sorry for re-posting the question but I though I should explain the\n>> issue better and to fix the subject line.\n>> sub\n>> When you are cloning repository containing submodules, and you are\n>> using the --merge flag to \"git submodule update\" the first time, then\n>> the submodule instance in question will assume you want to delete all\n>> files present in the module.\n>\n> Is this something we fixed last month?\n>\n> commit 1b4735d9f3e0b7ea62c7c22f0afcb45e10c46c7e\n> Author: Spencer E. Olson <olsonse@umich.edu>\n> Date:   Thu Feb 17 09:18:45 2011 -0700\n>\n>    submodule: no [--merge|--rebase] when newly cloned\n>\n>    \"git submodule update\" can be run with either the \"--merge\" or \"--rebase\"\n>    option, or submodule.<name>.update configuration variable can be set to\n>    \"merge\" or \"rebase, to cause local work to get integrated when updating\n>    the submodule.\n>\n>    When a submodule is newly cloned, however, it does not have a check out\n>    when a rebase or merge is attempted, leading to a failure.  For newly\n>    cloned submodules, simply check out the appropriate revision.  There is no\n>    local work to integrate with for them.\n>\n>    Signed-off-by: Spencer E. Olson <olsonse@umich.edu>\n>    Acked-by: Jens Lehmann <Jens.Lehmann@web.de>\n>    Signed-off-by: Junio C Hamano <gitster@pobox.com>\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\n\nAh, I see, thank you, I was using 1.7.4 and I assume this is for next.\n\n-- \nCarl Fürstenberg\n"},{"id":"163679","messageId":"201103181524.40521.olsonse@umich.edu","threadId":"26777","inReplyTo":"7vipvgw3c1.fsf@alter.siamese.dyndns.org","subject":"Re: Git submodule update and the --merge flag when submodule is yet to be checked out","fromName":"Spencer E. Olson","fromEmail":"olsonse@umich.edu","sentAt":"2011-03-18T21:24:40Z","receivedAt":"2011-03-18T21:24:40Z","isPatch":false,"sender":{"key":"olsonse@umich.edu","avatar":"https://avatars.githubusercontent.com/u/148647?v=4"},"body":"Yes, this was the intent of this fix last month\n\nOn Friday 18 March 2011 15:01, Junio C Hamano wrote:\n> Carl Fürstenberg <azatoth@gmail.com> writes:\n> > Sorry for re-posting the question but I though I should explain the\n> > issue better and to fix the subject line.\n> > sub\n> > When you are cloning repository containing submodules, and you are\n> > using the --merge flag to \"git submodule update\" the first time, then\n> > the submodule instance in question will assume you want to delete all\n> > files present in the module.\n>\n> Is this something we fixed last month?\n>\n> commit 1b4735d9f3e0b7ea62c7c22f0afcb45e10c46c7e\n> Author: Spencer E. Olson <olsonse@umich.edu>\n> Date:   Thu Feb 17 09:18:45 2011 -0700\n>\n>     submodule: no [--merge|--rebase] when newly cloned\n>\n>     \"git submodule update\" can be run with either the \"--merge\" or\n> \"--rebase\" option, or submodule.<name>.update configuration variable can be\n> set to \"merge\" or \"rebase, to cause local work to get integrated when\n> updating the submodule.\n>\n>     When a submodule is newly cloned, however, it does not have a check out\n>     when a rebase or merge is attempted, leading to a failure.  For newly\n>     cloned submodules, simply check out the appropriate revision.  There is\n> no local work to integrate with for them.\n>\n>     Signed-off-by: Spencer E. Olson <olsonse@umich.edu>\n>     Acked-by: Jens Lehmann <Jens.Lehmann@web.de>\n>     Signed-off-by: Junio C Hamano <gitster@pobox.com>\n"},{"id":"163681","messageId":"7vwrjwun70.fsf@alter.siamese.dyndns.org","threadId":"26777","inReplyTo":"201103181524.40521.olsonse@umich.edu","subject":"Re: Git submodule update and the --merge flag when submodule is yet to be checked out","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-18T21:35:15Z","receivedAt":"2011-03-18T21:35:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Spencer E. Olson\" <olsonse@umich.edu> writes:\n\n> Yes, this was the intent of this fix last month\n\nThanks.\n"}]}