* Tracking a branch using StGIT
@ 2006-09-15 8:20 Rajkumar S
2006-09-15 10:42 ` Catalin Marinas
0 siblings, 1 reply; 10+ messages in thread
From: Rajkumar S @ 2006-09-15 8:20 UTC (permalink / raw)
To: catalin.marinas; +Cc: git
Hi,
I am using StGIT to track a branch of a remote git repository
(actually a remote cvs repository, which I am tracking cvsimport)
The remote repository git branch show:
Package-Reorg-2005
RELENG_1
avendor
* master
origin
My local repository has:
root@beastie:# stg branch -l
Available branches:
> s MyBranch | clone of "RELENG_1"
Package-Reorg-2005 |
s RELENG_1 |
avendor |
master |
origin |
The .git/remotes/origin is
URL: /usr/local/pfSense/upstream/pfSense/.git
Pull: refs/heads/master:refs/heads/origin
Pull: refs/heads/avendor:refs/heads/avendor
Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005
Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
My requirement is to track RELENG_1 branch with StGIT while
maintaining my own patches. but when I do a stg pull the messages are:
Popping all applied patches... done
Pulling from "origin"...
Trying really trivial in-index merge... fatal: Merge requires
file-level merging Nope. Merging HEAD with
c0a06b86b8431293214f5eb18e49fcb8117c6070 Merging:
997e28966d7b7964562232628cc4f64dccbead9e Execute after commands via sh
&
c0a06b86b8431293214f5eb18e49fcb8117c6070 Execute after commands via sh &
found 1 common ancestor(s):
1b08ecedad1e6a7199f12d1fad97373587c85454 Minor nitpick. <br> after
firmware branch select box
CONFLICT (add/add): File usr/local/www/status_filter_reload.php added
non-identically in both branches. Adding as
usr/local/www/status_filter_reload.php~HEAD and
usr/local/www/status_filter_reload.php~c0a06b86b8431293214f5eb18e49fcb8117c6070
instead.
<snip>
It seems StGIT is trying to merge the origin branch from remote to
RELENG_1 of local. Is there a way to get RELENG_1 of remote to merge
with MyBranch (clone of "RELENG_1") of local?
raj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 8:20 Tracking a branch using StGIT Rajkumar S
@ 2006-09-15 10:42 ` Catalin Marinas
2006-09-15 10:58 ` Andy Whitcroft
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Catalin Marinas @ 2006-09-15 10:42 UTC (permalink / raw)
To: Rajkumar S; +Cc: git
On 15/09/06, Rajkumar S <rajkumars+git@gmail.com> wrote:
> I am using StGIT to track a branch of a remote git repository
> (actually a remote cvs repository, which I am tracking cvsimport)
[...]
> The .git/remotes/origin is
> URL: /usr/local/pfSense/upstream/pfSense/.git
> Pull: refs/heads/master:refs/heads/origin
> Pull: refs/heads/avendor:refs/heads/avendor
> Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005
> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
>
> My requirement is to track RELENG_1 branch with StGIT while
> maintaining my own patches. but when I do a stg pull the messages are:
[...]
> It seems StGIT is trying to merge the origin branch from remote to
> RELENG_1 of local. Is there a way to get RELENG_1 of remote to merge
> with MyBranch (clone of "RELENG_1") of local?
After StGIT pops all the patches, it just calls "git pull origin". My
understanding of GIT is that this should update local RELENG_1 with
the remote RELENG_1 from the "origin" repository. Anything wrong with
my assumptions?
--
Catalin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 10:42 ` Catalin Marinas
@ 2006-09-15 10:58 ` Andy Whitcroft
2006-09-15 11:17 ` Santi
2006-09-15 11:32 ` Rajkumar S
2 siblings, 0 replies; 10+ messages in thread
From: Andy Whitcroft @ 2006-09-15 10:58 UTC (permalink / raw)
To: Catalin Marinas; +Cc: Rajkumar S, git
Catalin Marinas wrote:
> On 15/09/06, Rajkumar S <rajkumars+git@gmail.com> wrote:
>> I am using StGIT to track a branch of a remote git repository
>> (actually a remote cvs repository, which I am tracking cvsimport)
> [...]
>> The .git/remotes/origin is
>> URL: /usr/local/pfSense/upstream/pfSense/.git
>> Pull: refs/heads/master:refs/heads/origin
>> Pull: refs/heads/avendor:refs/heads/avendor
>> Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005
>> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
>>
>> My requirement is to track RELENG_1 branch with StGIT while
>> maintaining my own patches. but when I do a stg pull the messages are:
> [...]
>> It seems StGIT is trying to merge the origin branch from remote to
>> RELENG_1 of local. Is there a way to get RELENG_1 of remote to merge
>> with MyBranch (clone of "RELENG_1") of local?
>
> After StGIT pops all the patches, it just calls "git pull origin". My
> understanding of GIT is that this should update local RELENG_1 with
> the remote RELENG_1 from the "origin" repository. Anything wrong with
> my assumptions?
>
Well that will update origin, and then merge the result with the current
branch. That second part probabally isn't what you had in mind.
Normally you would git fetch origin to stop that happening, but that
also can't update the branch you are on.
Not sure if this helps.
-apw
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 10:42 ` Catalin Marinas
2006-09-15 10:58 ` Andy Whitcroft
@ 2006-09-15 11:17 ` Santi
2006-09-15 11:34 ` Rajkumar S
2006-09-15 11:32 ` Rajkumar S
2 siblings, 1 reply; 10+ messages in thread
From: Santi @ 2006-09-15 11:17 UTC (permalink / raw)
To: Catalin Marinas; +Cc: Rajkumar S, git
2006/9/15, Catalin Marinas <catalin.marinas@gmail.com>:
> On 15/09/06, Rajkumar S <rajkumars+git@gmail.com> wrote:
> > I am using StGIT to track a branch of a remote git repository
> > (actually a remote cvs repository, which I am tracking cvsimport)
> [...]
> > The .git/remotes/origin is
> > URL: /usr/local/pfSense/upstream/pfSense/.git
> > Pull: refs/heads/master:refs/heads/origin
> > Pull: refs/heads/avendor:refs/heads/avendor
> > Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005
> > Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
> >
> > My requirement is to track RELENG_1 branch with StGIT while
> > maintaining my own patches. but when I do a stg pull the messages are:
> [...]
> > It seems StGIT is trying to merge the origin branch from remote to
> > RELENG_1 of local. Is there a way to get RELENG_1 of remote to merge
> > with MyBranch (clone of "RELENG_1") of local?
>
> After StGIT pops all the patches, it just calls "git pull origin". My
> understanding of GIT is that this should update local RELENG_1 with
> the remote RELENG_1 from the "origin" repository. Anything wrong with
> my assumptions?
>
No. But the it merge the first pull line in .git/remotes/origin into
the current branch. So he only has to put the RELENG_1 line the first,
as:
URL: /usr/local/pfSense/upstream/pfSense/.git
Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
Pull: refs/heads/master:refs/heads/origin
Pull: refs/heads/avendor:refs/heads/avendor
Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005
Santi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 10:42 ` Catalin Marinas
2006-09-15 10:58 ` Andy Whitcroft
2006-09-15 11:17 ` Santi
@ 2006-09-15 11:32 ` Rajkumar S
2006-09-15 11:42 ` Jakub Narebski
2 siblings, 1 reply; 10+ messages in thread
From: Rajkumar S @ 2006-09-15 11:32 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
On 9/15/06, Catalin Marinas <catalin.marinas@gmail.com> wrote:
> After StGIT pops all the patches, it just calls "git pull origin". My
> understanding of GIT is that this should update local RELENG_1 with
> the remote RELENG_1 from the "origin" repository. Anything wrong with
> my assumptions?
I checked this again, this time with out using stgit, and the results
are the same. So this is not a StGIT problem but a user error :(
My sequence of test is as follows:
# root@beastie:# git clone /usr/local/pfSense/upstream/pfSense/ releng_1
<snip>
100% (1220/1220) done
# cd releng_1/
# cat .git/remotes/origin
URL: /usr/local/pfSense/upstream/pfSense/.git
Pull: refs/heads/master:refs/heads/origin
Pull: refs/heads/avendor:refs/heads/avendor
Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005
Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
# git branch
Package-Reorg-2005
RELENG_1
avendor
* master
origin
# git pull
Already up-to-date.
# git checkout RELENG_1
# git pull
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Merging HEAD with c0a06b86b8431293214f5eb18e49fcb8117c6070
Merging:
997e28966d7b7964562232628cc4f64dccbead9e Execute after commands via sh &
c0a06b86b8431293214f5eb18e49fcb8117c6070 Execute after commands via sh &
found 1 common ancestor(s):
1b08ecedad1e6a7199f12d1fad97373587c85454 Minor nitpick. <br> after
firmware branch select box
As you can see, when I switched to RELENG_1 branch and did a git pull,
I am getting errors. I am wondering where I am wrong.
raj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 11:17 ` Santi
@ 2006-09-15 11:34 ` Rajkumar S
0 siblings, 0 replies; 10+ messages in thread
From: Rajkumar S @ 2006-09-15 11:34 UTC (permalink / raw)
To: Santi; +Cc: git
On 9/15/06, Santi <sbejar@gmail.com> wrote:
> No. But the it merge the first pull line in .git/remotes/origin into
> the current branch. So he only has to put the RELENG_1 line the first,
> as:
>
> URL: /usr/local/pfSense/upstream/pfSense/.git
> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
Thanks a lot, that should solve this.
raj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 11:32 ` Rajkumar S
@ 2006-09-15 11:42 ` Jakub Narebski
2006-09-15 11:59 ` Rajkumar S
0 siblings, 1 reply; 10+ messages in thread
From: Jakub Narebski @ 2006-09-15 11:42 UTC (permalink / raw)
To: git
Rajkumar S wrote:
> On 9/15/06, Catalin Marinas <catalin.marinas@gmail.com> wrote:
>
>> After StGIT pops all the patches, it just calls "git pull origin". My
>> understanding of GIT is that this should update local RELENG_1 with
>> the remote RELENG_1 from the "origin" repository. Anything wrong with
>> my assumptions?
>
> I checked this again, this time with out using stgit, and the results
> are the same. So this is not a StGIT problem but a user error :(
>
> My sequence of test is as follows:
>
> # root@beastie:# git clone /usr/local/pfSense/upstream/pfSense/ releng_1
> <snip>
> 100% (1220/1220) done
> # cd releng_1/
>
> # cat .git/remotes/origin
> URL: /usr/local/pfSense/upstream/pfSense/.git
> Pull: refs/heads/master:refs/heads/origin
> Pull: refs/heads/avendor:refs/heads/avendor
> Pull: refs/heads/Package-Reorg-2005:refs/heads/Package-Reorg-2005
> Pull: refs/heads/RELENG_1:refs/heads/RELENG_1
>
> # git branch
> Package-Reorg-2005
> RELENG_1
> avendor
> * master
> origin
>
> # git pull
> Already up-to-date.
>
> # git checkout RELENG_1
>
> # git pull
[...]
>
> As you can see, when I switched to RELENG_1 branch and did a git pull,
> I am getting errors. I am wondering where I am wrong.
git pull is git fetch + merge of first head in remotes file with _current_
branch.
You'd better git fetch if you are on RELENG_1 branch (if you are not on
master), then git checkout master && git pull . origin
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 11:42 ` Jakub Narebski
@ 2006-09-15 11:59 ` Rajkumar S
2006-09-15 12:09 ` Jakub Narebski
0 siblings, 1 reply; 10+ messages in thread
From: Rajkumar S @ 2006-09-15 11:59 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
On 9/15/06, Jakub Narebski <jnareb@gmail.com> wrote:
> git pull is git fetch + merge of first head in remotes file with _current_
> branch.
I was under the impression that git pull is git pull + merge of
corresponding branches in remotes files. ie master -> origin and
RELENG_1 -> RELENG_1. Is such a pull possible, for all lines in
remotes file?
In my case I am only interested in RELENG_1 branch, so would it be
fine if I just put the
"Pull: refs/heads/RELENG_1:refs/heads/RELENG_1" line in my remotes
file? Since I use StGIT I do not intend to modify my local RELENG_1
branch except by StGIT patches, so all pulls from remote should be
fast forward merged. Thus if the stg pull can pull in the remote
RELENG_1 to local RELENG_1 with patched popped, and fastforward merge
it, it would be great.
raj
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 11:59 ` Rajkumar S
@ 2006-09-15 12:09 ` Jakub Narebski
2006-09-15 12:18 ` Rajkumar S
0 siblings, 1 reply; 10+ messages in thread
From: Jakub Narebski @ 2006-09-15 12:09 UTC (permalink / raw)
To: git
Rajkumar S wrote:
> On 9/15/06, Jakub Narebski <jnareb@gmail.com> wrote:
>
>> git pull is git fetch + merge of first head in remotes file with _current_
>> branch.
>
> I was under the impression that git pull is git pull + merge of
> corresponding branches in remotes files. ie master -> origin and
> RELENG_1 -> RELENG_1. Is such a pull possible, for all lines in
> remotes file?
GIT-PULL(1)
DESCRIPTION
Runs git-fetch with the given parameters, and calls git-merge to merge the
retrieved head(s) into the current branch.
Besides in remotes file you have only specified which remote branch
is tracked by which local branch. Additionally all but first are marked
as not-for-merge. There is no place for default branch to merge with.
There was some discussion about moving remotes information into config
file, including marking tracking branches as read-only, marking default
branch to merge (or marking branch as for-merge/not-for-merge), marking
branch as of not fast-forwarding type (like 'pu' in git.git) on the
_server_ side etc. But it petered out, unfortunately.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Tracking a branch using StGIT
2006-09-15 12:09 ` Jakub Narebski
@ 2006-09-15 12:18 ` Rajkumar S
0 siblings, 0 replies; 10+ messages in thread
From: Rajkumar S @ 2006-09-15 12:18 UTC (permalink / raw)
To: Jakub Narebski, git
On 9/15/06, Jakub Narebski <jnareb@gmail.com> wrote:
> Besides in remotes file you have only specified which remote branch
> is tracked by which local branch. Additionally all but first are marked
> as not-for-merge. There is no place for default branch to merge with.
>
> There was some discussion about moving remotes information into config
> file, including marking tracking branches as read-only, marking default
> branch to merge (or marking branch as for-merge/not-for-merge), marking
> branch as of not fast-forwarding type (like 'pu' in git.git) on the
> _server_ side etc. But it petered out, unfortunately.
Thanks a lot for your comments, I have just put the RELENG_1 line in
the remotes and have RELENG_1 always checked out.
raj
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-09-15 12:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-15 8:20 Tracking a branch using StGIT Rajkumar S
2006-09-15 10:42 ` Catalin Marinas
2006-09-15 10:58 ` Andy Whitcroft
2006-09-15 11:17 ` Santi
2006-09-15 11:34 ` Rajkumar S
2006-09-15 11:32 ` Rajkumar S
2006-09-15 11:42 ` Jakub Narebski
2006-09-15 11:59 ` Rajkumar S
2006-09-15 12:09 ` Jakub Narebski
2006-09-15 12:18 ` Rajkumar S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).