{"thread":{"id":"12331","subject":"git clone/push collision","startedAt":"2008-02-26T18:59:21Z","lastAt":"2008-02-26T18:59:21Z","messageCount":1,"participants":["Joshua Williams"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"70018","messageId":"47C46189.5050905@qlogic.com","threadId":"12331","inReplyTo":null,"subject":"git clone/push collision","fromName":"Joshua Williams","fromEmail":"joshua.williams@qlogic.com","sentAt":"2008-02-26T18:59:21Z","receivedAt":"2008-02-26T18:59:21Z","isPatch":false,"sender":{"key":"joshua.williams@qlogic.com","avatar":null},"body":"I'm unsure if this is a \"problem\" with git but the associated\nerror/warning messages can be concerning to uninitiated users.\nIt occurs when someone starts a clone and someone else does a\npush while the clone is processing.  In 1.5.3.8 we are seeing\nthe following messages after the clone completes (the push was\nto the b2 branch):\n\n=====\n\njwilliams> git clone /nfs_share/repo.git my_clone.git\nInitialized empty Git repository in \n/export/jwilliams/test/my_clone.git/.git/\n5294402 blocks\nChecking 6156 files out...\n  100% (6156/6156) done\n\njwilliams> cd my_clone.git/\n\njwilliams> git branch\nerror: refs/remotes/origin/b2 does not point to a valid object!\n* fwdev\n\njwilliams> git pull\nerror: refs/remotes/origin/b2 does not point to a valid object!\nerror: refs/remotes/origin/b2 does not point to a valid object!\nremote: Generating pack...\nremote: Counting objects: 1\nremote: Done counting 1831 objects.\nResult has 1288 objects.\nremote: Deltifying 1288 objects...\nremote:  100% (1288/1288) done\nIndexing 1288 objects...\nremote: Total 1288 (delta 855), reused 806 (delta 406)\n  100% (1288/1288) done\nResolving 855 deltas...\n  100% (855/855) done\n127 objects were added to complete this thin pack.\nAlready up-to-date.\n\njwilliams> git branch\n* fwdev\n\njwilliams> git pull\nAlready up-to-date.\n\n=====\n\nAs you can see, the \"does not point to a valid object\" messages\ngo away after the subsequent pull.  This apparently synced things\nup properly.  We clone a very large repo off of NFS which is slow\nso this particular collision happens frequently.  This type of\nmessage leaves users feeling uncomfortable.\n\nIn 1.5.4.2 this \"window\" appears much smaller.  When it does\nappear to hit, the messages and behavior are a little different:\n\n=====\n\njwilliams> git clone /nfs_share/repo.git my_clone.git\nInitialized empty Git repository in \n/export/jwilliams/test/my_clone.git/.git/\n5294419 blocks\nerror: Trying to write ref refs/remotes/origin/b2 with nonexistant \nobject 9bf5a068f8ba817b93e1ef4e3904323833c948d8\nfatal: Cannot update the ref 'refs/remotes/origin/b2'.\nChecking out files: 100% (6156/6156), done.\n\njwilliams> cd my_clone.git/\n\njwilliams> git branch\n* fwdev\n\njwilliams> git pull\nremote: Counting objects: 1839, done.\nremote: Compressing objects: 100% (890/890), done.\nremote: Total 1296 (delta 902), reused 764 (delta 406)\nReceiving objects: 100% (1296/1296), 21.82 MiB | 8845 KiB/s, done.\nResolving deltas: 100% (902/902), completed with 122 local objects.\n From /nfs_share/repo.git/\n  * [new branch]      b2 -> origin/b2\nAlready up-to-date.\n\njwilliams> git branch\n* fwdev\n\njwilliams> git pull\nAlready up-to-date.\n\n=====\n\nIn 1.5.4.2 the subsequent pull does seem to sync things up properly\nas well.\n\nIn both the 1.5.3.8 and 1.5.4.2 cases the b2 branch is unavailable\nto work on until the subsequent pull.\n\nI'm just curious to know if this behavior is known and if it is\nconsidered \"normal\".\n\n- Josh\n"}]}