From: Rajkumar S <hidden> Date: 2016-06-15 22:42:40
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
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
From: Andy Whitcroft <hidden> Date: 2016-06-15 22:42:40
Catalin Marinas wrote:
On 15/09/06, Rajkumar S [off-list ref] wrote:
quoted
I am using StGIT to track a branch of a remote git repository
(actually a remote cvs repository, which I am tracking cvsimport)
[...]
quoted
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:
[...]
quoted
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
I am using StGIT to track a branch of a remote git repository
(actually a remote cvs repository, which I am tracking cvsimport)
[...]
quoted
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:
[...]
quoted
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
From: Rajkumar S <hidden> Date: 2016-06-15 22:42:40
On 9/15/06, Catalin Marinas [off-list ref] 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
From: Rajkumar S <hidden> Date: 2016-06-15 22:42:40
On 9/15/06, Santi [off-list ref] 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
From: Jakub Narebski <hidden> Date: 2016-06-15 22:42:40
Rajkumar S wrote:
On 9/15/06, Catalin Marinas [off-list ref] wrote:
quoted
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
From: Rajkumar S <hidden> Date: 2016-06-15 22:42:40
On 9/15/06, Jakub Narebski [off-list ref] 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
From: Jakub Narebski <hidden> Date: 2016-06-15 22:42:40
Rajkumar S wrote:
On 9/15/06, Jakub Narebski [off-list ref] wrote:
quoted
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
From: Rajkumar S <hidden> Date: 2016-06-15 22:42:40
On 9/15/06, Jakub Narebski [off-list ref] 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