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

Re: RFC: git status --amend

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2015, 17:16 UTC
Message-ID
<xmqqlhibn509.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150401084230.GA12282@gmail.com>
David Aguilar <davvid@gmail.com> writes:
> Would generalizing "status" to have a more gittish syntax make
> you feel less torn?

One of my early draft responses included a one whose punch line was "Why limit the comparison to HEAD and HEAD^ but no other point of reference?"

But I discarded it as a useless suggestion before writing it down, primarily because I couldn't come up with an explanation _why_ being able to say "git status --relative-to=next Makefile" is useful when on the 'master' branch.

Surely, I may have changes in the Makefile relative to my index because I am preparing for the next rc release, and the Makefile in the index may be different from that of the 'next' branch because I am on my 'master' branch. The potential output can be "explained" in such a mechanical sense (e.g. "we generated the output this way").

But I do not see an easy-to-understand explanation of the _meaning_ of the output, i.e. "What does it mean that the working tree file has been modified since the checkout and the index is different relative to that other branch? How does that information help me after I learn it? What would I do differently with that information at hand?"

Compared to that, "Show me what damage I would inflict if I did 'commit' now. By the way, I may want to see that information limited to these paths" is a question whose utility is easily explained, and so is the same question with 'commit' replaced by 'commit --amend'.

Previous: David AguilarNext: David Aguilar
Message 5 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.