git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] document --exec for git-push

From
Junio C Hamano <junkio@cox.net>
Date
Jan 16, 2007, 19:45 UTC
Message-ID
<7vk5zmycvj.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070116150201.GA2427@cepheus>
Uwe Kleine-König  <zeisberg@informatik.uni-freiburg.de> writes:
> The text is just copied from git-send-pack.txt.
Thanks.
Show 7 quoted 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 <torvalds@osdl.org>
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. 
---
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index a19631d..3e8dbcf 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -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
Previous: Uwe Kleine-König
Message 2 of 2 in “document --exec for git-push”
  1. document --exec for git-pushUwe Kleine-König, Jan 16, 2007
  2. Junio C HamanoJan 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.