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

jn/commit-no-change-wo-status (Re: What's cooking in git.git (Aug 2010, #02; Wed, 11))

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 12, 2010, 03:15 UTC
Message-ID
<20100812031508.GC19174@burratino>
In-Reply-To
<AANLkTi=5biMga0=nAVwQLNd1jEJXXtUJBqdhuyt-YoWv@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> But I don't know, the "git commit" output doesn't confuse me so I'm
> not in the target audience.
For what it’s worth, I had three scenarios in mind:

Getting started ---------------

One way to learn a program is to just try things. Some people take this practice to an extreme and unforunately (1) would expect “git commit” to do the same thing as “cvs commit” and (2) would not want to read a manual or a long stream of text when it does not do so.

I hope we can streamline that process somehow, for example by starting the output with the error message:

 $ git commit
 fatal: no changes added to commit
 hint: use 'git add' and 'git reset' to update what will be committed
 hint: you have 37 untracked files; use 'git status' to list them

24-line terminal ----------------

When I forget to stage changes, the previous output in the terminal’s scrollback buffer may give a reminder of what those changes were. The current “git status” output makes that information harder to find.

For the same reason, I basically never use git status without -s. Before status --short existed, I used diff-files and ls-files -o. Now I generally use “add -u”, “diff --cached”, and “add/reset -p”.

Need reminder of changes ------------------------

Some people forget where they are and would be confused if “git commit” just failed without explaining why. They need an indication of what just happened and what they need to try to do to fix it up.

For such people, the existing output is fine. With a successful series, the new output would also be fine, and running “git checkout” or “git status” would seem the most natural thing in the world rather than an imposition.

Hope that helps. Jonathan

Previous: Ævar Arnfjörð BjarmasonNext: Elijah Newren
Message 4 of 56 in “What's cooking in git.git (Aug 2010, #02; Wed, 11)”
  1. Junio C HamanoAug 11, 2010
  2. Jonathan NiederAug 12, 2010
  3. Ævar Arnfjörð BjarmasonAug 12, 2010
  4. jn/commit-no-change-wo-status (Re: What's cooking in git.git (Aug 2010, #02; Wed, 11))Jonathan Nieder, Aug 12, 2010
  5. Elijah NewrenAug 12, 2010
  6. Junio C HamanoAug 12, 2010
  7. Elijah NewrenAug 12, 2010
  8. Johannes SixtAug 12, 2010
  9. Greg BrockmanAug 12, 2010
  10. Ævar Arnfjörð BjarmasonAug 12, 2010
  11. Junio C HamanoAug 12, 2010
  12. Greg BrockmanAug 12, 2010
  13. Junio C HamanoAug 12, 2010
  14. Ævar Arnfjörð BjarmasonAug 12, 2010
  15. Erik Faye-LundAug 12, 2010
  16. Ævar Arnfjörð BjarmasonAug 12, 2010
  17. Chris PackhamAug 12, 2010
  18. Ævar Arnfjörð BjarmasonAug 12, 2010
  19. windows smoke tester (was Re: What's cooking in git.git (Aug 2010, #02; Wed, 11))Chris Packham, Aug 12, 2010
  20. Ævar Arnfjörð BjarmasonAug 12, 2010
  21. Chris PackhamAug 12, 2010
  22. Ævar Arnfjörð BjarmasonAug 13, 2010
  23. Chris PackhamAug 14, 2010
  24. Ævar Arnfjörð BjarmasonAug 14, 2010
  25. Tay Ray ChuanAug 15, 2010
  26. Ævar Arnfjörð BjarmasonAug 15, 2010
  27. Tay Ray ChuanAug 15, 2010
  28. Ilari LiusvaaraAug 12, 2010
  29. Johannes SixtAug 12, 2010
  30. Ilari LiusvaaraAug 12, 2010
  31. Elijah NewrenAug 12, 2010
  32. Junio C HamanoAug 12, 2010
  33. Junio C HamanoAug 12, 2010
  34. jn/apply-filename-with-sp (Re: What's cooking in git.git (Aug 2010, #02; Wed, 11))Jonathan Nieder, Aug 12, 2010
  35. Ævar Arnfjörð BjarmasonAug 12, 2010
  36. Junio C HamanoAug 12, 2010
  37. Ævar Arnfjörð BjarmasonAug 13, 2010
  38. Johannes SixtAug 13, 2010
  39. Jonathan NiederAug 14, 2010
  40. Johannes SixtAug 14, 2010
  41. Jonathan NiederAug 15, 2010
  42. 0/3 apply: handle traditional patches with space in filenameJonathan Nieder, Aug 19, 2010
  43. 1/3 apply: split quoted filename handling into new functionJonathan Nieder, Aug 19, 2010
  44. 2/3 tests: exercise "git apply" with weird filenamesJonathan Nieder, Aug 19, 2010
  45. 3/3 apply: handle traditional patches with space in filenameJonathan Nieder, Aug 19, 2010
  46. Johannes SixtAug 19, 2010
  47. Jonathan NiederAug 20, 2010
  48. jn/svn-feJonathan Nieder, Aug 13, 2010
  49. Jakub NarebskiAug 13, 2010
  50. Johannes SixtAug 13, 2010
  51. 0/5 vcs-svn: Port to WindowsJonathan Nieder, Aug 13, 2010
  52. 1/5 compat: add strtok_r()Jonathan Nieder, Aug 13, 2010
  53. 2/5 vcs-svn: Rename dirent pool to build on WindowsJonathan Nieder, Aug 14, 2010
  54. 3/5 vcs-svn: Avoid %z in format stringJonathan Nieder, Aug 14, 2010
  55. 4/5 t9010 (svn-fe): use Unix-style path in URIJonathan Nieder, Aug 14, 2010
  56. 5/5 t9010 (svn-fe): avoid symlinks in testJonathan Nieder, Aug 14, 2010

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.