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

git-status -- trying to understand all possible states

From
MTMichael Toy <michael@toyland.org>
Date
Apr 1, 2014, 20:07 UTC
Message-ID
<4AF06B83-E928-4FE2-8094-F23CE3BA1EBC@toyland.org>
I also have this question posted to stack overflow ( http://stackoverflow.com/questions/22792906/how-do-i-produce-every-possible-git-status ), but perhaps this is a better place to ask this question.
In working on some code which provides an interface to existing git repositories the question I had was "what actions should I present to a user", which lead to the question, "what does a user need to do to generate that condition", which lead to developing this gist:
https://gist.github.com/the-michael-toy/9907309
... which is a ruby script which tries to produce a repository with a file in every possible "git-status" XY condition
Of the 24 possibilities (not counting ignored) in git-status, there are 7 that I can't figure out how to generate.

D M deleted from index C [ MD] copied in index D D unmerged, both deleted A U unmerged, added by us U A unmerged, added by them

any clues, including pointers to "just go read XXX" would be appreciated.
Next: Junio C Hamano
Message 1 of 5 in “git-status -- trying to understand all possible states”
  1. Michael ToyApr 1, 2014
  2. Junio C HamanoApr 1, 2014
  3. Michael ToyApr 1, 2014
  4. Jonathan NiederApr 1, 2014
  5. Matthieu MoyApr 2, 2014

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.