{"thread":{"id":"2343","subject":"Re: Trying to Update All Heads of a Repository","startedAt":"2005-11-04T14:49:40Z","lastAt":"2005-11-04T14:49:40Z","messageCount":1,"participants":["Jon Loeliger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11121","messageId":"E1EY2su-0006LW-IN@jdl.com","threadId":"2343","inReplyTo":null,"subject":"Re: Trying to Update All Heads of a Repository","fromName":"Jon Loeliger","fromEmail":"jdl@freescale.com","sentAt":"2005-11-04T14:49:40Z","receivedAt":"2005-11-04T14:49:40Z","isPatch":false,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"\nJunio says:\n    My \"pu\" is somewhat special; it is rewound and rebased all the time,\n    so merging with its older self would conflict with it.  That's why\n    my example remotes/origin file has '+' in front of it.  It tells\n    git-fetch that the other side _might_ rebase and fetch would not\n    result in a fast-forward merge when that happens.\n\nSo, from the git-pull man page:\n\n    For \"git push\", the local ref that matches <src> is used to fast\n    forward the remote ref that matches <dst>. If the optional plus + is\n    used, the remote ref is updated even if it does not result in a fast\n    forward update.\n\nAh-ha!  Wait.  But here's the conceptual missing piece: When might I\n_know_ I have the situation where a fast-forward update might not\nhappen?  And as a remote puller, that would be \"never\" -- unless I know\nsomething about the nature of the remote end.  That is, like you said,\n\"pu\" is subject to wild fluctuation and non-linear behavior.  But any\nrandom puller can't know that a priori.  So far, that is out-of-band\ninformation about a branch that needs to be \"available\".\n\nI think my previous \"Ah ha!\" paragraph should be massaged and added to\nthe git-pull man page as part of the above (man page) quoted material.\nThat's one.\n\n\nJunio explained:\n>  Alternatively, with your original remotes/origin\n> file, you should be able to do:\n> \n>\t$ git checkout master\n>\t$ git fetch origin master:origin +pu:pu maint:maint\n>       $ git pull . origin\n\nWhat an excellent example for the git-pull man page!  That's two.\n\n\n\nJunio also exampled:\n\n    My \"guinea pig\" repository has this in $GIT_DIR/remotes/origin:\n\n\t    URL: git://git.kernel.org/pub/scm/git/git.git\n\t    Pull: master:origin\n\t    Pull: +pu:pu\n\t    Pull: maint:maint\n\n    This means that my \"master\" is copied to the \"origin\" branch of\n    the guinea pig repository and \"pu\" and \"maint\" are copies of my\n    \"pu\" and \"maint\" branches.  You never do your own development on\n    branches that appear on the right hand side of colon on \"Pull\"\n    lines (i.e. origin, pu and maint) in this repository.  They are\n    to be updated by git-fetch.\n\nThe notion that multiple pull lines can be placed in the .git/remotes\nfile should be added to the git-pull man page.  That's three.\n\nFurthermore, there is one very important guideline you just\nstated in that paragraph:\n\n    You never do your own development on branches that appear on the\n    right hand side of colon on \"Pull\" lines in a repository.  They are\n    to be updated by git-fetch.\n\nAnd it might bear stating the corollary:\n\n    The reason for a \"Pull: master:origin\" line is to side-step\n    the above maxim and provide a unique place where the local\n    developer can do her own work.\n\nI'll consider that concept item four for the git-pull man page . :-)\n\n\n> Sorry, my \"pu\" does not fast forward.  The branch is to showcase what\n> I've received or picked up from the list, and what changes are under\n> consideration for inclusion.\n\nHeh.  I understand it now! :-)  No problem.\n\n\nAnd finally:\n\n> The \"hold/draw\" topic branch (thanks for your ASCII art) is fully\n> merged into my \"master\"; in fact it's head is the master branch head.\n\nThat's five-ish.  I'm on deck for some git-pull man page and\ndrawing documentation patches.  Coming up Real Soon Now.\n\nThanks for the explanations!\n\njdl\n"}]}