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

Re: [PATCH] add --porcelain option to git-push

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 25, 2009, 19:07 UTC
Message-ID
<7vtz249lpf.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090623011001.GA15352@cthulhu>
Larry D'Anna <larry@elder-gods.org> writes:
Show 10 quoted lines
> If --porcelain is used git-push will produce machine-readable output.  The
> output status line for each ref will be tab-separated and sent to stdout instead
> of stderr.  The full symbolic names of the refs will be given.  For example
>
> $ git push --dry-run --porcelain master :foobar 2>/dev/null \
>   | perl -pe 's/\t/ TAB /g'
>
> = TAB refs/heads/master:refs/heads/master TAB [up to date]
> - TAB :refs/heads/foobar TAB [deleted]
> ---
Thanks.  Sign-off?

On a tangent, this reminds me of something that I often find myself wanting to do. Currently I do:

	$ git push --dry-run
           A..B master -> master
        $ git log --oneline A..B ;# cut and paste A..B from the output
	$ git push

to achieve what I want; get an overview of what I'd be pushing as the final sanity check before running the actual push.

I've been wondering if it would be a good idea to teach -v (or some other option) to do this automatically. That is,

	$ git push [--dry-run] [--summary[=<n>]]
would give the output from "git log --oneline [-n <n>] A..B".

No, I am not suggesting you to fold such an unrelated feature to your patch at all.

Previous: Larry D'AnnaNext: Larry D'Anna
Message 11 of 13 in “I'd like to be able to know what git-push will do”
  1. Larry D'AnnaJun 18, 2009
  2. Jeff KingJun 22, 2009
  3. add --porcelain option to git-pushLarry D'Anna, Jun 23, 2009
  4. Marc BranchaudJun 23, 2009
  5. add --plumbing option to git-pushLarry D'Anna, Jun 23, 2009
  6. Junio C HamanoJun 23, 2009
  7. Marc BranchaudJun 23, 2009
  8. Markus HeidelbergJun 23, 2009
  9. Constantine PlotnikovJun 23, 2009
  10. Larry D'AnnaJun 24, 2009
  11. Junio C HamanoJun 25, 2009
  12. Larry D'AnnaJun 25, 2009
  13. add --summary option to git-pushLarry D'Anna, Jun 27, 2009

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.