{"thread":{"id":"2843","subject":"RE: new file leaked onto release branch","startedAt":"2005-12-14T22:48:19Z","lastAt":"2005-12-15T01:29:20Z","messageCount":4,"participants":["Brown, Len","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13642","messageId":"F7DC2337C7631D4386A2DF6E8FB22B30056B8748@hdsmsx401.amr.corp.intel.com","threadId":"2843","inReplyTo":null,"subject":"RE: new file leaked onto release branch","fromName":"Brown, Len","fromEmail":"len.brown@intel.com","sentAt":"2005-12-14T22:48:19Z","receivedAt":"2005-12-14T22:48:19Z","isPatch":false,"sender":{"key":"len.brown@intel.com","avatar":"https://gravatar.com/avatar/a091f34f66caadb51d85a8a496800c6ccae73737e2f45762373e6b8c55fa5dd6?d=mp&s=160"},"body":">BTW, are 5165, 3410, 5452, 5571... topic branch names?\n\nyes, the are bugzilla ids\n"},{"id":"13646","messageId":"Pine.LNX.4.63.0512150034120.8992@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2843","inReplyTo":"F7DC2337C7631D4386A2DF6E8FB22B30056B8748@hdsmsx401.amr.corp.intel.com","subject":"RE: new file leaked onto release branch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-12-14T23:34:45Z","receivedAt":"2005-12-14T23:34:45Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 14 Dec 2005, Brown, Len wrote:\n\n> >BTW, are 5165, 3410, 5452, 5571... topic branch names?\n> \n> yes, the are bugzilla ids\n\nSo, it could have been\n\n\tgit pull . 5165\n\nwhich mistakes 5165 for a short SHA1?\n\nHth,\nDscho\n"},{"id":"13653","messageId":"7v7ja7ures.fsf@assigned-by-dhcp.cox.net","threadId":"2843","inReplyTo":"Pine.LNX.4.63.0512150034120.8992@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: new file leaked onto release branch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-15T00:37:15Z","receivedAt":"2005-12-15T00:37:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> So, it could have been\n>\n> \tgit pull . 5165\n>\n> which mistakes 5165 for a short SHA1?\n\nI do not think git-pull would work on arbitrary SHA1\nexpressions, so you should be safe.\n\nInterestingly...\n\n        $ git rev-parse 5165\n        error: short SHA1 5165 is ambiguous.\n        5165\n\nthat short SHA1 is ambiguous.  But a branch name immediately\nunder .git/refs/heads takes precedence:\n\n        $ git branch 5165 master\n        $ git rev-parse 5165 master\n        acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2\n        acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2\n\nAnd this makes it safer and unambiguous:\n\n        $ git branch -d 5165\n        Deleted branch 5165.\n        $ git branch bug/5165 master\n        $ git rev-parse bug/5165\n        acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2\n\nWe might want to detect collisions between SHA1 prefix and\nbranch names, but I am not sure if it is worth it in practice.\n"},{"id":"13658","messageId":"Pine.LNX.4.63.0512150208190.9568@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2843","inReplyTo":"7v7ja7ures.fsf@assigned-by-dhcp.cox.net","subject":"Re: new file leaked onto release branch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-12-15T01:29:20Z","receivedAt":"2005-12-15T01:29:20Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 14 Dec 2005, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > So, it could have been\n> >\n> > \tgit pull . 5165\n> >\n> > which mistakes 5165 for a short SHA1?\n> \n> I do not think git-pull would work on arbitrary SHA1\n> expressions, so you should be safe.\n\nD'oh. I wanted to write it short, but I guess that made it only more \nconfusing. In reality, Len used \"git merge\", and that works quite well \nwith short SHA1s.\n\nHowever, I just verified (as you did also), that they do not take \nprecedence over branch names (the relevant piece of code is in get_sha1_1: \nget_short_sha1() is called only if get_sha1_basic() fails).\n\n> Interestingly...\n> \n>         $ git rev-parse 5165\n>         error: short SHA1 5165 is ambiguous.\n>         5165\n> \n> that short SHA1 is ambiguous.\n\nI don't want to be a PITA, but it could be ambiguous only since short time \nago.\n\n> But a branch name immediately under .git/refs/heads takes precedence:\n>\n>         $ git branch 5165 master\n>         $ git rev-parse 5165 master\n>         acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2\n>         acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2\n\nThere is an interesting side effect: If 5165 as a short SHA1 would be \nunique, and there is a tag *and* a branch named 5165, git-rev-parse would \nexpand the short SHA1...\n\nHowever, it still does not solve the original riddle.\n\nCiao,\nDscho\n"}]}