Skip to contentSkip to conversation

document --exec for git-push

PATCH In review Uwe Kleine-König 2 participants 2 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 document --exec for git-push

The text is just copied from git-send-pack.txt.

---
 Documentation/git-push.txt |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

There are still some options undocumented, but I don't know what they do exacly:

	--thin
	--no-thin
	--repo=
	-v

(OK, I just now saw -v and I'm to lazy to do it now :-)

Best regards
Uwe

Documentation/git-push.txt +7 -1
index 197f4b5..a19631d 100644
@@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects
 
 SYNOPSIS
 --------
-'git-push' [--all] [--tags] [-f | --force] <repository> <refspec>...
+'git-push' [--all] [--tags] [--exec=<receive-pack>] [-f | --force] <repository> <refspec>...
 
 DESCRIPTION
 -----------
@@ -67,6 +67,12 @@ the remote repository.
 	addition to refspecs explicitly listed on the command
 	line.
 
+\--exec::
+	Path to the 'git-receive-pack' program on the remote
+	end.  Sometimes useful when pushing to a remote
+	repository over ssh, and you do not have the program in
+	a directory on the default $PATH.
+
 -f, \--force::
 	Usually, the command refuses to update a remote ref that is
 	not a descendant of the local ref used to overwrite it.
Signature · 6 lines
1.5.0.rc1.g581a

-- 
Uwe Kleine-König

http://www.google.com/search?q=72+PS+point+in+inch
#1 lore raw
Quoted 1 line · Uwe Kleine-König

The text is just copied from git-send-pack.txt.

Thanks.

Quoted 7 lines

There are still some options undocumented, but I don't know what they do exacly:

	--thin
	--no-thin
	--repo=
	-v

Usually a good way to answer that question is:

	$ git blame -C -L'/^int cmd_push/,/^}/' builtin-push.c

and then run "git show" on the commit that introduces the option parsing, e.g. commit bcc785f6 for --repo.

----------------------------------------------------------------
commit bcc785f611dc6084be75999a3b6bafcc950e21d6

Author: Linus Torvalds <[email protected]>
Date:   Mon Oct 30 08:28:59 2006 -0800

git push: add verbose flag and allow overriding of default target repository

This adds a command line flag "-v" to enable a more verbose mode, and "--repo=" to override the default target repository for "git push" (which otherwise always defaults to "origin").

This, together with the patch to allow dashes in config variable names, allows me to do

	[alias]
		push-all = push -v --repo=all

in my user-global config file, and then I can (for any project I maintain) add to the project-local config file

	[remote "all"]
		url=one.target.repo:/directory
		url=another.target:/pub/somewhere/else

and now "git push-all" just updates all the target repositories, and shows me what it does - regardless of which repo I am in.

----------------------------------------------------------------

But now I wonder why Linus couldn't have just done:

	[alias]
		push-all = push -v all

-- >8 --
git-push documentation: remaining bits

Mention --thin, --no-thin, --repo and -v.

---

Documentation/git-push.txt +13 -1
index a19631d..3e8dbcf 100644
@@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects
 
 SYNOPSIS
 --------
-'git-push' [--all] [--tags] [--exec=<receive-pack>] [-f | --force] <repository> <refspec>...
+'git-push' [--all] [--tags] [--exec=<receive-pack>]  [--repo=all] [-f | --force] [--thin | --no-thin] [-v] [<repository> <refspec>...]
 
 DESCRIPTION
 -----------
@@ -79,6 +79,18 @@ the remote repository.
 	This flag disables the check.  This can cause the
 	remote repository to lose commits; use it with care.
 
+\--repo=<repo>::
+	When no repository is specified the command defaults to
+	"origin"; this overrides it.
+
+\--thin, \--no-thin::
+	These options are passed to `git-send-pack`.  Thin
+	transfer spends extra cycles to minimize the number of
+	objects to be sent and meant to be used on slower connection.
+
+-v::
+	Run verbosely.
+
 include::urls.txt[]
 
 Author