git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/6] Teach Status options around showing ignored files
@ 2017-10-05 20:54 jameson.miller81
  2017-10-05 20:54 ` [PATCH 1/6] Teach status " jameson.miller81
                   ` (10 more replies)
  0 siblings, 11 replies; 49+ messages in thread
From: jameson.miller81 @ 2017-10-05 20:54 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, bmwill, sbeller, Jameson Miller

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


^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2017-10-31  3:16 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 20:54 [PATCH 0/6] Teach Status options around showing ignored files jameson.miller81
2017-10-05 20:54 ` [PATCH 1/6] Teach status " jameson.miller81
2017-10-05 20:54 ` [PATCH 2/6] Update documentation for new directory and status logic jameson.miller81
2017-10-05 21:51   ` Stefan Beller
2017-10-05 20:54 ` [PATCH 3/6] Add tests for git status `--ignored=matching` jameson.miller81
2017-10-05 21:59   ` Stefan Beller
2017-10-05 20:54 ` [PATCH 4/6] Expand support for ignored arguments on status jameson.miller81
2017-10-05 20:54 ` [PATCH 5/6] Add tests around status handling of ignored arguments jameson.miller81
2017-10-05 20:54 ` [PATCH 6/6] Handle unsupported combination status arguments jameson.miller81
2017-10-05 22:08   ` Stefan Beller
2017-10-05 21:16 ` [PATCH 0/6] Teach Status options around showing ignored files Jonathan Nieder
2017-10-05 21:22   ` Jameson Miller
2017-10-11 13:34 ` [PATCH v2 0/5] " Jameson Miller
2017-10-11 13:35   ` [PATCH v2 1/5] Teach status " Jameson Miller
2017-10-12  2:49     ` Junio C Hamano
2017-10-12 20:15       ` Jameson Miller
2017-10-11 13:35   ` [PATCH v2 2/5] Update documentation for new directory and status logic Jameson Miller
2017-10-12  2:55     ` Junio C Hamano
2017-10-12 20:54       ` Jameson Miller
2017-10-13  0:42         ` Junio C Hamano
2017-10-11 13:35   ` [PATCH v2 3/5] Add tests for git status `--ignored=matching` Jameson Miller
2017-10-11 13:35   ` [PATCH v2 4/5] Expand support for ignored arguments on status Jameson Miller
2017-10-12  3:58     ` Junio C Hamano
2017-10-11 13:35   ` [PATCH v2 5/5] Add tests around status handling of ignored arguments Jameson Miller
2017-10-12  4:06     ` Junio C Hamano
2017-10-12 20:16       ` Jameson Miller
2017-10-13  0:49         ` Junio C Hamano
2017-10-12  2:33   ` [PATCH v2 0/5] Teach Status options around showing ignored files Junio C Hamano
2017-10-12 20:20     ` Jameson Miller
2017-10-19 16:05 ` [PATCH v3 0/4] status: add option to show ignored files differently Jameson Miller
2017-10-19 16:05   ` [PATCH v3 1/4] " Jameson Miller
2017-10-23  3:34     ` Junio C Hamano
2017-10-19 16:05   ` [PATCH v3 2/4] status: report matching ignored and normal untracked Jameson Miller
2017-10-19 16:06   ` [PATCH v3 3/4] status: document options to show matching ignored files Jameson Miller
2017-10-19 16:06   ` [PATCH v3 4/4] status: test --ignored=matching Jameson Miller
2017-10-19 19:33     ` Stefan Beller
2017-10-22  2:10     ` Junio C Hamano
2017-10-23  4:46   ` [PATCH v3 0/4] status: add option to show ignored files differently Junio C Hamano
2017-10-23 17:05 ` [PATCH v4 " Jameson Miller
2017-10-23 17:05   ` [PATCH v4 1/4] " Jameson Miller
2017-10-23 17:05   ` [PATCH v4 2/4] status: report matching ignored and normal untracked Jameson Miller
2017-10-23 17:05   ` [PATCH v4 3/4] status: document options to show matching ignored files Jameson Miller
2017-10-23 17:05   ` [PATCH v4 4/4] status: test ignored modes Jameson Miller
2017-10-30 17:21 ` [PATCH v5 0/4] status: add option to show ignored files differently jameson.miller81
2017-10-30 17:21   ` [PATCH v5 1/4] " jameson.miller81
2017-10-30 17:21   ` [PATCH v5 2/4] status: report matching ignored and normal untracked jameson.miller81
2017-10-30 17:21   ` [PATCH v5 3/4] status: document options to show matching ignored files jameson.miller81
2017-10-30 17:21   ` [PATCH v5 4/4] status: test ignored modes jameson.miller81
2017-10-31  3:16   ` [PATCH v5 0/4] status: add option to show ignored files differently Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).