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

[feature request] git add completion should exclude staged content

From
Wwookietreiber <kizkizzbangbang@googlemail.com>
Date
Jan 26, 2013, 17:21 UTC
Message-ID
<20130126172137.GB5852@mobster.11n_AP_Router>
Dear Git Hackers,
I have a feature request for `git add` auto completion:

`git add` auto completion suggests all files / directories, filtered by nothing. I guess it would be much nicer (as in increasing productivity) if it would only suggest unstaged content, as reported by `git status`, because that would be the only content one would be able to add.

Example:
    $ git status
    # On branch develop
    # Changes to be committed:
    #   (use "git reset HEAD <file>..." to unstage)
    #
    #       modified:   src/main/scala/XYChart.scala
    #
    # Untracked files:
    #   (use "git add <file>..." to include in what will be committed)
    #
    #       notes/0.2.0.markdown
    $ git add <auto-complete>
    build.sbt              .ensime                .git/                  project/               scalastyle-config.xml  todo
    COPYING                .ensime_lucene/        notes/                 README.md              src/
    $ git add
Where it should be:
    $ git add <auto-complete>
    $ git add notes/0.2.0.markdown
... because `notes/0.2.0.markdown` is the only thing I can add.
-- 
Beste Grüße / Best Regards
Christian Krause aka wookietreiber

-----------------------------------------------------------------------

EGAL WIE DICHT DU BIST, GOETHE WAR DICHTER.
Next: Junio C Hamano
Message 1 of 13 in “[feature request] git add completion should exclude staged content”
  1. wookietreiberJan 26, 2013
  2. Junio C HamanoJan 27, 2013
  3. Manlio PerilloJan 28, 2013
  4. Michael J GruberJan 28, 2013
  5. Manlio PerilloJan 28, 2013
  6. Michael J GruberJan 28, 2013
  7. Junio C HamanoJan 28, 2013
  8. Manlio PerilloJan 28, 2013
  9. Marc KhouzamJan 30, 2013
  10. Manlio PerilloJan 30, 2013
  11. Marc KhouzamJan 30, 2013
  12. Manlio PerilloJan 30, 2013
  13. Manlio PerilloJan 28, 2013

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.