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

Re: [PATCH] git-push: Accept -n as a synonym for --dry-run.

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 13, 2009, 02:44 UTC
Message-ID
<7vfxar5zsi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1252800302-26560-1-git-send-email-nelhage@mit.edu>
Nelson Elhage <nelhage@MIT.EDU> writes:
> '-n' is the standard way to specify a dry run for other git commands,
> so make 'git-push' accept it as well.
> ---
Sign-off?

Indeed -n is used in many places for --dry-run, but it is not _the_ standard way.

commit, push (as you identified), reflog, and send-email have --dry-run but -n is not a synonym for it. Some of them even use -n as a shorthand for a more often used option than --dry-run.

So the justification should be more like "push does not any other option that deserves a short-and-sweet -n better, it will not have any such option in the future, and --dry-run is very often used that it deserves to use -n as its short-hand."

I tend to agree with the first two points, but I am not sure about the third point. Do people dry-push that often?

Previous: Nelson ElhageNext: Nelson Elhage
Message 2 of 8 in “git-push: Accept -n as a synonym for --dry-run.”
  1. git-push: Accept -n as a synonym for --dry-run.Nelson Elhage, Sep 13, 2009
  2. Junio C HamanoSep 13, 2009
  3. Nelson ElhageSep 13, 2009
  4. Nelson ElhageSep 13, 2009
  5. Junio C HamanoSep 13, 2009
  6. Junio C HamanoSep 13, 2009
  7. Nelson ElhageSep 13, 2009
  8. Junio C HamanoSep 13, 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.