Re: Now What?

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: Now What?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:10

Daniel Barkalow [off-list ref] writes:
On Thu, 3 Nov 2005, Junio C Hamano wrote:
quoted
"Peter Eriksen" [off-list ref] writes:
quoted
~/git/git-core]cat .git/remotes/origin
URL: git://git.kernel.org/pub/scm/git/git.git
Pull: master:origin

~/git/git-core]git-checkout maint
~/git/git-core]git pull
You are merging my master into your "maint", probably a copy of
my (previous) maint.
I think the situation is that he really wanted to update master, but 
forgot that he was on the maint branch.
I wonder if it would make sense to have something in .git/remotes/
file that says "run merge only when I am on frotz branch", like
this:

        ~/git/git-core]cat .git/remotes/origin
        URL: git://git.kernel.org/pub/scm/git/git.git
        Pull: master:origin
	Fetch-Only-Unless: master

        ~/git/git-core]git-checkout maint
	~/git/git-core]git pull
	warning: not merging because you are not on 'master' branch.

This would make the above "git pull" behave identical to "git
fetch", and the user can then do:

	$ git checkout master
        $ git pull . origin

Useful?  Useless?

Re: Now What?

From: Josef Weidendorfer <hidden>
Date: 2016-06-15 22:42:10

On Thursday 03 November 2005 23:07, Junio C Hamano wrote:
I wonder if it would make sense to have something in .git/remotes/
file that says "run merge only when I am on frotz branch", like
this:

        ~/git/git-core]cat .git/remotes/origin
        URL: git://git.kernel.org/pub/scm/git/git.git
        Pull: master:origin
	Fetch-Only-Unless: master

        ~/git/git-core]git-checkout maint
	~/git/git-core]git pull
	warning: not merging because you are not on 'master' branch.
This is quite limiting, if you keep multiple branches from origin in your
repository.
It would be better to be able to specify per-branch Pull lines. I.e. the
default pull action depends on the branch you are on.

        URL: git://git.kernel.org/pub/scm/git/git.git
        Pull(master): master:origin

        ~/git/git-core]git-checkout maint
 	~/git/git-core]git pull
 	warning: no default pull action for branch 'maint' specified

Syntax arguable.

Josef

Re: Now What?

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:42:10

On Thu, 3 Nov 2005, Junio C Hamano wrote:
Daniel Barkalow [off-list ref] writes:
quoted
On Thu, 3 Nov 2005, Junio C Hamano wrote:
quoted
"Peter Eriksen" [off-list ref] writes:
quoted
~/git/git-core]cat .git/remotes/origin
URL: git://git.kernel.org/pub/scm/git/git.git
Pull: master:origin

~/git/git-core]git-checkout maint
~/git/git-core]git pull
You are merging my master into your "maint", probably a copy of
my (previous) maint.
I think the situation is that he really wanted to update master, but 
forgot that he was on the maint branch.
I wonder if it would make sense to have something in .git/remotes/
file that says "run merge only when I am on frotz branch", like
this:

        ~/git/git-core]cat .git/remotes/origin
        URL: git://git.kernel.org/pub/scm/git/git.git
        Pull: master:origin
	Fetch-Only-Unless: master

        ~/git/git-core]git-checkout maint
	~/git/git-core]git pull
	warning: not merging because you are not on 'master' branch.

This would make the above "git pull" behave identical to "git
fetch", and the user can then do:

	$ git checkout master
        $ git pull . origin

Useful?  Useless?
People probably want to merge master into their personal work branches, 
though; I think it would be better to have it list branches into which it 
shouldn't be merged. I think the pair of "maint" and "master" are special, 
in that they get different fixes for the same problems, and so they'll 
merge badly or to a wrong result.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help