{"thread":{"id":"25359","subject":"Fetch by SHA missing","startedAt":"2010-10-05T19:37:19Z","lastAt":"2010-10-06T20:35:44Z","messageCount":3,"participants":["Jan Engelhardt","Johannes Sixt","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"152705","messageId":"alpine.LNX.2.01.1010052136280.21719@obet.zrqbmnf.qr","threadId":"25359","inReplyTo":null,"subject":"Fetch by SHA missing","fromName":"Jan Engelhardt","fromEmail":"jengelh@medozas.de","sentAt":"2010-10-05T19:37:19Z","receivedAt":"2010-10-05T19:37:19Z","isPatch":false,"sender":{"key":"jengelh@medozas.de","avatar":null},"body":"Hi,\n\n\nit is possible to select single heads/tags for download, but this does \nnot work with SHA IDs as of 1.7.1.\n\n$ git fetch linus 3c06806e690885ce978ef180c8f8b6f8c17fb4b4:x\nfatal: Couldn't find remote ref 3c06806e690885ce978ef180c8f8b6f8c17fb4b4\n$ git fetch linus refs/heads/master\nremote: Counting objects: 1254, done.\nremote: Compressing objects: 100% (234/234), done.\nremote: Total 709 (delta 562), reused 602 (delta 475)\nReceiving objects: 100% (709/709), 112.41 KiB, done.\nResolving deltas: 100% (562/562), completed with 212 local objects.\nFrom git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n * branch            master     -> FETCH_HEAD\n"},{"id":"152744","messageId":"4CAC110C.2000804@viscovery.net","threadId":"25359","inReplyTo":"alpine.LNX.2.01.1010052136280.21719@obet.zrqbmnf.qr","subject":"Re: Fetch by SHA missing","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-10-06T06:02:52Z","receivedAt":"2010-10-06T06:02:52Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 10/5/2010 21:37, schrieb Jan Engelhardt:\n> Hi,\n> \n> \n> it is possible to select single heads/tags for download, but this does \n> not work with SHA IDs as of 1.7.1.\n> \n> $ git fetch linus 3c06806e690885ce978ef180c8f8b6f8c17fb4b4:x\n> fatal: Couldn't find remote ref 3c06806e690885ce978ef180c8f8b6f8c17fb4b4\n> $ git fetch linus refs/heads/master\n> remote: Counting objects: 1254, done.\n> remote: Compressing objects: 100% (234/234), done.\n> remote: Total 709 (delta 562), reused 602 (delta 475)\n> Receiving objects: 100% (709/709), 112.41 KiB, done.\n> Resolving deltas: 100% (562/562), completed with 212 local objects.\n> From git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n>  * branch            master     -> FETCH_HEAD\n\nThat's by design:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/73368/focus=73994\n\nThat is, when you accidentally push secret data, you can rewind your refs\non the server. Even though the objects still live on the server (until\nthey are garbage-collected) nobody will be able to fetch your secret stuff\neven if they happen to know the SHA1.\n"},{"id":"152779","messageId":"alpine.LFD.2.00.1010061631420.3107@xanadu.home","threadId":"25359","inReplyTo":"4CAC110C.2000804@viscovery.net","subject":"Re: Fetch by SHA missing","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-10-06T20:35:44Z","receivedAt":"2010-10-06T20:35:44Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 6 Oct 2010, Johannes Sixt wrote:\n\n> Am 10/5/2010 21:37, schrieb Jan Engelhardt:\n> > Hi,\n> > \n> > \n> > it is possible to select single heads/tags for download, but this does \n> > not work with SHA IDs as of 1.7.1.\n> > \n> > $ git fetch linus 3c06806e690885ce978ef180c8f8b6f8c17fb4b4:x\n> > fatal: Couldn't find remote ref 3c06806e690885ce978ef180c8f8b6f8c17fb4b4\n> > $ git fetch linus refs/heads/master\n> > remote: Counting objects: 1254, done.\n> > remote: Compressing objects: 100% (234/234), done.\n> > remote: Total 709 (delta 562), reused 602 (delta 475)\n> > Receiving objects: 100% (709/709), 112.41 KiB, done.\n> > Resolving deltas: 100% (562/562), completed with 212 local objects.\n> > From git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n> >  * branch            master     -> FETCH_HEAD\n> \n> That's by design:\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/73368/focus=73994\n> \n> That is, when you accidentally push secret data, you can rewind your refs\n> on the server. Even though the objects still live on the server (until\n> they are garbage-collected) nobody will be able to fetch your secret stuff\n> even if they happen to know the SHA1.\n\nOne improvement could be for the server to accept serving commits \nprovided a raw SHA1 instead of a branch name if that SHA1 corresponds to \na commit that is reachable through the actually exported refs.\n\n\nNicolas\n"}]}