<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/lockfile.c, branch v2.8.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.8.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.8.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-03-01T18:16:46Z</updated>
<entry>
<title>lockfile: improve error message when lockfile exists</title>
<updated>2016-03-01T18:16:46Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2016-03-01T17:04:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aed7480ca4c284089a3b332fae770b4056eb08fc'/>
<id>urn:sha1:aed7480ca4c284089a3b332fae770b4056eb08fc</id>
<content type='text'>
A common mistake leading a user to see this message is to launch "git
commit", let the editor open (and forget about it), and try again to
commit.

The previous message was going too quickly to "a git process crashed"
and to the advice "remove the file manually".

This patch modifies the message in two ways: first, it considers that
"another process is running" is the norm, not the exception, and it
explicitly hints the user to look at text editors.

The message is 2 lines longer, but this is not a problem since
experienced users do not see the message often.

Helped-by: Moritz Neeb &lt;lists@moritzneeb.de&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>
<entry>
<title>lockfile: mark strings for translation</title>
<updated>2016-03-01T18:16:45Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2016-03-01T17:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3030c295baee355d0b454a2d54f295153f8ea6a8'/>
<id>urn:sha1:3030c295baee355d0b454a2d54f295153f8ea6a8</id>
<content type='text'>
Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>lockfile: remove function "hold_lock_file_for_append"</title>
<updated>2015-08-28T18:32:01Z</updated>
<author>
<name>Ralf Thielow</name>
<email>ralf.thielow@gmail.com</email>
</author>
<published>2015-08-28T16:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aae42e43c42911a3c260ae9fa8681e779c6d5943'/>
<id>urn:sha1:aae42e43c42911a3c260ae9fa8681e779c6d5943</id>
<content type='text'>
With 77b9b1d (add_to_alternates_file: don't add duplicate entries,
2015-08-10) the last caller of function "hold_lock_file_for_append"
has been removed, so we can remove the function as well.

Signed-off-by: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/tempfile'</title>
<updated>2015-08-25T21:57:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-25T21:57:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db86e61cbbc4c59a0886366bbf392498e64b53c8'/>
<id>urn:sha1:db86e61cbbc4c59a0886366bbf392498e64b53c8</id>
<content type='text'>
The "lockfile" API has been rebuilt on top of a new "tempfile" API.

* mh/tempfile:
  credential-cache--daemon: use tempfile module
  credential-cache--daemon: delete socket from main()
  gc: use tempfile module to handle gc.pid file
  lock_repo_for_gc(): compute the path to "gc.pid" only once
  diff: use tempfile module
  setup_temporary_shallow(): use tempfile module
  write_shared_index(): use tempfile module
  register_tempfile(): new function to handle an existing temporary file
  tempfile: add several functions for creating temporary files
  prepare_tempfile_object(): new function, extracted from create_tempfile()
  tempfile: a new module for handling temporary files
  commit_lock_file(): use get_locked_file_path()
  lockfile: add accessor get_lock_file_path()
  lockfile: add accessors get_lock_file_fd() and get_lock_file_fp()
  create_bundle(): duplicate file descriptor to avoid closing it twice
  lockfile: move documentation to lockfile.h and lockfile.c
</content>
</entry>
<entry>
<title>tempfile: a new module for handling temporary files</title>
<updated>2015-08-10T19:57:14Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-08-10T09:47:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a9d15db25487bb3fc009a88375cc206a60e0e3b'/>
<id>urn:sha1:1a9d15db25487bb3fc009a88375cc206a60e0e3b</id>
<content type='text'>
A lot of work went into defining the state diagram for lockfiles and
ensuring correct, race-resistant cleanup in all circumstances.

Most of that infrastructure can be applied directly to *any* temporary
file. So extract a new "tempfile" module from the "lockfile" module.
Reimplement lockfile on top of tempfile.

Subsequent commits will add more users of the new module.

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>commit_lock_file(): use get_locked_file_path()</title>
<updated>2015-08-10T19:57:14Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-08-10T09:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c77381d6a495e102b811df954d0fa14e62250ab'/>
<id>urn:sha1:9c77381d6a495e102b811df954d0fa14e62250ab</id>
<content type='text'>
First beef up the sanity checking in get_locked_file_path() to match
that in commit_lock_file(). Then rewrite commit_lock_file() to use
get_locked_file_path() for its pathname computation.

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: add accessor get_lock_file_path()</title>
<updated>2015-08-10T19:57:14Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-08-10T09:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4fb09e4da53bfc6c720337142af5db3204736d5'/>
<id>urn:sha1:b4fb09e4da53bfc6c720337142af5db3204736d5</id>
<content type='text'>
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: add accessors get_lock_file_fd() and get_lock_file_fp()</title>
<updated>2015-08-10T19:57:14Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-08-10T09:47:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c99a4c2db3053e4fb6a43870f5c747f858b0f58f'/>
<id>urn:sha1:c99a4c2db3053e4fb6a43870f5c747f858b0f58f</id>
<content type='text'>
We are about to move those members, so change client code to read them
through accessor functions.

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: move documentation to lockfile.h and lockfile.c</title>
<updated>2015-08-10T19:57:14Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-08-10T09:47:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2db69de81deea4682579d0b9e6da40b4e9558c05'/>
<id>urn:sha1:2db69de81deea4682579d0b9e6da40b4e9558c05</id>
<content type='text'>
Rearrange/rewrite it somewhat to fit its new environment.

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>Merge branch 'js/sleep-without-select'</title>
<updated>2015-06-24T19:21:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-24T19:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=510ab3f3c19566b43be02ec13c3326fa04a4a677'/>
<id>urn:sha1:510ab3f3c19566b43be02ec13c3326fa04a4a677</id>
<content type='text'>
Portability fix.

* js/sleep-without-select:
  lockfile: wait using sleep_millisec() instead of select()
  lockfile: convert retry timeout computations to millisecond
  help.c: wrap wait-only poll() invocation in sleep_millisec()
  lockfile: replace random() by rand()
</content>
</entry>
</feed>
