{"thread":{"id":"9441","subject":"Git'ing a non-labeled set of sources","startedAt":"2007-08-08T18:59:38Z","lastAt":"2007-08-09T20:02:18Z","messageCount":8,"participants":["Sparks, Sam","Peter Baumann","Alex Riesen","Jan Hudec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"50208","messageId":"CF7E46FCFF66AD478BB72724345289EC170CE4@twx-exch01.twacs.local","threadId":"9441","inReplyTo":null,"subject":"Git'ing a non-labeled set of sources","fromName":"Sparks, Sam","fromEmail":"ssparks@twacs.com","sentAt":"2007-08-08T18:59:38Z","receivedAt":"2007-08-08T18:59:38Z","isPatch":false,"sender":{"key":"ssparks@twacs.com","avatar":null},"body":"Hello All,\n\nPlease excuse me if this is an ignorant question; I'm new to git and my\nhave overlooked something in the documentation.\n\nI'm attempting to obtain a snapshot of source code from an unlabeled git\nbranch in a public repository. I've found in the documentation that a\ntimestamp cannot be used to specify a particular version of source code,\nbut I believe I can work with the commit value as returned by 'git\nshow'.\n\nHowever, I have been unsuccessful in my attempts to use this identifier\nto clone or checkout the associated source tree. Has anyone been\nsuccessful in using git to successfully replicate an unlabeled version\nof sources in a repository?\n\nHere is my latest attempt:\n/dir_i_want_to_replicate $ git show --pretty=short\ncommit 5b1313fb2758ffce8b624457f777d8cc6709608d\nAuthor: ....\n\n/replication_dir $ git clone git://www.denx.de/git/u-boot.git\nu-boot-mpc83xx\nBlah blah blah..\n 100% (4378/4378) done\n/replication_dir/u-boot-mpc83xx/ $ git checkout\n5b1313fb2758ffce8b624457f777d8cc6709608d\nerror: pathspec '5b1313fb2758ffce8b624457f777d8cc6709608d' did not match\nany. \n\nAny suggestions would be greatly appreciated.\nThanks in advance,\nSam Sparks\n"},{"id":"50215","messageId":"20070808193720.GD27470@xp.machine.xx","threadId":"9441","inReplyTo":"CF7E46FCFF66AD478BB72724345289EC170CE4@twx-exch01.twacs.local","subject":"Re: Git'ing a non-labeled set of sources","fromName":"Peter Baumann","fromEmail":"waste.manager@gmx.de","sentAt":"2007-08-08T19:37:20Z","receivedAt":"2007-08-08T19:37:20Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"On Wed, Aug 08, 2007 at 01:59:38PM -0500, Sparks, Sam wrote:\n> Hello All,\n> \n> Please excuse me if this is an ignorant question; I'm new to git and my\n> have overlooked something in the documentation.\n> \n> I'm attempting to obtain a snapshot of source code from an unlabeled git\n> branch in a public repository. I've found in the documentation that a\n> timestamp cannot be used to specify a particular version of source code,\n> but I believe I can work with the commit value as returned by 'git\n> show'.\n> \n> However, I have been unsuccessful in my attempts to use this identifier\n> to clone or checkout the associated source tree. Has anyone been\n> successful in using git to successfully replicate an unlabeled version\n> of sources in a repository?\n> \n> Here is my latest attempt:\n> /dir_i_want_to_replicate $ git show --pretty=short\n> commit 5b1313fb2758ffce8b624457f777d8cc6709608d\n> Author: ....\n> \n> /replication_dir $ git clone git://www.denx.de/git/u-boot.git\n> u-boot-mpc83xx\n> Blah blah blah..\n>  100% (4378/4378) done\n> /replication_dir/u-boot-mpc83xx/ $ git checkout\n> 5b1313fb2758ffce8b624457f777d8cc6709608d\n> error: pathspec '5b1313fb2758ffce8b624457f777d8cc6709608d' did not match\n> any. \n> \n\nBecause there is no 5b1313fb2758ffce8b624457f777d8cc6709608d in the\nrepo.\n\n  $ git clone git://www.denx.de/git/u-boot.git\n  Initialized empty Git repository in /tmp/u-boot/.git/\n  remote: Generating pack...\n  remote: Done counting 40938 objects.\n  remote: Deltifying 40938 objects.\n  remote:  100% (40938/40938) done\n  Indexing 40938 objects...\n  remote: Total 40938 (delta 32545), reused 39302 (delta 31040)\n  100% (40938/40938) done\n  Resolving 32545 deltas...\n  100% (32545/32545) done\n\n  $ cd u-boot; git-rev-list --all|grep ^5b1\n  5b1d713721c3ea02549940133f09236783dda1f9\n\n-Peter\n"},{"id":"50220","messageId":"CF7E46FCFF66AD478BB72724345289EC170CE5@twx-exch01.twacs.local","threadId":"9441","inReplyTo":"20070808193720.GD27470@xp.machine.xx","subject":"RE: Git'ing a non-labeled set of sources","fromName":"Sparks, Sam","fromEmail":"ssparks@twacs.com","sentAt":"2007-08-08T19:52:14Z","receivedAt":"2007-08-08T19:52:14Z","isPatch":false,"sender":{"key":"ssparks@twacs.com","avatar":null},"body":" \n\n>-----Original Message-----\n>From: Peter Baumann [mailto:waste.manager@gmx.de] \n>Sent: Wednesday, August 08, 2007 2:37 PM\n>To: Sparks, Sam\n>Cc: git@vger.kernel.org\n>Subject: Re: Git'ing a non-labeled set of sources\n>\n>On Wed, Aug 08, 2007 at 01:59:38PM -0500, Sparks, Sam wrote:\n>> Hello All,\n>> \n>> Please excuse me if this is an ignorant question; I'm new to \n>git and my\n>> have overlooked something in the documentation.\n>> \n>> I'm attempting to obtain a snapshot of source code from an \n>unlabeled git\n>> branch in a public repository. I've found in the documentation that a\n>> timestamp cannot be used to specify a particular version of \n>source code,\n>> but I believe I can work with the commit value as returned by 'git\n>> show'.\n>> \n>> However, I have been unsuccessful in my attempts to use this \n>identifier\n>> to clone or checkout the associated source tree. Has anyone been\n>> successful in using git to successfully replicate an \n>unlabeled version\n>> of sources in a repository?\n>> \n>> Here is my latest attempt:\n>> /dir_i_want_to_replicate $ git show --pretty=short\n>> commit 5b1313fb2758ffce8b624457f777d8cc6709608d\n>> Author: ....\n>> \n>> /replication_dir $ git clone git://www.denx.de/git/u-boot.git\n>> u-boot-mpc83xx\n>> Blah blah blah..\n>>  100% (4378/4378) done\n>> /replication_dir/u-boot-mpc83xx/ $ git checkout\n>> 5b1313fb2758ffce8b624457f777d8cc6709608d\n>> error: pathspec '5b1313fb2758ffce8b624457f777d8cc6709608d' \n>did not match\n>> any. \n>> \n>\n>Because there is no 5b1313fb2758ffce8b624457f777d8cc6709608d in the\n>repo.\n>\n>  $ git clone git://www.denx.de/git/u-boot.git\n>  Initialized empty Git repository in /tmp/u-boot/.git/\n>  remote: Generating pack...\n>  remote: Done counting 40938 objects.\n>  remote: Deltifying 40938 objects.\n>  remote:  100% (40938/40938) done\n>  Indexing 40938 objects...\n>  remote: Total 40938 (delta 32545), reused 39302 (delta 31040)\n>  100% (40938/40938) done\n>  Resolving 32545 deltas...\n>  100% (32545/32545) done\n>\n>  $ cd u-boot; git-rev-list --all|grep ^5b1\n>  5b1d713721c3ea02549940133f09236783dda1f9\n>\n>-Peter\n\nHmmm. There must be something I am not understanding about git.\nWhen I run the same command on my existing git repository, I get the\nfollowing:\n$ git-rev-list --all | grep ^5b1\n5b1313fb2758ffce8b624457f777d8cc6709608d\n5b1d713721c3ea02549940133f09236783dda1f9\n\nDoes git allow the removal of commits? I don't understand how I was able\nto download it a couple of months ago, but it is no longer accessible.\n\nThanks for the quick reply,\nSam\n"},{"id":"50227","messageId":"20070808201718.GE27470@xp.machine.xx","threadId":"9441","inReplyTo":"CF7E46FCFF66AD478BB72724345289EC170CE5@twx-exch01.twacs.local","subject":"Re: Git'ing a non-labeled set of sources","fromName":"Peter Baumann","fromEmail":"waste.manager@gmx.de","sentAt":"2007-08-08T20:17:18Z","receivedAt":"2007-08-08T20:17:18Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"On Wed, Aug 08, 2007 at 02:52:14PM -0500, Sparks, Sam wrote:\n>  \n> \n> >-----Original Message-----\n> >From: Peter Baumann [mailto:waste.manager@gmx.de] \n> >Sent: Wednesday, August 08, 2007 2:37 PM\n> >To: Sparks, Sam\n> >Cc: git@vger.kernel.org\n> >Subject: Re: Git'ing a non-labeled set of sources\n> >\n> >On Wed, Aug 08, 2007 at 01:59:38PM -0500, Sparks, Sam wrote:\n> >> Hello All,\n> >> \n> >> Please excuse me if this is an ignorant question; I'm new to \n> >git and my\n> >> have overlooked something in the documentation.\n> >> \n> >> I'm attempting to obtain a snapshot of source code from an \n> >unlabeled git\n> >> branch in a public repository. I've found in the documentation that a\n> >> timestamp cannot be used to specify a particular version of \n> >source code,\n> >> but I believe I can work with the commit value as returned by 'git\n> >> show'.\n> >> \n> >> However, I have been unsuccessful in my attempts to use this \n> >identifier\n> >> to clone or checkout the associated source tree. Has anyone been\n> >> successful in using git to successfully replicate an \n> >unlabeled version\n> >> of sources in a repository?\n> >> \n> >> Here is my latest attempt:\n> >> /dir_i_want_to_replicate $ git show --pretty=short\n> >> commit 5b1313fb2758ffce8b624457f777d8cc6709608d\n> >> Author: ....\n> >> \n> >> /replication_dir $ git clone git://www.denx.de/git/u-boot.git\n> >> u-boot-mpc83xx\n> >> Blah blah blah..\n> >>  100% (4378/4378) done\n> >> /replication_dir/u-boot-mpc83xx/ $ git checkout\n> >> 5b1313fb2758ffce8b624457f777d8cc6709608d\n> >> error: pathspec '5b1313fb2758ffce8b624457f777d8cc6709608d' \n> >did not match\n> >> any. \n> >> \n> >\n> >Because there is no 5b1313fb2758ffce8b624457f777d8cc6709608d in the\n> >repo.\n> >\n> >  $ git clone git://www.denx.de/git/u-boot.git\n> >  Initialized empty Git repository in /tmp/u-boot/.git/\n> >  remote: Generating pack...\n> >  remote: Done counting 40938 objects.\n> >  remote: Deltifying 40938 objects.\n> >  remote:  100% (40938/40938) done\n> >  Indexing 40938 objects...\n> >  remote: Total 40938 (delta 32545), reused 39302 (delta 31040)\n> >  100% (40938/40938) done\n> >  Resolving 32545 deltas...\n> >  100% (32545/32545) done\n> >\n> >  $ cd u-boot; git-rev-list --all|grep ^5b1\n> >  5b1d713721c3ea02549940133f09236783dda1f9\n> >\n> >-Peter\n> \n> Hmmm. There must be something I am not understanding about git.\n> When I run the same command on my existing git repository, I get the\n> following:\n> $ git-rev-list --all | grep ^5b1\n> 5b1313fb2758ffce8b624457f777d8cc6709608d\n> 5b1d713721c3ea02549940133f09236783dda1f9\n> \n> Does git allow the removal of commits? I don't understand how I was able\n> to download it a couple of months ago, but it is no longer accessible.\n> \n> Thanks for the quick reply,\n> Sam\n\nIf the branch was rebased, then yes. But this is not nice for\ncontributers, so it is normally the rule to not rebase a published\nbranch. But e.g. the branch 'pu' on git.git is a branch which will be\nrebased. This is mentioned by Junio in his notes from the maintainer.\n\nWhat made me wonder is, if you have the commit localy, why can't you\ncheck it out? Please try a git-fsck --full run, to see if you have a\ncorrupt repo.\n\n-Peter\n"},{"id":"50232","messageId":"CF7E46FCFF66AD478BB72724345289EC170CE6@twx-exch01.twacs.local","threadId":"9441","inReplyTo":"20070808201718.GE27470@xp.machine.xx","subject":"RE: Git'ing a non-labeled set of sources","fromName":"Sparks, Sam","fromEmail":"ssparks@twacs.com","sentAt":"2007-08-08T20:45:35Z","receivedAt":"2007-08-08T20:45:35Z","isPatch":false,"sender":{"key":"ssparks@twacs.com","avatar":null},"body":" \n\n>-----Original Message-----\n>From: Peter Baumann [mailto:waste.manager@gmx.de] \n>Sent: Wednesday, August 08, 2007 3:17 PM\n>To: Sparks, Sam\n>Cc: git@vger.kernel.org\n>Subject: Re: Git'ing a non-labeled set of sources\n>\n>On Wed, Aug 08, 2007 at 02:52:14PM -0500, Sparks, Sam wrote:\n>>  \n>> \n>> >-----Original Message-----\n>> >From: Peter Baumann [mailto:waste.manager@gmx.de] \n>> >Sent: Wednesday, August 08, 2007 2:37 PM\n>> >To: Sparks, Sam\n>> >Cc: git@vger.kernel.org\n>> >Subject: Re: Git'ing a non-labeled set of sources\n>> >\n>> >On Wed, Aug 08, 2007 at 01:59:38PM -0500, Sparks, Sam wrote:\n>> >> Hello All,\n>> >> \n>> >> Please excuse me if this is an ignorant question; I'm new to \n>> >git and my\n>> >> have overlooked something in the documentation.\n>> >> \n>> >> I'm attempting to obtain a snapshot of source code from an \n>> >unlabeled git\n>> >> branch in a public repository. I've found in the \n>documentation that a\n>> >> timestamp cannot be used to specify a particular version of \n>> >source code,\n>> >> but I believe I can work with the commit value as returned by 'git\n>> >> show'.\n>> >> \n>> >> However, I have been unsuccessful in my attempts to use this \n>> >identifier\n>> >> to clone or checkout the associated source tree. Has anyone been\n>> >> successful in using git to successfully replicate an \n>> >unlabeled version\n>> >> of sources in a repository?\n>> >> \n>> >> Here is my latest attempt:\n>> >> /dir_i_want_to_replicate $ git show --pretty=short\n>> >> commit 5b1313fb2758ffce8b624457f777d8cc6709608d\n>> >> Author: ....\n>> >> \n>> >> /replication_dir $ git clone git://www.denx.de/git/u-boot.git\n>> >> u-boot-mpc83xx\n>> >> Blah blah blah..\n>> >>  100% (4378/4378) done\n>> >> /replication_dir/u-boot-mpc83xx/ $ git checkout\n>> >> 5b1313fb2758ffce8b624457f777d8cc6709608d\n>> >> error: pathspec '5b1313fb2758ffce8b624457f777d8cc6709608d' \n>> >did not match\n>> >> any. \n>> >> \n>> >\n>> >Because there is no 5b1313fb2758ffce8b624457f777d8cc6709608d in the\n>> >repo.\n>> >\n>> >  $ git clone git://www.denx.de/git/u-boot.git\n>> >  Initialized empty Git repository in /tmp/u-boot/.git/\n>> >  remote: Generating pack...\n>> >  remote: Done counting 40938 objects.\n>> >  remote: Deltifying 40938 objects.\n>> >  remote:  100% (40938/40938) done\n>> >  Indexing 40938 objects...\n>> >  remote: Total 40938 (delta 32545), reused 39302 (delta 31040)\n>> >  100% (40938/40938) done\n>> >  Resolving 32545 deltas...\n>> >  100% (32545/32545) done\n>> >\n>> >  $ cd u-boot; git-rev-list --all|grep ^5b1\n>> >  5b1d713721c3ea02549940133f09236783dda1f9\n>> >\n>> >-Peter\n>> \n>> Hmmm. There must be something I am not understanding about git.\n>> When I run the same command on my existing git repository, I get the\n>> following:\n>> $ git-rev-list --all | grep ^5b1\n>> 5b1313fb2758ffce8b624457f777d8cc6709608d\n>> 5b1d713721c3ea02549940133f09236783dda1f9\n>> \n>> Does git allow the removal of commits? I don't understand \n>how I was able\n>> to download it a couple of months ago, but it is no longer \n>accessible.\n>> \n>> Thanks for the quick reply,\n>> Sam\n>\n>If the branch was rebased, then yes. But this is not nice for\n>contributers, so it is normally the rule to not rebase a published\n>branch. But e.g. the branch 'pu' on git.git is a branch which will be\n>rebased. This is mentioned by Junio in his notes from the maintainer.\n>\n>What made me wonder is, if you have the commit localy, why can't you\n>check it out? Please try a git-fsck --full run, to see if you have a\n>corrupt repo.\n>\n>-Peter\n>\n>\nI had to upgrade from git v1.4.4.4 to v1.5.0.7 to have access to the\ngit-fsck command. 'git-fsck --full' printed out nothing, and 'git-fsck\n--full run' printed out an error message (error: invalid parameter:\nexpected sha1, got 'run'). Was I doing something wrong?\n\n--Sam\n"},{"id":"50235","messageId":"CF7E46FCFF66AD478BB72724345289EC170CE7@twx-exch01.twacs.local","threadId":"9441","inReplyTo":"CF7E46FCFF66AD478BB72724345289EC170CE6@twx-exch01.twacs.local","subject":"RE: Git'ing a non-labeled set of sources","fromName":"Sparks, Sam","fromEmail":"ssparks@twacs.com","sentAt":"2007-08-08T20:59:38Z","receivedAt":"2007-08-08T20:59:38Z","isPatch":false,"sender":{"key":"ssparks@twacs.com","avatar":null},"body":" \n\n>-----Original Message-----\n>From: Sparks, Sam \n>Sent: Wednesday, August 08, 2007 3:46 PM\n>To: Peter Baumann\n>Cc: git@vger.kernel.org\n>Subject: RE: Git'ing a non-labeled set of sources\n>\n> \n>\n>>-----Original Message-----\n>>From: Peter Baumann [mailto:waste.manager@gmx.de] \n>>Sent: Wednesday, August 08, 2007 3:17 PM\n>>To: Sparks, Sam\n>>Cc: git@vger.kernel.org\n>>Subject: Re: Git'ing a non-labeled set of sources\n>>\n>>On Wed, Aug 08, 2007 at 02:52:14PM -0500, Sparks, Sam wrote:\n>>>  \n>>> \n>>> >-----Original Message-----\n>>> >From: Peter Baumann [mailto:waste.manager@gmx.de] \n>>> >Sent: Wednesday, August 08, 2007 2:37 PM\n>>> >To: Sparks, Sam\n>>> >Cc: git@vger.kernel.org\n>>> >Subject: Re: Git'ing a non-labeled set of sources\n>>> >\n>>> >On Wed, Aug 08, 2007 at 01:59:38PM -0500, Sparks, Sam wrote:\n>>> >> Hello All,\n>>> >> \n>>> >> Please excuse me if this is an ignorant question; I'm new to \n>>> >git and my\n>>> >> have overlooked something in the documentation.\n>>> >> \n>>> >> I'm attempting to obtain a snapshot of source code from an \n>>> >unlabeled git\n>>> >> branch in a public repository. I've found in the \n>>documentation that a\n>>> >> timestamp cannot be used to specify a particular version of \n>>> >source code,\n>>> >> but I believe I can work with the commit value as \n>returned by 'git\n>>> >> show'.\n>>> >> \n>>> >> However, I have been unsuccessful in my attempts to use this \n>>> >identifier\n>>> >> to clone or checkout the associated source tree. Has anyone been\n>>> >> successful in using git to successfully replicate an \n>>> >unlabeled version\n>>> >> of sources in a repository?\n>>> >> \n>>> >> Here is my latest attempt:\n>>> >> /dir_i_want_to_replicate $ git show --pretty=short\n>>> >> commit 5b1313fb2758ffce8b624457f777d8cc6709608d\n>>> >> Author: ....\n>>> >> \n>>> >> /replication_dir $ git clone git://www.denx.de/git/u-boot.git\n>>> >> u-boot-mpc83xx\n>>> >> Blah blah blah..\n>>> >>  100% (4378/4378) done\n>>> >> /replication_dir/u-boot-mpc83xx/ $ git checkout\n>>> >> 5b1313fb2758ffce8b624457f777d8cc6709608d\n>>> >> error: pathspec '5b1313fb2758ffce8b624457f777d8cc6709608d' \n>>> >did not match\n>>> >> any. \n>>> >> \n>>> >\n>>> >Because there is no 5b1313fb2758ffce8b624457f777d8cc6709608d in the\n>>> >repo.\n>>> >\n>>> >  $ git clone git://www.denx.de/git/u-boot.git\n>>> >  Initialized empty Git repository in /tmp/u-boot/.git/\n>>> >  remote: Generating pack...\n>>> >  remote: Done counting 40938 objects.\n>>> >  remote: Deltifying 40938 objects.\n>>> >  remote:  100% (40938/40938) done\n>>> >  Indexing 40938 objects...\n>>> >  remote: Total 40938 (delta 32545), reused 39302 (delta 31040)\n>>> >  100% (40938/40938) done\n>>> >  Resolving 32545 deltas...\n>>> >  100% (32545/32545) done\n>>> >\n>>> >  $ cd u-boot; git-rev-list --all|grep ^5b1\n>>> >  5b1d713721c3ea02549940133f09236783dda1f9\n>>> >\n>>> >-Peter\n>>> \n>>> Hmmm. There must be something I am not understanding about git.\n>>> When I run the same command on my existing git repository, I get the\n>>> following:\n>>> $ git-rev-list --all | grep ^5b1\n>>> 5b1313fb2758ffce8b624457f777d8cc6709608d\n>>> 5b1d713721c3ea02549940133f09236783dda1f9\n>>> \n>>> Does git allow the removal of commits? I don't understand \n>>how I was able\n>>> to download it a couple of months ago, but it is no longer \n>>accessible.\n>>> \n>>> Thanks for the quick reply,\n>>> Sam\n>>\n>>If the branch was rebased, then yes. But this is not nice for\n>>contributers, so it is normally the rule to not rebase a published\n>>branch. But e.g. the branch 'pu' on git.git is a branch which will be\n>>rebased. This is mentioned by Junio in his notes from the maintainer.\n>>\n>>What made me wonder is, if you have the commit localy, why can't you\n>>check it out? Please try a git-fsck --full run, to see if you have a\n>>corrupt repo.\n>>\n>>-Peter\n>>\n>>\n>I had to upgrade from git v1.4.4.4 to v1.5.0.7 to have access \n>to the git-fsck command. 'git-fsck --full' printed out \n>nothing, and 'git-fsck --full run' printed out an error \n>message (error: invalid parameter: expected sha1, got 'run'). \n>Was I doing something wrong?\n>\n>--Sam\n\nPeter,\n\nI had an epiphany and discovered the problem: When I created the\nrepository I was trying to replicate, I didn't download it using git; I\nsimply copied it from another u-boot repository on the same server. \n\nWhen trying to use the commit number on a known good build, I didn't\nhave any problem replicating that branch.\n\nThanks for the help, and sorry it was a dumb error on my part.\n--Sam\n"},{"id":"50241","messageId":"20070808212011.GA3081@steel.home","threadId":"9441","inReplyTo":"CF7E46FCFF66AD478BB72724345289EC170CE5@twx-exch01.twacs.local","subject":"Re: Git'ing a non-labeled set of sources","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-08-08T21:20:11Z","receivedAt":"2007-08-08T21:20:11Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Sparks, Sam, Wed, Aug 08, 2007 21:52:14 +0200:\n> >From: Peter Baumann [mailto:waste.manager@gmx.de] \n> >\n> >Because there is no 5b1313fb2758ffce8b624457f777d8cc6709608d in the\n> >repo.\n> \n> Does git allow the removal of commits? I don't understand how I was able\n> to download it a couple of months ago, but it is no longer accessible.\n\nThey cleaned up. Rebased or discarded the branch which had the commit\nand cleaned up. That's what \"git gc\" and \"git prune\" do.\n"},{"id":"50340","messageId":"20070809200218.GA4567@efreet.light.src","threadId":"9441","inReplyTo":"CF7E46FCFF66AD478BB72724345289EC170CE4@twx-exch01.twacs.local","subject":"Re: Git'ing a non-labeled set of sources","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-08-09T20:02:18Z","receivedAt":"2007-08-09T20:02:18Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Wed, Aug 08, 2007 at 13:59:38 -0500, Sparks, Sam wrote:\n> Hello All,\n> \n> Please excuse me if this is an ignorant question; I'm new to git and my\n> have overlooked something in the documentation.\n> \n> I'm attempting to obtain a snapshot of source code from an unlabeled git\n> branch in a public repository. I've found in the documentation that a\n> timestamp cannot be used to specify a particular version of source code,\n> but I believe I can work with the commit value as returned by 'git\n> show'.\n\nClone and pull, over git protocol, only ask the server for objects referenced\nby any refs -- plus all objects those depend on. Which does not necessarily\nmean all commits, because references may be removed.\n\nIf a branch (ie. ref in refs/heads) is removed or rewound (moved to point to\ncommit that is not descendant of what it pointed to before), some commits may\nbecome dangling. Clone and pull won't know such commits exist and therefore\nwon't be able to ask server to provide them.\n\n> However, I have been unsuccessful in my attempts to use this identifier\n> to clone or checkout the associated source tree. Has anyone been\n> successful in using git to successfully replicate an unlabeled version\n> of sources in a repository?\n> \n> Here is my latest attempt:\n> /dir_i_want_to_replicate $ git show --pretty=short\n> commit 5b1313fb2758ffce8b624457f777d8cc6709608d\n> Author: ....\n\nI bet that if you do 'git lost-found' here, it will find something and this\ncommit will be among the finds, or predecessor of one of them.\n\n> /replication_dir $ git clone git://www.denx.de/git/u-boot.git\n> u-boot-mpc83xx\n> Blah blah blah..\n>  100% (4378/4378) done\n> /replication_dir/u-boot-mpc83xx/ $ git checkout\n> 5b1313fb2758ffce8b624457f777d8cc6709608d\n> error: pathspec '5b1313fb2758ffce8b624457f777d8cc6709608d' did not match\n> any. \n\nIt seems that git pull only accepts refs as arguments. So you'll have to\ncreate a branch at that commit in the origin to get it over to destination.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"}]}