All of lore.kernel.org
 help / color / mirror / Atom feed
* git push --repo option not working as described in git manual.
@ 2015-01-23 13:24 Prem Muthedath
  0 siblings, 0 replies; 3+ messages in thread
From: Prem Muthedath @ 2015-01-23 13:24 UTC (permalink / raw)
  To: git

I am using git 2.2.2 and want to report an issue with git push --repo option.

git 2.2.2 manual says that git push --repo=public will push to public
only if the current branch does not track a remote branch.  See
http://git-scm.com/docs/git-push

However, I see that git pushes even when the current branch is
tracking a remote branch.

Here is the test case (push default setting is simple, git version
2.2.2, Mac OS X 10.10.1):
1. I have a local branch "master".
2. "master" tracks remote branch "blah/master".  Here "blah" is the
remote repository.
3. While I am on my local master branch, I run git push --repo=silver
4. git pushes the local master branch to silver repository.
5. But per git manual, it shouldn't push to silver, as the local
branch is tracking "blah/master".


Here is another test case (push default setting is simple, git version
2.2.2, Mac OS X 10.10.1):
1. I have a local branch "whoa".
2. "whoa" tracks remote branch "origin/whoa".  Here "origin" is the
remote repository.
3. While I am on my local whoa branch, I run git push --repo=blah
4. git pushes the local whoa branch to blah repository.
5. But per git manual, it shouldn't push to blah, as the local branch
is tracking "origin/whoa".


Appreciate your help.
Prem

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git push --repo option not working as described in git manual.
  2015-01-26  8:21 Prem
@ 2015-01-26 16:31 ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2015-01-26 16:31 UTC (permalink / raw)
  To: Prem; +Cc: git, Michael J Gruber, Jay Soffian

The conclusions from the last time we discussed this [*1*], the last
word was that

	git push $some_opt... --repo=$Repo $more_opt... $args...

is designed to work exactly like

	git push $some_opt... $more_opt... $Repo $args...

and the documentation that says otherwise is incorrect.  It seems
that we never followed up on this after we made that determination,
which is unfortunate.  We should at least correct the documentation.


[Reference]

*1* http://thread.gmane.org/gmane.comp.version-control.git/110827/focus=111715

^ permalink raw reply	[flat|nested] 3+ messages in thread

* git push --repo option not working as described in git manual.
@ 2015-01-26  8:21 Prem
  2015-01-26 16:31 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Prem @ 2015-01-26  8:21 UTC (permalink / raw)
  To: git

I am using git 2.2.2 and want to report an issue with git push --repo option.

git 2.2.2 manual says that git push --repo=public will push to public
only if the current branch does not track a remote branch.  See
http://git-scm.com/docs/git-push

However, I see that git pushes even when the current branch is
tracking a remote branch.

Here is the test case (push default setting is simple, git version
2.2.2, Mac OS X 10.10.1):
1. I have a local branch "master".
2. "master" tracks remote branch "blah/master".  Here "blah" is the
remote repository.
3. While I am on my local master branch, I run git push --repo=silver
4. git pushes the local master branch to silver repository.
5. But per git manual, it shouldn't push to silver, as the local
branch is tracking "blah/master". So is this broken or am I missing something?


Here is another test case (push default setting is simple, git version
2.2.2, Mac OS X 10.10.1):
1. I have a local branch "whoa".
2. "whoa" tracks remote branch "origin/whoa".  Here "origin" is the
remote repository.
3. While I am on my local whoa branch, I run git push --repo=blah
4. git pushes the local whoa branch to blah repository.
5. But per git manual, it shouldn't push to blah, as the local branch
is tracking "origin/whoa".  So is this broken or am I missing something?


Appreciate your help.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-26 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 13:24 git push --repo option not working as described in git manual Prem Muthedath
2015-01-26  8:21 Prem
2015-01-26 16:31 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.