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

Re: RFC: git status --amend

From
Jeff King <peff@peff.net>
Date
Mar 31, 2015, 18:04 UTC
Message-ID
<20150331180414.GB19206@peff.net>
In-Reply-To
<551AB64F.4030400@cs-ware.de>
On Tue, Mar 31, 2015 at 04:59:27PM +0200, Sven Strickroth wrote:
Show 9 quoted lines
> for frontends or scripts it would be helpful to be able to use "git
> status" for getting the repository status compared to HEAD~1 instead of
> only HEAD (as provided by "git commit --amend" in the pre-filled commit
> message).
> 
> Thus, I'm suggesting to add a "--amend" parameter (or a parameter with a
> better naming) to "git status".
> 
> What do you think of this idea?

Once upon a time "git status" really was just "git commit --dry-run". These days it has diverged a bit. But I think you could get what you want with:

  git commit --dry-run --amend
It even supports alternate styles like --short.
-Peff
Previous: Sven StrickrothNext: Junio C Hamano
Message 2 of 7 in “RFC: git status --amend”
  1. Sven StrickrothMar 31, 2015
  2. Jeff KingMar 31, 2015
  3. Junio C HamanoMar 31, 2015
  4. David AguilarApr 1, 2015
  5. Junio C HamanoApr 1, 2015
  6. David AguilarApr 3, 2015
  7. Jeff KingApr 3, 2015

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.