<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/read-cache.c, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-04-03T16:18:01Z</updated>
<entry>
<title>Sync with 1.8.1 maintenance track</title>
<updated>2013-04-03T16:18:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-03T16:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92e0d916326de103e463f9ffcfcd99ec1f3a9dc0'/>
<id>urn:sha1:92e0d916326de103e463f9ffcfcd99ec1f3a9dc0</id>
<content type='text'>
* maint-1.8.1:
  Start preparing for 1.8.1.6
  git-tag(1): we tag HEAD by default
  Fix revision walk for commits with the same dates
  t2003: work around path mangling issue on Windows
  pack-refs: add fully-peeled trait
  pack-refs: write peeled entry for non-tags
  use parse_object_or_die instead of die("bad object")
  avoid segfaults on parse_object failure
  entry: fix filter lookup
  t2003: modernize style
  name-hash.c: fix endless loop with core.ignorecase=true
</content>
</entry>
<entry>
<title>Merge branch 'kb/name-hash' into maint-1.8.1</title>
<updated>2013-04-03T15:44:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-03T15:44:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c81e2c61b387b7fc3ef8c303f0f8ac76411b465d'/>
<id>urn:sha1:c81e2c61b387b7fc3ef8c303f0f8ac76411b465d</id>
<content type='text'>
* kb/name-hash:
  name-hash.c: fix endless loop with core.ignorecase=true
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.8.1' into maint</title>
<updated>2013-03-25T20:46:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-03-25T20:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f7b1ad870c46c53685ef83efbfd7d9ca1983a191'/>
<id>urn:sha1:f7b1ad870c46c53685ef83efbfd7d9ca1983a191</id>
<content type='text'>
* maint-1.8.1:
  bundle: Add colons to list headings in "verify"
  bundle: Fix "verify" output if history is complete
  Documentation: filter-branch env-filter example
  git-filter-branch.txt: clarify ident variables usage
  git-compat-util.h: Provide missing netdb.h definitions
  describe: Document --match pattern format
  Documentation/githooks: Explain pre-rebase parameters
  update-index: list supported idx versions and their features
  diff-options: unconfuse description of --color
  read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()
  index-format.txt: mention of v4 is missing in some places
</content>
</entry>
<entry>
<title>name-hash.c: fix endless loop with core.ignorecase=true</title>
<updated>2013-02-28T07:29:04Z</updated>
<author>
<name>Karsten Blees</name>
<email>karsten.blees@gmail.com</email>
</author>
<published>2013-02-27T23:57:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2092678cd5265e40dfb2b8e3adc8f2075faeece4'/>
<id>urn:sha1:2092678cd5265e40dfb2b8e3adc8f2075faeece4</id>
<content type='text'>
With core.ignorecase=true, name-hash.c builds a case insensitive index of
all tracked directories. Currently, the existing cache entry structures are
added multiple times to the same hashtable (with different name lengths and
hash codes). However, there's only one dir_next pointer, which gets
completely messed up in case of hash collisions. In the worst case, this
causes an endless loop if ce == ce-&gt;dir_next (see t7062).

Use a separate hashtable and separate structures for the directory index
so that each directory entry has its own next pointer. Use reference
counting to track which directory entry contains files.

There are only slight changes to the name-hash.c API:
- new free_name_hash() used by read_cache.c::discard_index()
- remove_name_hash() takes an additional index_state parameter
- index_name_exists() for a directory (trailing '/') may return a cache
  entry that has been removed (CE_UNHASHED). This is not a problem as the
  return value is only used to check if the directory exists (dir.c) or to
  normalize casing of directory names (read-cache.c).

Getting rid of cache_entry.dir_next reduces memory consumption, especially
with core.ignorecase=false (which doesn't use that member at all).

With core.ignorecase=true, building the directory index is slightly faster
as we add / check the parent directory first (instead of going through all
directory levels for each file in the index). E.g. with WebKit (~200k
files, ~7k dirs), time spent in lazy_init_name_hash is reduced from 176ms
to 130ms.

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()</title>
<updated>2013-02-22T20:48:41Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-02-22T12:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b82a7b5bbc1c86d5f6d4198f694b213360dc2485'/>
<id>urn:sha1:b82a7b5bbc1c86d5f6d4198f694b213360dc2485</id>
<content type='text'>
9d22778 (read-cache.c: write prefix-compressed names in the index -
2012-04-04) defined these. Interestingly, they were not used by
read-cache.c, or anywhere in that patch. They were used in
builtin/update-index.c later for checking supported index
versions. Use them here too.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Enable minimal stat checking</title>
<updated>2013-01-22T17:33:16Z</updated>
<author>
<name>Robin Rosenberg</name>
<email>robin.rosenberg@dewire.com</email>
</author>
<published>2013-01-22T07:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c08e4d5b5cfa9f692cb8c81e5e9615e330f299c2'/>
<id>urn:sha1:c08e4d5b5cfa9f692cb8c81e5e9615e330f299c2</id>
<content type='text'>
Specifically the fields uid, gid, ctime, ino and dev are set to zero
by JGit. Other implementations, eg. Git in cygwin are allegedly also
somewhat incompatible with Git For Windows and on *nix platforms
the resolution of the timestamps may differ.

Any stat checking by git will then need to check content, which may
be very slow, particularly on Windows. Since mtime and size
is typically enough we should allow the user to tell git to avoid
checking these fields if they are set to zero in the index.

This change introduces a core.checkstat config option where the
the user can select to check all fields (default), or just size
and the whole second part of mtime (minimal).

Signed-off-by: Robin Rosenberg &lt;robin.rosenberg@dewire.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache.c: mark a private file-scope symbol as static</title>
<updated>2012-09-16T05:58:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-16T05:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=357e9c69c9069b2764d1b58d0074945f8a33ff09'/>
<id>urn:sha1:357e9c69c9069b2764d1b58d0074945f8a33ff09</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-null-in-trees'</title>
<updated>2012-08-27T18:54:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-08-27T18:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b753148b636be9dc821feebf85cd7f1739b07a1'/>
<id>urn:sha1:3b753148b636be9dc821feebf85cd7f1739b07a1</id>
<content type='text'>
We do not want a link to 0{40} object stored anywhere in our objects.

* jk/maint-null-in-trees:
  fsck: detect null sha1 in tree entries
  do not write null sha1s to on-disk index
  diff: do not use null sha1 as a sentinel value
</content>
</entry>
<entry>
<title>Merge branch 'nd/index-errno'</title>
<updated>2012-08-22T18:51:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-08-22T18:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0ae7e2e71a6d8b9eb198ed0a5e1462013f7c65d'/>
<id>urn:sha1:d0ae7e2e71a6d8b9eb198ed0a5e1462013f7c65d</id>
<content type='text'>
Assignments to errno before calling system functions that used to
matter in the old code were left behind after the code structure
changed sufficiently to make them useless.

* nd/index-errno:
  read_index_from: remove bogus errno assignments
</content>
</entry>
<entry>
<title>read_index_from: remove bogus errno assignments</title>
<updated>2012-08-06T17:01:21Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-08-06T11:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=57d84f8d93a0e0818fc403c5b1a2ba73ce0eca5a'/>
<id>urn:sha1:57d84f8d93a0e0818fc403c5b1a2ba73ce0eca5a</id>
<content type='text'>
These assignments comes from the very first commit e83c516 (Initial
revision of "git", the information manager from hell - 2005-04-07).
Back then we did not die() when errors happened so correct errno was
required.

Since 5d1a5c0 ([PATCH] Better error reporting for "git status" -
2005-10-01), read_index_from() learned to die rather than just return
-1 and these assignments became irrelevant. Remove them.

While at it, move die_errno() next to xmmap() call because it's the
mmap's error code that we care about. Otherwise if close(fd); fails,
it could overwrite mmap's errno.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
