<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/lockfile.c, branch v2.2.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-10-15T17:47:27Z</updated>
<entry>
<title>lockfile: remove unable_to_lock_error</title>
<updated>2014-10-15T17:47:27Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2014-08-28T23:41:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb43bd1cd187bcd29312df3b0394a457d524906d'/>
<id>urn:sha1:fb43bd1cd187bcd29312df3b0394a457d524906d</id>
<content type='text'>
The former caller uses unable_to_lock_message now.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Reviewed-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/lockfile-stdio'</title>
<updated>2014-10-14T17:49:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-14T17:49:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=11cb3130d551590ae2dbd582e809763bfc353a47'/>
<id>urn:sha1:11cb3130d551590ae2dbd582e809763bfc353a47</id>
<content type='text'>
* mh/lockfile-stdio:
  commit_packed_refs(): reimplement using fdopen_lock_file()
  dump_marks(): reimplement using fdopen_lock_file()
  fdopen_lock_file(): access a lockfile using stdio
</content>
</entry>
<entry>
<title>Merge branch 'mh/lockfile'</title>
<updated>2014-10-14T17:49:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-14T17:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd107e1052a11cf7dd6baf9077eab52fbb9d9c90'/>
<id>urn:sha1:bd107e1052a11cf7dd6baf9077eab52fbb9d9c90</id>
<content type='text'>
The lockfile API and its users have been cleaned up.

* mh/lockfile: (38 commits)
  lockfile.h: extract new header file for the functions in lockfile.c
  hold_locked_index(): move from lockfile.c to read-cache.c
  hold_lock_file_for_append(): restore errno before returning
  get_locked_file_path(): new function
  lockfile.c: rename static functions
  lockfile: rename LOCK_NODEREF to LOCK_NO_DEREF
  commit_lock_file_to(): refactor a helper out of commit_lock_file()
  trim_last_path_component(): replace last_path_elm()
  resolve_symlink(): take a strbuf parameter
  resolve_symlink(): use a strbuf for internal scratch space
  lockfile: change lock_file::filename into a strbuf
  commit_lock_file(): use a strbuf to manage temporary space
  try_merge_strategy(): use a statically-allocated lock_file object
  try_merge_strategy(): remove redundant lock_file allocation
  struct lock_file: declare some fields volatile
  lockfile: avoid transitory invalid states
  git_config_set_multivar_in_file(): avoid call to rollback_lock_file()
  dump_marks(): remove a redundant call to rollback_lock_file()
  api-lockfile: document edge cases
  commit_lock_file(): rollback lock file on failure to rename
  ...
</content>
</entry>
<entry>
<title>Merge branch 'sp/stream-clean-filter'</title>
<updated>2014-10-08T20:05:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-08T20:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0d89001750a27c1c447b2eb3149b998521fa52c'/>
<id>urn:sha1:f0d89001750a27c1c447b2eb3149b998521fa52c</id>
<content type='text'>
When running a required clean filter, we do not have to mmap the
original before feeding the filter.  Instead, stream the file
contents directly to the filter and process its output.

* sp/stream-clean-filter:
  sha1_file: don't convert off_t to size_t too early to avoid potential die()
  convert: stream from fd to required clean filter to reduce used address space
  copy_fd(): do not close the input file descriptor
  mmap_limit: introduce GIT_MMAP_LIMIT to allow testing expected mmap size
  memory_limit: use git_env_ulong() to parse GIT_ALLOC_LIMIT
  config.c: add git_env_ulong() to parse environment variable
  convert: drop arguments other than 'path' from would_convert_to_git()
</content>
</entry>
<entry>
<title>fdopen_lock_file(): access a lockfile using stdio</title>
<updated>2014-10-01T21:08:10Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-10-01T11:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=013870cd2cb1b0d6719a7a9123e126a62426520b'/>
<id>urn:sha1:013870cd2cb1b0d6719a7a9123e126a62426520b</id>
<content type='text'>
Add a new function, fdopen_lock_file(), which returns a FILE pointer
open to the lockfile. If a stream is open on a lock_file object, it is
closed using fclose() on commit, rollback, or close_lock_file().

This change will allow callers to use stdio to write to a lockfile
without having to muck around in the internal representation of the
lock_file object (callers will be rewritten in upcoming commits).

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>lockfile.h: extract new header file for the functions in lockfile.c</title>
<updated>2014-10-01T20:56:14Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-10-01T10:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=697cc8efd944a32ca472337cd6640004c474b788'/>
<id>urn:sha1:697cc8efd944a32ca472337cd6640004c474b788</id>
<content type='text'>
Move the interface declaration for the functions in lockfile.c from
cache.h to a new file, lockfile.h. Add #includes where necessary (and
remove some redundant includes of cache.h by files that already
include builtin.h).

Move the documentation of the lock_file state diagram from lockfile.c
to the new header file.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hold_locked_index(): move from lockfile.c to read-cache.c</title>
<updated>2014-10-01T20:54:31Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-10-01T10:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=216aab1e3d8eef088dc9785febce24a110e9f835'/>
<id>urn:sha1:216aab1e3d8eef088dc9785febce24a110e9f835</id>
<content type='text'>
lockfile.c contains the general API for locking any file. Code
specifically about the index file doesn't belong here.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hold_lock_file_for_append(): restore errno before returning</title>
<updated>2014-10-01T20:53:54Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-10-01T10:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d423a3e62c7ab0b04c4bd84995c32daff3b24c3'/>
<id>urn:sha1:4d423a3e62c7ab0b04c4bd84995c32daff3b24c3</id>
<content type='text'>
Callers who don't pass LOCK_DIE_ON_ERROR might want to examine errno
to see what went wrong, so restore errno before returning.

In fact this function only has one caller, add_to_alternates_file(),
and it *does* use LOCK_DIE_ON_ERROR, but, you know, think of future
generations.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>get_locked_file_path(): new function</title>
<updated>2014-10-01T20:53:54Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-10-01T10:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ec38b4e482e96e62762452cab5714e55abdb48c3'/>
<id>urn:sha1:ec38b4e482e96e62762452cab5714e55abdb48c3</id>
<content type='text'>
Add a function to return the path of the file that is locked by a
lock_file object. This reduces the knowledge that callers have to have
about the lock_file layout.

Suggested-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>lockfile.c: rename static functions</title>
<updated>2014-10-01T20:53:53Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-10-01T10:28:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=316683bd37608e31cc3f5e932c4e5c7dde1b39f0'/>
<id>urn:sha1:316683bd37608e31cc3f5e932c4e5c7dde1b39f0</id>
<content type='text'>
* remove_lock_file() -&gt; remove_lock_files()
* remove_lock_file_on_signal() -&gt; remove_lock_files_on_signal()

Suggested-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
