{"thread":{"id":"5568","subject":"Tracking a branch using StGIT","startedAt":"2006-09-15T08:20:45Z","lastAt":"2006-09-15T12:18:01Z","messageCount":10,"participants":["Rajkumar S","Catalin Marinas","Andy Whitcroft","Santi","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26951","messageId":"64de5c8b0609150120h3aeee6dcv976da13134396654@mail.gmail.com","threadId":"5568","inReplyTo":null,"subject":"Tracking a branch using StGIT","fromName":"Rajkumar S","fromEmail":"rajkumars+git@gmail.com","sentAt":"2006-09-15T08:20:45Z","receivedAt":"2006-09-15T08:20:45Z","isPatch":false,"sender":{"key":"rajkumars+git@gmail.com","avatar":null},"body":"Hi,\n\nI am using StGIT to track a branch of a remote git repository\n(actually a remote cvs repository, which I am tracking cvsimport)\n\nThe remote repository git branch show:\n  Package-Reorg-2005\n  RELENG_1\n  avendor\n* master\n  origin\n\nMy local repository has:\n\nroot@beastie:# stg branch -l\nAvailable branches:\n> s     MyBranch            | clone of \"RELENG_1\"\n        Package-Reorg-2005  |\n  s     RELENG_1            |\n        avendor             |\n        master              |\n        origin              |\n\nThe .git/remotes/origin is\nURL: /usr/local/pfSense/upstream/pfSense/.git\nPull: refs/heads/master:refs/heads/origin\nPull: refs/heads/avendor:refs/heads/avendor\nPull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005\nPull: refs/heads/RELENG_1:refs/heads/RELENG_1\n\nMy requirement is to track RELENG_1 branch with StGIT while\nmaintaining my own patches. but when I do a stg pull the messages are:\n\nPopping all applied patches... done\nPulling from \"origin\"...\nTrying really trivial in-index merge... fatal: Merge requires\nfile-level merging Nope. Merging HEAD with\nc0a06b86b8431293214f5eb18e49fcb8117c6070 Merging:\n997e28966d7b7964562232628cc4f64dccbead9e Execute after commands via sh\n&\nc0a06b86b8431293214f5eb18e49fcb8117c6070 Execute after commands via sh &\nfound 1 common ancestor(s):\n1b08ecedad1e6a7199f12d1fad97373587c85454 Minor nitpick.  <br> after\nfirmware branch select box\nCONFLICT (add/add): File usr/local/www/status_filter_reload.php added\nnon-identically in both branches. Adding as\nusr/local/www/status_filter_reload.php~HEAD and\nusr/local/www/status_filter_reload.php~c0a06b86b8431293214f5eb18e49fcb8117c6070\ninstead.\n<snip>\n\nIt seems StGIT is trying to merge the origin branch from remote to\nRELENG_1 of local. Is there a way to get RELENG_1 of remote to merge\nwith MyBranch (clone of \"RELENG_1\") of local?\n\nraj\n"},{"id":"26957","messageId":"b0943d9e0609150342y6105d8d1o61abb1934da9f51b@mail.gmail.com","threadId":"5568","inReplyTo":"64de5c8b0609150120h3aeee6dcv976da13134396654@mail.gmail.com","subject":"Re: Tracking a branch using StGIT","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2006-09-15T10:42:26Z","receivedAt":"2006-09-15T10:42:26Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 15/09/06, Rajkumar S <rajkumars+git@gmail.com> wrote:\n> I am using StGIT to track a branch of a remote git repository\n> (actually a remote cvs repository, which I am tracking cvsimport)\n[...]\n> The .git/remotes/origin is\n> URL: /usr/local/pfSense/upstream/pfSense/.git\n> Pull: refs/heads/master:refs/heads/origin\n> Pull: refs/heads/avendor:refs/heads/avendor\n> Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005\n> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1\n>\n> My requirement is to track RELENG_1 branch with StGIT while\n> maintaining my own patches. but when I do a stg pull the messages are:\n[...]\n> It seems StGIT is trying to merge the origin branch from remote to\n> RELENG_1 of local. Is there a way to get RELENG_1 of remote to merge\n> with MyBranch (clone of \"RELENG_1\") of local?\n\nAfter StGIT pops all the patches, it just calls \"git pull origin\". My\nunderstanding of GIT is that this should update local RELENG_1 with\nthe remote RELENG_1 from the \"origin\" repository. Anything wrong with\nmy assumptions?\n\n-- \nCatalin\n"},{"id":"26959","messageId":"450A8740.7000308@shadowen.org","threadId":"5568","inReplyTo":"b0943d9e0609150342y6105d8d1o61abb1934da9f51b@mail.gmail.com","subject":"Re: Tracking a branch using StGIT","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2006-09-15T10:58:08Z","receivedAt":"2006-09-15T10:58:08Z","isPatch":false,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Catalin Marinas wrote:\n> On 15/09/06, Rajkumar S <rajkumars+git@gmail.com> wrote:\n>> I am using StGIT to track a branch of a remote git repository\n>> (actually a remote cvs repository, which I am tracking cvsimport)\n> [...]\n>> The .git/remotes/origin is\n>> URL: /usr/local/pfSense/upstream/pfSense/.git\n>> Pull: refs/heads/master:refs/heads/origin\n>> Pull: refs/heads/avendor:refs/heads/avendor\n>> Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005\n>> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1\n>>\n>> My requirement is to track RELENG_1 branch with StGIT while\n>> maintaining my own patches. but when I do a stg pull the messages are:\n> [...]\n>> It seems StGIT is trying to merge the origin branch from remote to\n>> RELENG_1 of local. Is there a way to get RELENG_1 of remote to merge\n>> with MyBranch (clone of \"RELENG_1\") of local?\n> \n> After StGIT pops all the patches, it just calls \"git pull origin\". My\n> understanding of GIT is that this should update local RELENG_1 with\n> the remote RELENG_1 from the \"origin\" repository. Anything wrong with\n> my assumptions?\n> \n\nWell that will update origin, and then merge the result with the current\nbranch.  That second part probabally isn't what you had in mind.\nNormally you would git fetch origin to stop that happening, but that\nalso can't update the branch you are on.\n\nNot sure if this helps.\n\n-apw\n"},{"id":"26960","messageId":"8aa486160609150417s288d6540tc8ee6aa83bbf67b4@mail.gmail.com","threadId":"5568","inReplyTo":"b0943d9e0609150342y6105d8d1o61abb1934da9f51b@mail.gmail.com","subject":"Re: Tracking a branch using StGIT","fromName":"Santi","fromEmail":"sbejar@gmail.com","sentAt":"2006-09-15T11:17:23Z","receivedAt":"2006-09-15T11:17:23Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"2006/9/15, Catalin Marinas <catalin.marinas@gmail.com>:\n> On 15/09/06, Rajkumar S <rajkumars+git@gmail.com> wrote:\n> > I am using StGIT to track a branch of a remote git repository\n> > (actually a remote cvs repository, which I am tracking cvsimport)\n> [...]\n> > The .git/remotes/origin is\n> > URL: /usr/local/pfSense/upstream/pfSense/.git\n> > Pull: refs/heads/master:refs/heads/origin\n> > Pull: refs/heads/avendor:refs/heads/avendor\n> > Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005\n> > Pull: refs/heads/RELENG_1:refs/heads/RELENG_1\n> >\n> > My requirement is to track RELENG_1 branch with StGIT while\n> > maintaining my own patches. but when I do a stg pull the messages are:\n> [...]\n> > It seems StGIT is trying to merge the origin branch from remote to\n> > RELENG_1 of local. Is there a way to get RELENG_1 of remote to merge\n> > with MyBranch (clone of \"RELENG_1\") of local?\n>\n> After StGIT pops all the patches, it just calls \"git pull origin\". My\n> understanding of GIT is that this should update local RELENG_1 with\n> the remote RELENG_1 from the \"origin\" repository. Anything wrong with\n> my assumptions?\n>\n\nNo. But the it merge the first pull line in .git/remotes/origin into\nthe current branch. So he only has to put the RELENG_1 line the first,\nas:\n\nURL: /usr/local/pfSense/upstream/pfSense/.git\nPull: refs/heads/RELENG_1:refs/heads/RELENG_1\nPull: refs/heads/master:refs/heads/origin\nPull: refs/heads/avendor:refs/heads/avendor\nPull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005\n\nSanti\n"},{"id":"26962","messageId":"64de5c8b0609150432o5d6835a8pb578082746576864@mail.gmail.com","threadId":"5568","inReplyTo":"b0943d9e0609150342y6105d8d1o61abb1934da9f51b@mail.gmail.com","subject":"Re: Tracking a branch using StGIT","fromName":"Rajkumar S","fromEmail":"rajkumars+git@gmail.com","sentAt":"2006-09-15T11:32:14Z","receivedAt":"2006-09-15T11:32:14Z","isPatch":false,"sender":{"key":"rajkumars+git@gmail.com","avatar":null},"body":"On 9/15/06, Catalin Marinas <catalin.marinas@gmail.com> wrote:\n\n> After StGIT pops all the patches, it just calls \"git pull origin\". My\n> understanding of GIT is that this should update local RELENG_1 with\n> the remote RELENG_1 from the \"origin\" repository. Anything wrong with\n> my assumptions?\n\nI checked this again, this time with out using stgit, and the results\nare the same. So this is not a StGIT problem but a user error :(\n\nMy sequence of test is as follows:\n\n# root@beastie:# git clone /usr/local/pfSense/upstream/pfSense/ releng_1\n<snip>\n 100% (1220/1220) done\n# cd releng_1/\n\n# cat .git/remotes/origin\nURL: /usr/local/pfSense/upstream/pfSense/.git\nPull: refs/heads/master:refs/heads/origin\nPull: refs/heads/avendor:refs/heads/avendor\nPull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005\nPull: refs/heads/RELENG_1:refs/heads/RELENG_1\n\n# git branch\n  Package-Reorg-2005\n  RELENG_1\n  avendor\n* master\n  origin\n\n# git pull\nAlready up-to-date.\n\n# git checkout RELENG_1\n\n# git pull\nTrying really trivial in-index merge...\nfatal: Merge requires file-level merging\nNope.\nMerging HEAD with c0a06b86b8431293214f5eb18e49fcb8117c6070\nMerging:\n997e28966d7b7964562232628cc4f64dccbead9e Execute after commands via sh &\nc0a06b86b8431293214f5eb18e49fcb8117c6070 Execute after commands via sh &\nfound 1 common ancestor(s):\n1b08ecedad1e6a7199f12d1fad97373587c85454 Minor nitpick.  <br> after\nfirmware branch select box\n\nAs you can see, when I switched to RELENG_1 branch and did a git pull,\nI am getting errors. I am wondering where I am wrong.\n\nraj\n"},{"id":"26963","messageId":"64de5c8b0609150434r2162042dmcf6b587466f6ab9d@mail.gmail.com","threadId":"5568","inReplyTo":"8aa486160609150417s288d6540tc8ee6aa83bbf67b4@mail.gmail.com","subject":"Re: Tracking a branch using StGIT","fromName":"Rajkumar S","fromEmail":"rajkumars+git@gmail.com","sentAt":"2006-09-15T11:34:24Z","receivedAt":"2006-09-15T11:34:24Z","isPatch":false,"sender":{"key":"rajkumars+git@gmail.com","avatar":null},"body":"On 9/15/06, Santi <sbejar@gmail.com> wrote:\n> No. But the it merge the first pull line in .git/remotes/origin into\n> the current branch. So he only has to put the RELENG_1 line the first,\n> as:\n>\n> URL: /usr/local/pfSense/upstream/pfSense/.git\n> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1\n\nThanks a lot, that should solve this.\n\nraj\n"},{"id":"26964","messageId":"eee3i5$ib6$1@sea.gmane.org","threadId":"5568","inReplyTo":"64de5c8b0609150432o5d6835a8pb578082746576864@mail.gmail.com","subject":"Re: Tracking a branch using StGIT","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-15T11:42:25Z","receivedAt":"2006-09-15T11:42:25Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Rajkumar S wrote:\n\n> On 9/15/06, Catalin Marinas <catalin.marinas@gmail.com> wrote:\n> \n>> After StGIT pops all the patches, it just calls \"git pull origin\". My\n>> understanding of GIT is that this should update local RELENG_1 with\n>> the remote RELENG_1 from the \"origin\" repository. Anything wrong with\n>> my assumptions?\n> \n> I checked this again, this time with out using stgit, and the results\n> are the same. So this is not a StGIT problem but a user error :(\n> \n> My sequence of test is as follows:\n> \n> # root@beastie:# git clone /usr/local/pfSense/upstream/pfSense/ releng_1\n> <snip>\n>  100% (1220/1220) done\n> # cd releng_1/\n> \n> # cat .git/remotes/origin\n> URL: /usr/local/pfSense/upstream/pfSense/.git\n> Pull: refs/heads/master:refs/heads/origin\n> Pull: refs/heads/avendor:refs/heads/avendor\n> Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005\n> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1\n> \n> # git branch\n>   Package-Reorg-2005\n>   RELENG_1\n>   avendor\n> * master\n>   origin\n> \n> # git pull\n> Already up-to-date.\n> \n> # git checkout RELENG_1\n> \n> # git pull\n[...]\n> \n> As you can see, when I switched to RELENG_1 branch and did a git pull,\n> I am getting errors. I am wondering where I am wrong.\n\ngit pull is git fetch + merge of first head in remotes file with _current_\nbranch.\n\nYou'd better git fetch if you are on RELENG_1 branch (if you are not on\nmaster), then git checkout master && git pull . origin\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"26965","messageId":"64de5c8b0609150459i2e678a02r86bb678ea420054f@mail.gmail.com","threadId":"5568","inReplyTo":"eee3i5$ib6$1@sea.gmane.org","subject":"Re: Tracking a branch using StGIT","fromName":"Rajkumar S","fromEmail":"rajkumars@gmail.com","sentAt":"2006-09-15T11:59:38Z","receivedAt":"2006-09-15T11:59:38Z","isPatch":false,"sender":{"key":"rajkumars@gmail.com","avatar":null},"body":"On 9/15/06, Jakub Narebski <jnareb@gmail.com> wrote:\n\n> git pull is git fetch + merge of first head in remotes file with _current_\n> branch.\n\nI was under the impression that git pull is git pull + merge of\ncorresponding branches in remotes files. ie master -> origin and\nRELENG_1 -> RELENG_1. Is such a pull possible, for all lines in\nremotes file?\n\nIn my case I am only interested in RELENG_1 branch, so would it be\nfine if I just put the\n\"Pull: refs/heads/RELENG_1:refs/heads/RELENG_1\" line in my remotes\nfile? Since I use StGIT I do not intend  to modify my local RELENG_1\nbranch except by StGIT patches, so all pulls from remote should be\nfast forward merged. Thus if the stg pull can pull in the remote\nRELENG_1 to local RELENG_1 with patched popped, and fastforward merge\nit, it would be great.\n\nraj\n"},{"id":"26966","messageId":"eee551$mtc$1@sea.gmane.org","threadId":"5568","inReplyTo":"64de5c8b0609150459i2e678a02r86bb678ea420054f@mail.gmail.com","subject":"Re: Tracking a branch using StGIT","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-15T12:09:34Z","receivedAt":"2006-09-15T12:09:34Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Rajkumar S wrote:\n\n> On 9/15/06, Jakub Narebski <jnareb@gmail.com> wrote:\n> \n>> git pull is git fetch + merge of first head in remotes file with _current_\n>> branch.\n> \n> I was under the impression that git pull is git pull + merge of\n> corresponding branches in remotes files. ie master -> origin and\n> RELENG_1 -> RELENG_1. Is such a pull possible, for all lines in\n> remotes file?\n\nGIT-PULL(1)\nDESCRIPTION\n       Runs  git-fetch with the given parameters, and calls git-merge to merge the\n       retrieved head(s) into the current branch.\n\nBesides in remotes file you have only specified which remote branch\nis tracked by which local branch. Additionally all but first are marked\nas not-for-merge. There is no place for default branch to merge with.\n\nThere was some discussion about moving remotes information into config\nfile, including marking tracking branches as read-only, marking default\nbranch to merge (or marking branch as for-merge/not-for-merge), marking\nbranch as of not fast-forwarding type (like 'pu' in git.git) on the\n_server_ side etc. But it petered out, unfortunately.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"26967","messageId":"64de5c8b0609150518x279e786tc11b85171dcbe899@mail.gmail.com","threadId":"5568","inReplyTo":"eee551$mtc$1@sea.gmane.org","subject":"Re: Tracking a branch using StGIT","fromName":"Rajkumar S","fromEmail":"rajkumars@gmail.com","sentAt":"2006-09-15T12:18:01Z","receivedAt":"2006-09-15T12:18:01Z","isPatch":false,"sender":{"key":"rajkumars@gmail.com","avatar":null},"body":"On 9/15/06, Jakub Narebski <jnareb@gmail.com> wrote:\n> Besides in remotes file you have only specified which remote branch\n> is tracked by which local branch. Additionally all but first are marked\n> as not-for-merge. There is no place for default branch to merge with.\n>\n> There was some discussion about moving remotes information into config\n> file, including marking tracking branches as read-only, marking default\n> branch to merge (or marking branch as for-merge/not-for-merge), marking\n> branch as of not fast-forwarding type (like 'pu' in git.git) on the\n> _server_ side etc. But it petered out, unfortunately.\n\nThanks a lot for your comments, I have just put the RELENG_1 line in\nthe remotes and have RELENG_1 always checked out.\n\nraj\n"}]}