{"thread":{"id":"11391","subject":"Pushing and fetching sha1s directly","startedAt":"2007-12-22T21:13:08Z","lastAt":"2007-12-23T20:04:53Z","messageCount":3,"participants":["Finn Arne Gangstad","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"64017","messageId":"20071222211308.GA27281@pvv.org","threadId":"11391","inReplyTo":null,"subject":"Pushing and fetching sha1s directly","fromName":"Finn Arne Gangstad","fromEmail":"finnag@pvv.org","sentAt":"2007-12-22T21:13:08Z","receivedAt":"2007-12-22T21:13:08Z","isPatch":false,"sender":{"key":"finnag@pvv.org","avatar":"https://gravatar.com/avatar/b421ddd58c3f0f93aa473e17b98bb8d53c221fef741746bc8cb59fae4ec6d95e?d=mp&s=160"},"body":"Currently there seems to be no way of pusing a sha1 directly, or to\nfetch a sha1 directly. When working with submodules, it is convenient\nto be able to work with detached HEADs, so it would be good if this\ncould be supported also by fetch and push.\n\nWhat would be a resonable syntax for this? I'm thinking something like\ngit fetch --sha1 <repository> <sha1>\ngit push --sha1 <repository> <sha1>\n\nWhere <sha1> could really be a <commit> I guess, but the option name\n\"--commit\" seems wrong somehow. Another option is to extend refspecs\nso sha1s can be allowed in there directly, so this would just work:\n\ngit fetch <repository> <sha1>\n\nWhat do you prefer?\n\n- Finn Arne\n"},{"id":"64018","messageId":"7vlk7mwchm.fsf@gitster.siamese.dyndns.org","threadId":"11391","inReplyTo":"20071222211308.GA27281@pvv.org","subject":"Re: Pushing and fetching sha1s directly","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-22T23:12:05Z","receivedAt":"2007-12-22T23:12:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Finn Arne Gangstad <finnag@pvv.org> writes:\n\n> Currently there seems to be no way of pusing a sha1 directly, or to\n> fetch a sha1 directly. When working with submodules, it is convenient\n> to be able to work with detached HEADs, so it would be good if this\n> could be supported also by fetch and push.\n\nAt least push of an arbitrary commit is already supported, I\nthink.\n\nFor fetch, I would normally say \"check the list archives\", but\nit was very long time ago that it was proposed and discussed.\nIt has some security and performance implications.\n"},{"id":"64056","messageId":"Pine.LNX.4.64.0712232003470.23902@racer.site","threadId":"11391","inReplyTo":"7vlk7mwchm.fsf@gitster.siamese.dyndns.org","subject":"Re: Pushing and fetching sha1s directly","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-23T20:04:53Z","receivedAt":"2007-12-23T20:04:53Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 22 Dec 2007, Junio C Hamano wrote:\n\n> Finn Arne Gangstad <finnag@pvv.org> writes:\n> \n> > Currently there seems to be no way of pusing a sha1 directly, or to \n> > fetch a sha1 directly. When working with submodules, it is convenient \n> > to be able to work with detached HEADs, so it would be good if this \n> > could be supported also by fetch and push.\n> \n> For fetch, I would normally say \"check the list archives\", but it was \n> very long time ago that it was proposed and discussed. It has some \n> security and performance implications.\n\nTo enhance on that: sometimes you need to delete a branch in a hurry, \nbecause you publicised some secret code/file.  In that case, you do _not_ \nwant people being able to fetch arbitrary commits.\n\nCiao,\nDscho\n"}]}