<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/cache.h, branch v1.5.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.5.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.5.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2007-05-18T23:36:45Z</updated>
<entry>
<title>git-archive: convert archive entries like checkouts do</title>
<updated>2007-05-18T23:36:45Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2007-05-18T22:09:41Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5e6cfc80e26a4d0ebac38cff74c2cdebbe66cd27'/>
<id>urn:sha1:5e6cfc80e26a4d0ebac38cff74c2cdebbe66cd27</id>
<content type='text'>
As noted by Johan Herland, git-archive is a kind of checkout and needs
to apply any checkout filters that might be configured.

This patch adds the convenience function convert_sha1_file which returns
a buffer containing the object's contents, after converting, if necessary
(i.e. it's a combination of read_sha1_file and convert_to_working_tree).
Direct calls to read_sha1_file in git-archive are then replaced by calls
to convert_sha1_file.

Since convert_sha1_file expects its path argument to be NUL-terminated --
a convention it inherits from convert_to_working_tree -- the patch also
changes the path handling in archive-tar.c to always NUL-terminate the
string.  It used to solely rely on the len field of struct strbuf before.

archive-zip.c already NUL-terminates the path and thus needs no such
change.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Add has_symlink_leading_path() function.</title>
<updated>2007-05-12T05:11:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-05-12T05:11:07Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f859c846e90b385c7ef873df22403529208ade50'/>
<id>urn:sha1:f859c846e90b385c7ef873df22403529208ade50</id>
<content type='text'>
When we are applying a patch that creates a blob at a path, or
when we are switching from a branch that does not have a blob at
the path to another branch that has one, we need to make sure
that there is nothing at the path in the working tree, as such a
file is a local modification made by the user that would be lost
by the operation.

Normally, lstat() on the path and making sure ENOENT is returned
is good enough for that purpose.  However there is a twist.  We
may be creating a regular file arch/x86_64/boot/Makefile, while
removing an existing symbolic link at arch/x86_64/boot that
points at existing ../i386/boot directory that has Makefile in
it.  We always first check without touching filesystem and then
perform the actual operation, so when we verify the new file,
arch/x86_64/boot/Makefile, does not exist, we haven't removed
the symbolic link arc/x86_64/boot symbolic link yet.  lstat() on
the file sees through the symbolic link and reports the file is
there, which is not what we want.

The function has_symlink_leading_path() function takes a path,
and sees if any of the leading directory component is a symbolic
link.

When files in a new directory are created, we tend to process
them together because both index and tree are sorted.  The
function takes advantage of this and allows the caller to cache
and reuse which symbolic link on the filesystem caused the
function to return true.

The calling sequence would be:

	char last_symlink[PATH_MAX];

        *last_symlink = '\0';
        for each index entry {
		if (!lose)
			continue;
		if (lstat(it))
			if (errno == ENOENT)
				; /* happy */
			else
				error;
		else if (has_symlink_leading_path(it, last_symlink))
			; /* happy */
		else
			error; /* would lose local changes */
		unlink_entry(it, last_symlink);
	}

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Add --date={local,relative,default}</title>
<updated>2007-04-26T04:39:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-04-25T06:36:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a7b02ccf9a682fa0c2b28df6ca20f9199cdca4de'/>
<id>urn:sha1:a7b02ccf9a682fa0c2b28df6ca20f9199cdca4de</id>
<content type='text'>
This adds --date={local,relative,default} option to log family of commands,
to allow displaying timestamps in user's local timezone, relative time, or
the default format.

Existing --relative-date option is a synonym of --date=relative; we could
probably deprecate it in the long run.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>entry.c: Use const qualifier for 'struct checkout' parameters</title>
<updated>2007-04-25T20:15:59Z</updated>
<author>
<name>Luiz Fernando N. Capitulino</name>
<email>lcapitulino@mandriva.com.br</email>
</author>
<published>2007-04-25T14:18:08Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=efbc5831264fbe3696e6fc264bba9319265d7344'/>
<id>urn:sha1:efbc5831264fbe3696e6fc264bba9319265d7344</id>
<content type='text'>
Signed-off-by: Luiz Fernando N. Capitulino &lt;lcapitulino@mandriva.com.br&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/the-index'</title>
<updated>2007-04-25T05:13:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-04-25T05:13:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=da94faf671c6b7c4db1ae07137bd93e31e232b4c'/>
<id>urn:sha1:da94faf671c6b7c4db1ae07137bd93e31e232b4c</id>
<content type='text'>
* jc/the-index:
  Make read-cache.c "the_index" free.
  Move index-related variables into a structure.
</content>
</entry>
<entry>
<title>add get_sha1_with_mode</title>
<updated>2007-04-24T07:08:49Z</updated>
<author>
<name>Martin Koegler</name>
<email>mkoegler@auto.tuwien.ac.at</email>
</author>
<published>2007-04-23T20:55:05Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a0cd87a57044efa8aef39b476fd9240af57a1853'/>
<id>urn:sha1:a0cd87a57044efa8aef39b476fd9240af57a1853</id>
<content type='text'>
get_sha1_with_mode basically behaves as get_sha1. It has an additional
parameter for storing the mode of the object.

If the mode can not be determined, it stores S_IFINVALID.

Signed-off-by: Martin Koegler &lt;mkoegler@auto.tuwien.ac.at&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Add S_IFINVALID mode</title>
<updated>2007-04-24T07:08:49Z</updated>
<author>
<name>Martin Koegler</name>
<email>mkoegler@auto.tuwien.ac.at</email>
</author>
<published>2007-04-22T16:43:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=40689ae1ef9a05503c75298ec50b194ca9d15522'/>
<id>urn:sha1:40689ae1ef9a05503c75298ec50b194ca9d15522</id>
<content type='text'>
S_IFINVALID is used to signal, that no mode information is available.

Signed-off-by: Martin Koegler &lt;mkoegler@auto.tuwien.ac.at&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Make read-cache.c "the_index" free.</title>
<updated>2007-04-23T05:53:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-04-02T06:26:07Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4aab5b46f44a7ba860e07a52be506b7b57b2bd5f'/>
<id>urn:sha1:4aab5b46f44a7ba860e07a52be506b7b57b2bd5f</id>
<content type='text'>
This makes all low-level functions defined in read-cache.c to
take an explicit index_state structure as their first parameter,
to specify which index to work on.  These functions
traditionally operated on "the_index" and were named foo_cache();
the counterparts this patch introduces are called foo_index().

The traditional foo_cache() functions are made into macros that
give "the_index" to their corresponding foo_index() functions.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Move index-related variables into a structure.</title>
<updated>2007-04-23T05:53:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-04-02T01:14:06Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=228e94f93570b580da388069900c56b813c91953'/>
<id>urn:sha1:228e94f93570b580da388069900c56b813c91953</id>
<content type='text'>
This defines a index_state structure and moves index-related
global variables into it.  Currently there is one instance of
it, the_index, and everybody accesses it, so there is no code
change.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'lt/objalloc'</title>
<updated>2007-04-22T00:42:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-04-22T00:41:40Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=42c4b58059fa9af65e90f2c418bb551e30d1d32f'/>
<id>urn:sha1:42c4b58059fa9af65e90f2c418bb551e30d1d32f</id>
<content type='text'>
* 'lt/objalloc':
  Clean up object creation to use more common code
  Use proper object allocators for unknown object nodes too
</content>
</entry>
</feed>
