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

[PATCH 0/6] Teach Status options around showing ignored files

From
Jjameson.miller81@gmail.com <jameson.miller81@gmail.com>
Date
Oct 5, 2017, 20:54 UTC
Message-ID
<20171005205443.206900-1-jameson.miller81@gmail.com>
From: Jameson Miller <jamill@microsoft.com>

This patch series is the second part of [1], which was split into 2 parts. The first part, added an optimization in the directory listing logic to not scan the contents of ignored directories and was merged to master with commit 5aaa7fd3. This patch series includes the second part to expose additional arguments to the --ignored option on the status command.

This patch series teaches the status command more options to control
which ignored files are reported independently of the which untracked
files are reported by allowing the `--ignored` option to take
additional arguments.  Currently, the shown ignored files are linked
to how untracked files are reported. Both ignored and untracked files
are controlled by arguments to `--untracked-files` option. This makes
it impossible to show all untracked files individually, but show
ignored "files and directories" (that is, ignored directories are
shown as 1 entry, instead of having all contents shown).
    
Our application (Visual Studio) has a specific set of requirements
about how it wants untracked / ignored files reported by git status.
It requires all untracked files listed individually. It would like
ignored files and directories that explicity match an exclude pattern
listed. If an ignored directory matches an exclude pattern, then the
path of the directory should be returned. If a directory does not
match an exclude pattern, but all of its contents are ignored, then we
want the contained files reported instead of the directory.
    
The reason for controlling these behaviors separately is that there
can be a significant performance impact to scanning the contents of
excluded directories. Additionally, knowing whether a directory
explicitly matches an exclude pattern can help the application make
decisions about how to handle the directory. If an ignored directory
itself matches an exclude pattern, then the application will know that
any files underneath the directory must be ignored as well.
    
As a more concrete example, on Windows, Visual Studio creates a bin/
and obj/ directory inside of the project where it writes all .obj and
binary build output files. Normal usage is to explicitly ignore these
2 directory names in the .gitignore file (rather than or in addition
to *.obj). We just want to see the "bin/" and "obj/" paths regardless
of which "--untracked-files" flag is passed in. Additionally, if we
know the bin/ and obj/ directories are ignored, then we can ignore any
files changes we notice underneath these paths, as we know they do not
affect the output of stats.

[PATCH v1 0/1] Teach status to show ignored directories [1] https://public-inbox.org/git/20170810184936.239542-1-jamill@microsoft.com/

Jameson Miller (6):
  Teach status options around showing ignored files
  Update documentation for new directory and status logic
  Add tests for git status `--ignored=matching`
  Expand support for ignored arguments on status
  Add tests around status handling of ignored arguments
  Handle unsupported combination status arguments
 Documentation/git-status.txt                      |  22 ++-
 Documentation/technical/api-directory-listing.txt |  28 +++-
 builtin/commit.c                                  |  32 +++-
 dir.c                                             |  44 ++++-
 dir.h                                             |   3 +-
 t/t7519-ignored-mode.sh                           | 195 ++++++++++++++++++++++
 wt-status.c                                       |  11 +-
 wt-status.h                                       |   8 +-
 8 files changed, 325 insertions(+), 18 deletions(-)
 create mode 100755 t/t7519-ignored-mode.sh
-- 
2.13.6
Next: jameson.miller81@gmail.com
Message 1 of 49 in “Teach Status options around showing ignored files”
  1. 0/6 Teach Status options around showing ignored filesjameson.miller81@gmail.com, Oct 5, 2017
  2. 3/6 Add tests for git status `--ignored=matching`jameson.miller81@gmail.com, Oct 5, 2017
  3. Stefan BellerOct 5, 2017
  4. 5/6 Add tests around status handling of ignored argumentsjameson.miller81@gmail.com, Oct 5, 2017
  5. 6/6 Handle unsupported combination status argumentsjameson.miller81@gmail.com, Oct 5, 2017
  6. Stefan BellerOct 5, 2017
  7. 4/6 Expand support for ignored arguments on statusjameson.miller81@gmail.com, Oct 5, 2017
  8. 1/6 Teach status options around showing ignored filesjameson.miller81@gmail.com, Oct 5, 2017
  9. 2/6 Update documentation for new directory and status logicjameson.miller81@gmail.com, Oct 5, 2017
  10. Stefan BellerOct 5, 2017
  11. Jonathan NiederOct 5, 2017
  12. Jameson MillerOct 5, 2017
  13. 0/5 Teach Status options around showing ignored filesJameson Miller, Oct 11, 2017
  14. 1/5 Teach status options around showing ignored filesJameson Miller, Oct 11, 2017
  15. Junio C HamanoOct 12, 2017
  16. Jameson MillerOct 12, 2017
  17. 2/5 Update documentation for new directory and status logicJameson Miller, Oct 11, 2017
  18. Junio C HamanoOct 12, 2017
  19. Jameson MillerOct 12, 2017
  20. Junio C HamanoOct 13, 2017
  21. 5/5 Add tests around status handling of ignored argumentsJameson Miller, Oct 11, 2017
  22. Junio C HamanoOct 12, 2017
  23. Jameson MillerOct 12, 2017
  24. Junio C HamanoOct 13, 2017
  25. 4/5 Expand support for ignored arguments on statusJameson Miller, Oct 11, 2017
  26. Junio C HamanoOct 12, 2017
  27. 3/5 Add tests for git status `--ignored=matching`Jameson Miller, Oct 11, 2017
  28. Junio C HamanoOct 12, 2017
  29. Jameson MillerOct 12, 2017
  30. 0/4 status: add option to show ignored files differentlyJameson Miller, Oct 19, 2017
  31. 1/4 status: add option to show ignored files differentlyJameson Miller, Oct 19, 2017
  32. Junio C HamanoOct 23, 2017
  33. 2/4 status: report matching ignored and normal untrackedJameson Miller, Oct 19, 2017
  34. 3/4 status: document options to show matching ignored filesJameson Miller, Oct 19, 2017
  35. 4/4 status: test --ignored=matchingJameson Miller, Oct 19, 2017
  36. Stefan BellerOct 19, 2017
  37. Junio C HamanoOct 22, 2017
  38. Junio C HamanoOct 23, 2017
  39. 0/4 status: add option to show ignored files differentlyJameson Miller, Oct 23, 2017
  40. 1/4 status: add option to show ignored files differentlyJameson Miller, Oct 23, 2017
  41. 3/4 status: document options to show matching ignored filesJameson Miller, Oct 23, 2017
  42. 2/4 status: report matching ignored and normal untrackedJameson Miller, Oct 23, 2017
  43. 4/4 status: test ignored modesJameson Miller, Oct 23, 2017
  44. 0/4 status: add option to show ignored files differentlyjameson.miller81@gmail.com, Oct 30, 2017
  45. 3/4 status: document options to show matching ignored filesjameson.miller81@gmail.com, Oct 30, 2017
  46. 4/4 status: test ignored modesjameson.miller81@gmail.com, Oct 30, 2017
  47. 2/4 status: report matching ignored and normal untrackedjameson.miller81@gmail.com, Oct 30, 2017
  48. 1/4 status: add option to show ignored files differentlyjameson.miller81@gmail.com, Oct 30, 2017
  49. Junio C HamanoOct 31, 2017

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.