{"thread":{"id":"6605","subject":"Fetching from peer's public repo","startedAt":"2007-02-01T15:24:34Z","lastAt":"2007-02-02T10:25:58Z","messageCount":3,"participants":["Bill Lear","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"33243","messageId":"17858.1586.41833.597819@lisa.zopyra.com","threadId":"6605","inReplyTo":null,"subject":"Fetching from peer's public repo","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2007-02-01T15:24:34Z","receivedAt":"2007-02-01T15:24:34Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"My fetch from a peer's public repo seems to be failing:\n\n% git --bare fetch git://source/public/project topic:topic\nremote: Generating pack...\nremote: Done counting 48 objects.\nremote: Result has 34 objects.\nremote: Deltifying 34 objects.\nremote:  100% (34/34) done\nremote: Total 34, written 34 (delta 22), reused 24 (delta 12)\nUnpacking 34 objects\n 100% (34/34) done\n* refs/heads/topic: not updating to non-fast forward branch 'topic' of git://source/public/project\n  old...new: 1c332f5...f3b18ff\n\nI assume that is because his public repo does not contain changes I\nhave pushed into my public repo.  So, I asked him to pull from\nmy public repo into his.  He did, and said that git blathered that\nthere were 12 changed files, etc.\n\nI then tried the fetch again and it failed in the same way.  If I\nlook at the log output for the \"old...new: 1c332f5...f3b18ff\" line\nabove, I see the changes that he has that I want to get, but apparently\ncannot (I tried to pull from my public to my private and it said\n\"Already up-to-date.\"):\n\n% git log 1c332f5..f3b18ff\n[... output looks reasonable ...]\n\nAny ideas on how I can resolve this?\n\nAlso, what is the difference between:\n\n% git log 1c332f5..f3b18ff\n\nand\n\n% git log 1c332f5...f3b18ff\n\nwith the latter having three dots instead of two?  It seems to show\nmuch more output, but I don't know what the intent is.\n\n\nBill\n"},{"id":"33248","messageId":"17858.4348.498027.613657@lisa.zopyra.com","threadId":"6605","inReplyTo":"17858.1586.41833.597819@lisa.zopyra.com","subject":"Re: Fetching from peer's public repo","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2007-02-01T16:10:36Z","receivedAt":"2007-02-01T16:10:36Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"On Thursday, February 1, 2007 at 09:24:34 (-0600) Bill Lear writes:\n>My fetch from a peer's public repo seems to be failing:\n>\n>% git --bare fetch git://source/public/project topic:topic\n>remote: Generating pack...\n>remote: Done counting 48 objects.\n>remote: Result has 34 objects.\n>remote: Deltifying 34 objects.\n>remote:  100% (34/34) done\n>remote: Total 34, written 34 (delta 22), reused 24 (delta 12)\n>Unpacking 34 objects\n> 100% (34/34) done\n>* refs/heads/topic: not updating to non-fast forward branch 'topic' of git://source/public/project\n>  old...new: 1c332f5...f3b18ff\n>\n>I assume that is because his public repo does not contain changes I\n>have pushed into my public repo.  So, I asked him to pull from\n>my public repo into his.  He did, and said that git blathered that\n>there were 12 changed files, etc.\n\nOk, I think I have discovered the cause...  Sorry for wasting time.\nMy pal did a git pull from my public repo's topic branch into his\nmaster branch by mistake.  My fetch of his topic branch of course\nfailed, as he did not update it.\n\nYou know, some training wheels for git might be nice...\n\nSuch as a git config variable:\n\n[newbies]\n\tplease.god.save.me.if.I.try.to.merge = true\n\nWhich would cause git-pull, git-fetch, git-merge (whatever) to prompt\nyou:\n\n  Hey Nimrod, you're about to MERGE something from one branch to\n  another --- are you sure you really want to do this? (y/n)\n\nI myself have shot several repos in the head by doing this by mistake.\nOnce this is done, and you pull it into your private repos, the infection\nspreads, and you have to go back to each and repair them...\n\nWe'll get this right soon...\n\n\nBill\n"},{"id":"33367","messageId":"epv3h5$4f7$1@sea.gmane.org","threadId":"6605","inReplyTo":"17858.1586.41833.597819@lisa.zopyra.com","subject":"Re: Fetching from peer's public repo","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-02-02T10:25:58Z","receivedAt":"2007-02-02T10:25:58Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Bill Lear wrote:\n\n> My fetch from a peer's public repo seems to be failing:\n> \n> % git --bare fetch git://source/public/project topic:topic\n> remote: Generating pack...\n> remote: Done counting 48 objects.\n> remote: Result has 34 objects.\n> remote: Deltifying 34 objects.\n> remote:  100% (34/34) done\n> remote: Total 34, written 34 (delta 22), reused 24 (delta 12)\n> Unpacking 34 objects\n>  100% (34/34) done\n> * refs/heads/topic: not updating to non-fast forward branch 'topic' of git://source/public/project\n>   old...new: 1c332f5...f3b18ff\n> \n> I assume that is because his public repo does not contain changes I\n> have pushed into my public repo.  So, I asked him to pull from\n> my public repo into his.  He did, and said that git blathered that\n> there were 12 changed files, etc.\n\nFirst, git did good and protected you from losing your changes which\nwere in \"your public repo\" but not in \"his public repo\" (well, not exacly\nlose, as you can very easy revert fetch thanks to ORIG_HEAD and reflog\nif you have it enabled).\n\nSecond, if you know what you are doing, for example if you know that\ntopic branch was rebased (has it's history changed), so you know that\nnon-fast forward case is not an error, you can use euther \"+topic:topic\"\nrefspec, or use --force option to git-fetch.\n\nThird, you do not pull into bare repo: you fetch into bare repository.\nBut, fourth, it looks like he has some changes and you have some changes;\nunless you want to have those changes in separate branches, you have to\nmerge your and his changes; or he has to merge your and his changes\n(but in working repo, i.e. with working directory, not a bare one, as\nmerge might result in conflicts) using git-pull.\n\nFifth, this situation is what tracking branches are for: you fetch\nhis from his working branch changes into tracking branch and merge\ninto your working branch when you want; he fetches your changes\nfrom your working branch into tracking branch and merge your changes\ninto his working branch when he wants.\n\n[...]\n> Also, what is the difference between:\n> \n> % git log 1c332f5..f3b18ff\n> \n> and\n> \n> % git log 1c332f5...f3b18ff\n> \n> with the latter having three dots instead of two?  It seems to show\n> much more output, but I don't know what the intent is.\n\n\"git log 1c332f5..f3b18ff\" is equivalent to \"git log f3b18ff --not 1c332f5\"\nwhich means whowing all changes reachable from f3b18ff but which are not\nreachable from 1c332f5, which result in all changes from 1c332f5 (non\ninclusive) to f3b18ff (inclusive).\n\n\"git log 1c332f5...f3b18ff\" is equivalent to\n  git log 1c332f5 f3b18ff --not $(git merge-base --all 1c332f5 f3b18ff)\nwhich result in all changes which are either in 1c332f5 xor in f3b18ff,\nbut not in both.\n\ngit 1.5.0 would have --left-right option to mark which side (1c332f5 or\nf3b18ff) revisions in 1c332f5...f3b18ff belong to.\n\n\nP.S. RTFM.\n\ngit-log(1):\n       The command takes options applicable to the git-rev-list(1) command to con-\n       trol what is shown and how\n\ngit-rev-list(1):\n       Another  special  notation  is  \"<commit1>...<commit2>\" which is useful for\n       merges. The resulting set of commits is the  symmetric  difference  between\n       the two operands. The following two commands are equivalent:\n\n               $ git-rev-list A B --not $(git-merge-base --all A B)\n               $ git-rev-list A...B\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}