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

Breaking "git status" (was Re: [PATCH 5/5] shortstatus: a new command)

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 6, 2009, 16:23 UTC
Message-ID
<7vljlwnc6j.fsf_-_@alter.siamese.dyndns.org>
In-Reply-To
<20090806153339.GC1970@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Missing docs, of course, and tests would be nice. Is this meant to be
> plumbing? If not, the name is too long to type. ;)
As I said, this was more of technology demonstration with an iffy UI.

I've been wondering if this should be "git status -T" (a la "ls-files -t", but nice short-and-sweet -t is taken for rarely used --template).

> I think one of the most often-requested things for a "git status"
> replacement is that "git status <path>" do path-limiting.

For that matter, as 1.7.0 material that potentially breaks backward compatibility in a big way, it is tempting to suggest that we might want to depart from the traditional "status takes the same parameters to commit and gives a preview of what would happen" semantics. Even though the current "status" takes the same set of parameters as "commit" takes, many of the parameters, especially the ones related to message generation, do not make sense.

Here is a possible transition plan. I am not married to it, but throwing it out as a discussion starter:

 * Introduce "git commit --dry-run", that takes place of the current
   "git status".
   We will keep "git commit --dry-run" forever so that people can simply
   do a "s/git status/git commit --dry-run/" to keep their own scripts
   that currently run "git status" before deciding to run "git commit" (or
   runs their own re-implementation of "git commit") working.
 * Introduce "status.traditional" configuration.  In 1.6.5
   - When set to true, "git status" behaves as "git commit --dry-run";
   - When set to false, "git status" uses a new semantics (TBD);
   - When unconfigured, the user gets a big incompatibility warning.
   and in 1.7.0, we will flip the default (i.e. unconfigured case) to
   false.
 * Implement "git status" that is not a preview of "git commit".  Its new
   semantics would include:
   - Reject any parameter that traditional "git status" ignored (i.e. -m);
   - Pathspecs are not about "git commit -o" anymore.  They are path
     limiters.
   - One of the options, -t, gives the "shortstatus".

If we go a route like this, we do not want to add "shortstatus" as a standalone command.

Previous: Jeff KingNext: Jeff King
Message 8 of 22 in “Revamping "git status"”
  1. 0/5 Revamping "git status"Junio C Hamano, Aug 5, 2009
  2. 1/5 diff-index: report unmerged new entriesJunio C Hamano, Aug 5, 2009
  3. 2/5 diff-index: keep the original index intactJunio C Hamano, Aug 5, 2009
  4. 3/5 wt-status.c: rework the way changes to the index and work tree are summarizedJunio C Hamano, Aug 5, 2009
  5. 4/5 status: show worktree status of conflicted paths separatelyJunio C Hamano, Aug 5, 2009
  6. 5/5 shortstatus: a new commandJunio C Hamano, Aug 5, 2009
  7. Jeff KingAug 6, 2009
  8. Breaking "git status" (was Re: [PATCH 5/5] shortstatus: a new command)Junio C Hamano, Aug 6, 2009
  9. Jeff KingAug 6, 2009
  10. Junio C HamanoAug 6, 2009
  11. Sverre RabbelierAug 6, 2009
  12. Jeff KingAug 6, 2009
  13. Jeff KingAug 6, 2009
  14. Junio C HamanoAug 6, 2009
  15. Thomas RastAug 5, 2009
  16. Junio C HamanoAug 5, 2009
  17. Thomas RastAug 5, 2009
  18. Thomas RastAug 5, 2009
  19. Junio C HamanoAug 5, 2009
  20. Thomas RastAug 5, 2009
  21. Junio C HamanoAug 5, 2009
  22. Thomas RastAug 5, 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.