{"thread":{"id":"40794","subject":"[PATCH v2] contrib/subtree: unwrap tag refs","startedAt":"2015-11-13T17:25:49Z","lastAt":"2016-01-13T17:49:50Z","messageCount":4,"participants":["Rob Mayoff","Jeff King","David A. Greene","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"273285","messageId":"1447435549-34410-1-git-send-email-mayoff@dqd.com","threadId":"40794","inReplyTo":null,"subject":"[PATCH v2] contrib/subtree: unwrap tag refs","fromName":"Rob Mayoff","fromEmail":"mayoff@dqd.com","sentAt":"2015-11-13T17:25:49Z","receivedAt":"2015-11-13T17:25:49Z","isPatch":true,"sender":{"key":"mayoff@dqd.com","avatar":null},"body":"If a subtree was added using a tag ref, the tag ref is stored in\nthe subtree commit message instead of the underlying commit's ref.\nTo split or push subsequent changes to the subtree, the subtree\ncommand needs to unwrap the tag ref.  This patch makes it do so.\n\nThe problem was described in a message to the mailing list from\nJunio C Hamano dated 29 Apr 2014, with the subject \"Re: git subtree\nissue in more recent versions\". The archived message can be found\nat <http://comments.gmane.org/gmane.comp.version-control.git/247503>.\n\nSigned-off-by: Rob Mayoff <mayoff@dqd.com>\n---\n\nchanges since v1:\n\n* remove obsolete sub assignments\n* wrap lines\n\n contrib/subtree/git-subtree.sh | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\nindex 9f06571..5ed0ea5 100755\n--- a/contrib/subtree/git-subtree.sh\n+++ b/contrib/subtree/git-subtree.sh\n@@ -245,7 +245,10 @@ find_latest_squash()\n \t\tcase \"$a\" in\n \t\t\tSTART) sq=\"$b\" ;;\n \t\t\tgit-subtree-mainline:) main=\"$b\" ;;\n-\t\t\tgit-subtree-split:) sub=\"$b\" ;;\n+\t\t\tgit-subtree-split:)\n+\t\t\t\tsub=\"$(git rev-parse \"$b^0\")\" ||\n+\t\t\t\t    die \"could not rev-parse split hash $b from commit $sq\"\n+\t\t\t\t;;\n \t\t\tEND)\n \t\t\t\tif [ -n \"$sub\" ]; then\n \t\t\t\t\tif [ -n \"$main\" ]; then\n@@ -278,7 +281,10 @@ find_existing_splits()\n \t\tcase \"$a\" in\n \t\t\tSTART) sq=\"$b\" ;;\n \t\t\tgit-subtree-mainline:) main=\"$b\" ;;\n-\t\t\tgit-subtree-split:) sub=\"$b\" ;;\n+\t\t\tgit-subtree-split:)\n+\t\t\t\tsub=\"$(git rev-parse \"$b^0\")\" ||\n+\t\t\t\t    die \"could not rev-parse split hash $b from commit $sq\"\n+\t\t\t\t;;\n \t\t\tEND)\n \t\t\t\tdebug \"  Main is: '$main'\"\n \t\t\t\tif [ -z \"$main\" -a -n \"$sub\" ]; then\n-- \n2.4.3\n"},{"id":"273658","messageId":"20151124215258.GC29185@sigill.intra.peff.net","threadId":"40794","inReplyTo":"1447435549-34410-1-git-send-email-mayoff@dqd.com","subject":"Re: [PATCH v2] contrib/subtree: unwrap tag refs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-11-24T21:52:58Z","receivedAt":"2015-11-24T21:52:58Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 13, 2015 at 11:25:49AM -0600, Rob Mayoff wrote:\n\n> If a subtree was added using a tag ref, the tag ref is stored in\n> the subtree commit message instead of the underlying commit's ref.\n> To split or push subsequent changes to the subtree, the subtree\n> command needs to unwrap the tag ref.  This patch makes it do so.\n> \n> The problem was described in a message to the mailing list from\n> Junio C Hamano dated 29 Apr 2014, with the subject \"Re: git subtree\n> issue in more recent versions\". The archived message can be found\n> at <http://comments.gmane.org/gmane.comp.version-control.git/247503>.\n> \n> Signed-off-by: Rob Mayoff <mayoff@dqd.com>\n> ---\n> \n> changes since v1:\n> \n> * remove obsolete sub assignments\n> * wrap lines\n\nThanks.  David, can I get an Ack on this?\n\n-Peff\n"},{"id":"275859","messageId":"878u3up5cj.fsf@waller.obbligato.org","threadId":"40794","inReplyTo":"20151124215258.GC29185@sigill.intra.peff.net","subject":"Re: [PATCH v2] contrib/subtree: unwrap tag refs","fromName":"David A. Greene","fromEmail":"greened@obbligato.org","sentAt":"2016-01-13T02:42:52Z","receivedAt":"2016-01-13T02:42:52Z","isPatch":true,"sender":{"key":"greened@obbligato.org","avatar":"https://avatars.githubusercontent.com/u/5291869?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Fri, Nov 13, 2015 at 11:25:49AM -0600, Rob Mayoff wrote:\n>\n>> If a subtree was added using a tag ref, the tag ref is stored in\n>> the subtree commit message instead of the underlying commit's ref.\n>> To split or push subsequent changes to the subtree, the subtree\n>> command needs to unwrap the tag ref.  This patch makes it do so.\n>> \n>> The problem was described in a message to the mailing list from\n>> Junio C Hamano dated 29 Apr 2014, with the subject \"Re: git subtree\n>> issue in more recent versions\". The archived message can be found\n>> at <http://comments.gmane.org/gmane.comp.version-control.git/247503>.> \n>> Signed-off-by: Rob Mayoff <mayoff@dqd.com>\n>> ---\n>> \n>> changes since v1:\n>> \n>> * remove obsolete sub assignments\n>> * wrap lines\n>\n> Thanks.  David, can I get an Ack on this?\n\nYep.  I'm sorry I missed this re-roll.\n\n                             -David\n"},{"id":"275945","messageId":"xmqq4mehpdxd.fsf@gitster.mtv.corp.google.com","threadId":"40794","inReplyTo":"878u3up5cj.fsf@waller.obbligato.org","subject":"Re: [PATCH v2] contrib/subtree: unwrap tag refs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-01-13T17:49:50Z","receivedAt":"2016-01-13T17:49:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, all.\n"}]}