<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/dir.h, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-12-27T19:16:21Z</updated>
<entry>
<title>Merge branch 'jh/object-filtering'</title>
<updated>2017-12-27T19:16:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-12-27T19:16:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61061abba7d60f555e97a22ab5775a9d53db1660'/>
<id>urn:sha1:61061abba7d60f555e97a22ab5775a9d53db1660</id>
<content type='text'>
In preparation for implementing narrow/partial clone, the object
walking machinery has been taught a way to tell it to "filter" some
objects from enumeration.

* jh/object-filtering:
  rev-list: support --no-filter argument
  list-objects-filter-options: support --no-filter
  list-objects-filter-options: fix 'keword' typo in comment
  pack-objects: add list-objects filtering
  rev-list: add list-objects filtering support
  list-objects: filter objects in traverse_commit_list
  oidset: add iterator methods to oidset
  oidmap: add oidmap iterator methods
  dir: allow exclusions from blob in addition to file
</content>
</entry>
<entry>
<title>dir: allow exclusions from blob in addition to file</title>
<updated>2017-11-22T05:11:56Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2017-11-21T20:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=578d81d0c445f714dce46d5f4e3f599ac3a94c75'/>
<id>urn:sha1:578d81d0c445f714dce46d5f4e3f599ac3a94c75</id>
<content type='text'>
Refactor add_excludes() to separate the reading of the
exclude file into a buffer and the parsing of the buffer
into exclude_list items.

Add add_excludes_from_blob_to_list() to allow an exclude
file be specified with an OID without assuming a local
worktree or index exists.

Refactor read_skip_worktree_file_from_index() and add
do_read_blob() to eliminate duplication of preliminary
processing of blob contents.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Reviewed-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bp/fsmonitor'</title>
<updated>2017-11-21T05:07:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-21T05:07:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e05336bddacb90cf243aacc0f7b7f34f900453d7'/>
<id>urn:sha1:e05336bddacb90cf243aacc0f7b7f34f900453d7</id>
<content type='text'>
We learned to talk to watchman to speed up "git status" and other
operations that need to see which paths have been modified.

* bp/fsmonitor:
  fsmonitor: preserve utf8 filenames in fsmonitor-watchman log
  fsmonitor: read entirety of watchman output
  fsmonitor: MINGW support for watchman integration
  fsmonitor: add a performance test
  fsmonitor: add a sample integration script for Watchman
  fsmonitor: add test cases for fsmonitor extension
  split-index: disable the fsmonitor extension when running the split index test
  fsmonitor: add a test tool to dump the index extension
  update-index: add fsmonitor support to update-index
  ls-files: Add support in ls-files to display the fsmonitor valid bit
  fsmonitor: add documentation for the fsmonitor extension.
  fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.
  update-index: add a new --force-write-index option
  preload-index: add override to enable testing preload-index
  bswap: add 64 bit endianness helper get_be64
</content>
</entry>
<entry>
<title>status: add option to show ignored files differently</title>
<updated>2017-10-31T02:54:21Z</updated>
<author>
<name>Jameson Miller</name>
<email>jamill@microsoft.com</email>
</author>
<published>2017-10-30T17:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eec0f7f2b7532f4ec74461f969701911b8876162'/>
<id>urn:sha1:eec0f7f2b7532f4ec74461f969701911b8876162</id>
<content type='text'>
Teach the status command more flexibility in how ignored files are
reported. Currently, the reporting of ignored files and untracked
files are linked. You cannot control how ignored files are reported
independently of how untracked files are reported (i.e. `all` vs
`normal`). This makes it impossible to show untracked files with the
`all` option, but show ignored files with the `normal` option.

This work 1) adds the ability to control the reporting of ignored
files independently of untracked files and 2) introduces the concept
of status reporting ignored paths that explicitly match an ignored
pattern. There are 2 benefits to these changes: 1) if a consumer needs
all untracked files but not all ignored files, there is a performance
benefit to not scanning all contents of an ignored directory and 2)
returning ignored files that explicitly match a path allow a consumer
to make more informed decisions about when a status result might be
stale.

This commit implements --ignored=matching with --untracked-files=all.
The following commit will implement --ignored=matching with
--untracked=files=normal.

As an example of where this flexibility could be useful is that our
application (Visual Studio) runs the status command and presents the
output. It shows all untracked files individually (e.g. using the
'--untracked-files==all' option), and would like to know about which
paths are ignored. It uses information about ignored paths to make
decisions about when the status result might have changed.
Additionally, many projects place build output into directories inside
a repository's working directory (e.g. in "bin/" and "obj/"
directories). Normal usage is to explicitly ignore these 2 directory
names in the .gitignore file (rather than or in addition to the *.obj
pattern).If an application could know that these directories are
explicitly ignored, it could infer that all contents are ignored as
well and make better informed decisions about files in these
directories. It could infer that any changes under these paths would
not affect the output of status. Additionally, there can be a
significant performance benefit by avoiding scanning through ignored
directories.

When status is set to report matching ignored files, it has the
following behavior. Ignored files and directories that explicitly
match an exclude pattern are reported. If an ignored directory matches
an exclude pattern, then the path of the directory is returned. If a
directory does not match an exclude pattern, but all of its contents
are ignored, then the contained files are reported instead of the
directory.

Signed-off-by: Jameson Miller &lt;jamill@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.</title>
<updated>2017-10-01T08:23:01Z</updated>
<author>
<name>Ben Peart</name>
<email>benpeart@microsoft.com</email>
</author>
<published>2017-09-22T16:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=883e248b8a0fd88773cb902ab8e91273eb147d07'/>
<id>urn:sha1:883e248b8a0fd88773cb902ab8e91273eb147d07</id>
<content type='text'>
When the index is read from disk, the fsmonitor index extension is used
to flag the last known potentially dirty index entries. The registered
core.fsmonitor command is called with the time the index was last
updated and returns the list of files changed since that time. This list
is used to flag any additional dirty cache entries and untracked cache
directories.

We can then use this valid state to speed up preload_index(),
ie_match_stat(), and refresh_cache_ent() as they do not need to lstat()
files to detect potential changes for those entries marked
CE_FSMONITOR_VALID.

In addition, if the untracked cache is turned on valid_cached_dir() can
skip checking directories for new or changed files as fsmonitor will
invalidate the cache only for those directories that have been
identified as having potential changes.

To keep the CE_FSMONITOR_VALID state accurate during git operations;
when git updates a cache entry to match the current state on disk,
it will now set the CE_FSMONITOR_VALID bit.

Inversely, anytime git changes a cache entry, the CE_FSMONITOR_VALID bit
is cleared and the corresponding untracked cache directory is marked
invalid.

Signed-off-by: Ben Peart &lt;benpeart@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pc/dir-count-slashes'</title>
<updated>2017-06-22T21:15:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-22T21:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=52ab95cfea15ae8a60fb4febc99d54034c8800b8'/>
<id>urn:sha1:52ab95cfea15ae8a60fb4febc99d54034c8800b8</id>
<content type='text'>
Three instances of the same helper function have been consolidated
to one.

* pc/dir-count-slashes:
  dir: create function count_slashes()
</content>
</entry>
<entry>
<title>dir: create function count_slashes()</title>
<updated>2017-06-12T20:26:55Z</updated>
<author>
<name>Prathamesh Chavan</name>
<email>pc44800@gmail.com</email>
</author>
<published>2017-06-08T18:08:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0556a928fdba489307d13d8d4c4d2a461fbc3ad'/>
<id>urn:sha1:e0556a928fdba489307d13d8d4c4d2a461fbc3ad</id>
<content type='text'>
Similar functions exist in apply.c and builtin/show-branch.c for
counting the number of slashes in a string. Also in the later
patches, we introduce a third caller for the same. Hence, we unify
it now by cleaning the existing functions and declaring a common
function count_slashes in dir.h and implementing it in dir.c to
remove this code duplication.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Prathamesh Chavan &lt;pc44800@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sl/clean-d-ignored-fix'</title>
<updated>2017-06-02T06:06:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-02T06:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4fd99bf6e5c27265ee2a9ccb9c2495854f67acb'/>
<id>urn:sha1:f4fd99bf6e5c27265ee2a9ccb9c2495854f67acb</id>
<content type='text'>
"git clean -d" used to clean directories that has ignored files,
even though the command should not lose ignored ones without "-x".
"git status --ignored"  did not list ignored and untracked files
without "-uall".  These have been corrected.

* sl/clean-d-ignored-fix:
  clean: teach clean -d to preserve ignored paths
  dir: expose cmp_name() and check_contains()
  dir: hide untracked contents of untracked dirs
  dir: recurse into untracked dirs for ignored files
  t7061: status --ignored should search untracked dirs
  t7300: clean -d should skip dirs with ignored files
</content>
</entry>
<entry>
<title>dir: expose cmp_name() and check_contains()</title>
<updated>2017-05-22T03:14:13Z</updated>
<author>
<name>Samuel Lijin</name>
<email>sxlijin@gmail.com</email>
</author>
<published>2017-05-18T08:21:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bbf504a9957e8a2a262619641ffa30348d71a76f'/>
<id>urn:sha1:bbf504a9957e8a2a262619641ffa30348d71a76f</id>
<content type='text'>
We want to use cmp_name() and check_contains() (which both compare
`struct dir_entry`s, the former in terms of the sort order, the latter
in terms of whether one lexically contains another) outside of dir.c,
so we have to (1) change their linkage and (2) rename them as
appropriate for the global namespace. The second is achieved by
renaming cmp_name() to cmp_dir_entry() and check_contains() to
check_dir_entry_contains().

Signed-off-by: Samuel Lijin &lt;sxlijin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>dir: hide untracked contents of untracked dirs</title>
<updated>2017-05-22T03:14:09Z</updated>
<author>
<name>Samuel Lijin</name>
<email>sxlijin@gmail.com</email>
</author>
<published>2017-05-18T08:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb898888491b83c9a3396fb559032ca78807a0c0'/>
<id>urn:sha1:fb898888491b83c9a3396fb559032ca78807a0c0</id>
<content type='text'>
When we taught read_directory_recursive() to recurse into untracked
directories in search of ignored files given DIR_SHOW_IGNORED_TOO, that
had the side effect of teaching it to collect the untracked contents of
untracked directories. It doesn't always make sense to return these,
though (we do need them for `clean -d`), so we introduce a flag
(DIR_KEEP_UNTRACKED_CONTENTS) to control whether or not read_directory()
strips dir-&gt;entries of the untracked contents of untracked dirs.

We also introduce check_contains() to check if one dir_entry corresponds
to a path which contains the path corresponding to another dir_entry.

This also fixes known breakages in t7061, since status --ignored now
searches untracked directories for ignored files.

Signed-off-by: Samuel Lijin &lt;sxlijin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
