<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/path.c, branch v1.8.3.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.8.3.4</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.8.3.4'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2013-04-05T19:39:38Z</updated>
<entry>
<title>path.c: optimize adjust_shared_perm()</title>
<updated>2013-04-05T19:39:38Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2013-03-30T09:53:47Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=cbe43b847379e8d3db6aab2913b29b730fa5ca45'/>
<id>urn:sha1:cbe43b847379e8d3db6aab2913b29b730fa5ca45</id>
<content type='text'>
Sometimes the chown() function is called even when not needed (This
can be provoked by running t1301, and adding some debug code).

Save a chmod from 400 to 400, or from 600 to 600 on these files:

 .git/info/refs+
 .git/objects/info/packs+

Save chmod on directories from 2770 to 2770:

 .git/refs
 .git/refs/heads
 .git/refs/tags

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path.c: simplify adjust_shared_perm()</title>
<updated>2013-04-05T19:37:55Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2013-03-30T09:53:32Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3a429d3b8d03c98fbc775eb34a54b7b2bd74e02b'/>
<id>urn:sha1:3a429d3b8d03c98fbc775eb34a54b7b2bd74e02b</id>
<content type='text'>
All calls to set_shared_perm() use mode == 0, so simplify the
function.

Because all callers use the macro adjust_shared_perm(path) from
cache.h to call this function, convert it to a proper function,
losing set_shared_perm().

Since path.c has much more functions than just mkpath() these days,
drop the stale comment about it.

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make core.sharedRepository work under cygwin 1.7</title>
<updated>2013-03-25T21:57:33Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2013-03-23T12:40:29Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=0117c2f043183fb99e9b046b0df7d64c1b296624'/>
<id>urn:sha1:0117c2f043183fb99e9b046b0df7d64c1b296624</id>
<content type='text'>
When core.sharedRepository is used, set_shared_perm() in path.c
needs lstat() to return the correct POSIX permissions.

The default for cygwin is core.ignoreCygwinFSTricks = false, which
means that the fast implementation in do_stat() is used instead of
lstat().

lstat() under cygwin uses the Windows security model to implement
POSIX-like permissions.  The user, group or everyone bits can be set
individually.

do_stat() simplifes the file permission bits, and may return a wrong
value.  The read-only attribute of a file is used to calculate the
permissions, resulting in either rw-r--r-- or r--r--r--

One effect of the simplified do_stat() is that t1301 fails.

Add a function cygwin_get_st_mode_bits() which returns the POSIX
permissions.  When not compiling for cygwin, true_mode_bits() in
path.c is used.

Side note:

t1301 passes under cygwin 1.5.

The "user write" bit is synchronized with the "read only" attribute
of a file:

    $ chmod 444 x
    $ attrib x
    A    R     C:\temp\pt\x

    cygwin 1.7 would show
    A          C:\temp\pt\x

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>longest_ancestor_length(): require prefix list entries to be normalized</title>
<updated>2012-10-29T06:34:58Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-10-28T16:16:25Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9e2326c7e1efb1ae42b17e3fa38c16711a8d0bd8'/>
<id>urn:sha1:9e2326c7e1efb1ae42b17e3fa38c16711a8d0bd8</id>
<content type='text'>
Move the responsibility for normalizing prefixes from
longest_ancestor_length() to its callers. Use slightly different
normalizations at the two callers:

In setup_git_directory_gently_1(), use the old normalization, which
ignores paths that are not usable.  In the next commit we will change
this caller to also resolve symlinks in the paths from
GIT_CEILING_DIRECTORIES as part of the normalization.

In "test-path-utils longest_ancestor_length", use the old
normalization, but die() if any paths are unusable.  Also change t0060
to only pass normalized paths to the test program (no empty entries or
non-absolute paths, strip trailing slashes from the paths, and remove
tests that thereby become redundant).

The point of this change is to reduce the scope of the ancestor_length
tests in t0060 from testing normalization+longest_prefix to testing
only mostly longest_prefix.  This is necessary because when
setup_git_directory_gently_1() starts resolving symlinks as part of
its normalization, it will not be reasonable to do the same in the
test suite, because that would make the test results depend on the
contents of the root directory of the filesystem on which the test is
run.  HOWEVER: under Windows, bash mangles arguments that look like
absolute POSIX paths into DOS paths.  So we have to retain the level
of normalization done by normalize_path_copy() to convert the
bash-mangled DOS paths (which contain backslashes) into paths that use
forward slashes.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>longest_ancestor_length(): take a string_list argument for prefixes</title>
<updated>2012-10-29T06:34:58Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-10-28T16:16:24Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=31171d9e454d71144685866cfd6476b8ac69d314'/>
<id>urn:sha1:31171d9e454d71144685866cfd6476b8ac69d314</id>
<content type='text'>
Change longest_ancestor_length() to take the prefixes argument as a
string_list rather than as a colon-separated string.  This will make
it easier for the caller to alter the entries before calling
longest_ancestor_length().

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>longest_ancestor_length(): use string_list_split()</title>
<updated>2012-10-29T06:34:58Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-10-28T16:16:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a5ccdbe416081d5749f286c193b70400e48ad03f'/>
<id>urn:sha1:a5ccdbe416081d5749f286c193b70400e48ad03f</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>path.c: Use vsnpath() in the implementation of git_path()</title>
<updated>2012-09-04T20:34:46Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2012-09-04T17:29:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5c44252e13db2324d7c79d2b498886a925055111'/>
<id>urn:sha1:5c44252e13db2324d7c79d2b498886a925055111</id>
<content type='text'>
The current implementation of git_path() is essentially the same as
that of vsnpath(), with two minor differences. First, git_path()
currently insists that the git directory path is no longer than
PATH_MAX-100 characters in length. However, vsnpath() does not
attempt this arbitrary 100 character reservation for the remaining
path components. Second, vsnpath() uses the "is_dir_sep()" macro,
rather than comparing directly to '/', to determine if the git_dir
path component ends with a path separator.

In order to benefit from the above improvements, along with increased
compatability with git_snpath() and git_pathdup(), we reimplement the
git_path() function using vsnpath().

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path.c: Don't discard the return value of vsnpath()</title>
<updated>2012-09-04T20:34:46Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2012-09-04T17:27:54Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=66a51a9aaec3f53250b1d515a1bd81044ebb354b'/>
<id>urn:sha1:66a51a9aaec3f53250b1d515a1bd81044ebb354b</id>
<content type='text'>
The git_snpath() and git_pathdup() functions both use the (static)
function vsnpath() in their implementation. Also, they both discard
the return value of vsnpath(), which has the effect of ignoring the
side effect of calling cleanup_path() in the non-error return path.

In order to ensure that the required cleanup happens, we use the
pointer returned by vsnpath(), rather than the buffer passed into
vsnpath(), to derive the return value from git_snpath() and
git_pathdup().

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path.c: Remove the 'git_' prefix from a file scope function</title>
<updated>2012-09-04T20:34:46Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2012-09-04T17:26:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5b3b8fa2ab188908332358d2c2576491969cd580'/>
<id>urn:sha1:5b3b8fa2ab188908332358d2c2576491969cd580</id>
<content type='text'>
In particular, the git_vsnpath() function, despite the 'git_' prefix
suggesting otherwise, is (correctly) declared with file scope.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: read (but not write) from $XDG_CONFIG_HOME/git/config file</title>
<updated>2012-06-25T16:05:55Z</updated>
<author>
<name>Huynh Khoi Nguyen Nguyen</name>
<email>Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr</email>
</author>
<published>2012-06-22T09:03:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=21cf32279120799a766d22416be7d82d9ecfbd04'/>
<id>urn:sha1:21cf32279120799a766d22416be7d82d9ecfbd04</id>
<content type='text'>
Teach git to read the "gitconfig" information from a new location,
$XDG_CONFIG_HOME/git/config; this allows the user to avoid
cluttering $HOME with many per-application configuration files.

In the order of reading, this file comes between the global
configuration file (typically $HOME/.gitconfig) and the system wide
configuration file (typically /etc/gitconfig).

We do not write to this new location (yet).

If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config
will be used. This is in line with XDG specification.

If the new file does not exist, the behavior is unchanged.

Signed-off-by: Huynh Khoi Nguyen Nguyen &lt;Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr&gt;
Signed-off-by: Valentin Duperray &lt;Valentin.Duperray@ensimag.imag.fr&gt;
Signed-off-by: Franck Jonas &lt;Franck.Jonas@ensimag.imag.fr&gt;
Signed-off-by: Lucien Kong &lt;Lucien.Kong@ensimag.imag.fr&gt;
Signed-off-by: Thomas Nguy &lt;Thomas.Nguy@ensimag.imag.fr&gt;
Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
