From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Prem <prem.muthedath@gmail.com>
Subject: [PATCH] git-push.txt: document the behavior of --repo
Date: Tue, 27 Jan 2015 13:35:53 +0100 [thread overview]
Message-ID: <d8bed5c1736a4a291208227b0f54c1039d67f5cc.1422361902.git.git@drmicha.warpmail.net> (raw)
In-Reply-To: <xmqqppa1mrku.fsf@gitster.dls.corp.google.com>
As per the code, the --repo <repo> option is equivalent to the <repo>
argument to 'git push'. [It exists for historical reasons, back from the time
when options had to come before arguments.]
Say so. [But not that.]
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Thanks for digging up the thread, Junio. I never would have thought that
I had been with the Git community for that long already...
Documentation/git-push.txt | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index ea97576..0ad31c4 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -219,22 +219,8 @@ origin +master` to force a push to the `master` branch). See the
`<refspec>...` section above for details.
--repo=<repository>::
- This option is only relevant if no <repository> argument is
- passed in the invocation. In this case, 'git push' derives the
- remote name from the current branch: If it tracks a remote
- branch, then that remote repository is pushed to. Otherwise,
- the name "origin" is used. For this latter case, this option
- can be used to override the name "origin". In other words,
- the difference between these two commands
-+
---------------------------
-git push public #1
-git push --repo=public #2
---------------------------
-+
-is that #1 always pushes to "public" whereas #2 pushes to "public"
-only if the current branch does not track a remote branch. This is
-useful if you write an alias or script around 'git push'.
+ This option is equivalent to the <repository> argument; the latter
+ wins if both are specified.
-u::
--set-upstream::
--
2.3.0.rc1.222.gae238f2
next prev parent reply other threads:[~2015-01-27 12:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 8:21 git push --repo option not working as described in git manual Prem
2015-01-26 16:31 ` Junio C Hamano
2015-01-27 12:35 ` Michael J Gruber [this message]
2015-01-27 19:30 ` [PATCH] git-push.txt: document the behavior of --repo Junio C Hamano
2015-01-27 22:07 ` Eric Sunshine
2015-01-28 16:20 ` Prem Muthedath
2015-01-28 20:12 ` Junio C Hamano
2015-01-28 20:30 ` Eric Sunshine
2015-01-28 20:55 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8bed5c1736a4a291208227b0f54c1039d67f5cc.1422361902.git.git@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=prem.muthedath@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).