<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/symlinks.c, branch v2.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-07T18:22:42Z</updated>
<entry>
<title>symlinks: remove PATH_MAX limitation</title>
<updated>2014-07-07T18:22:42Z</updated>
<author>
<name>Karsten Blees</name>
<email>karsten.blees@gmail.com</email>
</author>
<published>2014-07-04T22:41:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7c730530065fb2f366ecbcb1e71d7f7346b6a25'/>
<id>urn:sha1:e7c730530065fb2f366ecbcb1e71d7f7346b6a25</id>
<content type='text'>
'git checkout' fails if a directory is longer than PATH_MAX, because the
lstat_cache in symlinks.c checks if the leading directory exists using
PATH_MAX-bounded string operations.

Remove the limitation by using strbuf instead.

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>symlinks.c: mark private file-scope symbols 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:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72f3196a2db0f58b24acd2f9369c7f97d0d770d5'/>
<id>urn:sha1:72f3196a2db0f58b24acd2f9369c7f97d0d770d5</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add threaded versions of functions in symlinks.c.</title>
<updated>2012-03-03T07:56:28Z</updated>
<author>
<name>Jared Hance</name>
<email>jaredhance@gmail.com</email>
</author>
<published>2012-03-03T02:31:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15438d5a56acfd08545a11630821179334eb6979'/>
<id>urn:sha1:15438d5a56acfd08545a11630821179334eb6979</id>
<content type='text'>
check_leading_path() and has_dirs_only_path() both always use the default
cache, which could be a caveat for adding parallelism (which is a concern
and even a GSoC proposal).

Reimplement these two in terms of new threaded_check_leading_path() and
threaded_has_dirs_only_path() that take their own copy of the cache.

Signed-off-by: Jared Hance &lt;jaredhance@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>do not overwrite untracked symlinks</title>
<updated>2011-02-22T06:51:07Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2011-02-20T12:13:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d718a5108f905e3c64f9fa791e67a52bd926457'/>
<id>urn:sha1:1d718a5108f905e3c64f9fa791e67a52bd926457</id>
<content type='text'>
Git traditionally overwrites untracked symlinks silently. This will
generally not cause massive data loss, but it is inconsistent with
the behavior for regular files, which are not silently overwritten.

With this change, git refuses to overwrite untracked symlinks by
default. If the user really wants to overwrite the untracked
symlink, he has git-clean and git-checkout -f at his disposal.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>do not overwrite files in leading path</title>
<updated>2010-10-13T21:34:09Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2010-10-09T13:53:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f66caaf9c8e0feb840a439a58e165b963aec79cf'/>
<id>urn:sha1:f66caaf9c8e0feb840a439a58e165b963aec79cf</id>
<content type='text'>
If the work tree contains an untracked file x, and
unpack-trees wants to checkout a path x/*, the
file x is removed unconditionally.

Instead, apply the same checks that are normally
used for untracked files, and abort if the file
cannot be removed.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
</content>
</entry>
<entry>
<title>lstat_cache: optionally return match_len</title>
<updated>2010-10-13T21:34:08Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2010-10-09T13:52:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4856ff2a195e558c82ca3cab636c4d4fbef148e3'/>
<id>urn:sha1:4856ff2a195e558c82ca3cab636c4d4fbef148e3</id>
<content type='text'>
Return match_len so that the caller can know which leading path
component matched.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
</content>
</entry>
<entry>
<title>symlinks.c: remove unused functions</title>
<updated>2010-01-18T06:49:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-12T05:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64161a6b23920c96485131fb51d82d8ca13b4e1d'/>
<id>urn:sha1:64161a6b23920c96485131fb51d82d8ca13b4e1d</id>
<content type='text'>
invalidate_lstat_cache() and clear_lstat_cache() are not used anywhere.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>lstat_cache: guard against full match of length of 'name' parameter</title>
<updated>2009-07-30T03:20:12Z</updated>
<author>
<name>Kjetil Barvik</name>
<email>barvik@broadpark.no</email>
</author>
<published>2009-06-14T13:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77716755cbdf970fa0814a5f77c884b1f17693de'/>
<id>urn:sha1:77716755cbdf970fa0814a5f77c884b1f17693de</id>
<content type='text'>
longest_path_match() in symlinks.c does exactly what it's name says,
but in some cases that match can be too long, since the
has_*_leading_path() functions assumes that the match will newer be as
long as the name string given to the function.

fix this by adding an extra if test which checks if the match length
is equal to the 'len' parameter.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Export thread-safe version of 'has_symlink_leading_path()'</title>
<updated>2009-07-10T03:05:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-07-09T20:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b9fd284657de3ec30922fb17c0baf243ae947fdd'/>
<id>urn:sha1:b9fd284657de3ec30922fb17c0baf243ae947fdd</id>
<content type='text'>
The threaded index preloading will want it, so that it can avoid
locking by simply using a per-thread symlink/directory cache.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Prepare symlink caching for thread-safety</title>
<updated>2009-07-10T03:05:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-07-09T20:23:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=867f72bf434a05b9eadf851a81564be5173fbba5'/>
<id>urn:sha1:867f72bf434a05b9eadf851a81564be5173fbba5</id>
<content type='text'>
This doesn't actually change the external interfaces, so they are still
thread-unsafe, but it makes the code internally pass a pointer to a
local 'struct cache_def' around, so that the core code can be made
thread-safe.

The threaded index preloading will want to verify that the paths leading
up to a pathname are all real directories.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
