<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/apply.c, branch v2.12.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.12.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.12.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-01-30T22:07:52Z</updated>
<entry>
<title>apply: use SWAP macro</title>
<updated>2017-01-30T22:07:52Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-01-28T21:40:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db101991414f4e14b3763b4843dddcca6b31b40b'/>
<id>urn:sha1:db101991414f4e14b3763b4843dddcca6b31b40b</id>
<content type='text'>
Use the exported macro SWAP instead of the file-scoped macro swap and
remove the latter's definition.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hold_locked_index(): align error handling with hold_lockfile_for_update()</title>
<updated>2016-12-07T19:31:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-12-07T18:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3e83cc752e905e063d0930c682a06de5034074f'/>
<id>urn:sha1:b3e83cc752e905e063d0930c682a06de5034074f</id>
<content type='text'>
Callers of the hold_locked_index() function pass 0 when they want to
prepare to write a new version of the index file without wishing to
die or emit an error message when the request fails (e.g. somebody
else already held the lock), and pass 1 when they want the call to
die upon failure.

This option is called LOCK_DIE_ON_ERROR by the underlying lockfile
API, and the hold_locked_index() function translates the paramter to
LOCK_DIE_ON_ERROR when calling the hold_lock_file_for_update().

Replace these hardcoded '1' with LOCK_DIE_ON_ERROR and stop
translating.  Callers other than the ones that are replaced with
this change pass '0' to the function; no behaviour change is
intended with this patch.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
---

Among the callers of hold_locked_index() that passes 0:

 - diff.c::refresh_index_quietly() at the end of "git diff" is an
   opportunistic update; it leaks the lockfile structure but it is
   just before the program exits and nobody should care.

 - builtin/describe.c::cmd_describe(),
   builtin/commit.c::cmd_status(),
   sequencer.c::read_and_refresh_cache() are all opportunistic
   updates and they are OK.

 - builtin/update-index.c::cmd_update_index() takes a lock upfront
   but we may end up not needing to update the index (i.e. the
   entries may be fully up-to-date), in which case we do not need to
   issue an error upon failure to acquire the lock.  We do diagnose
   and die if we indeed need to update, so it is OK.

 - wt-status.c::require_clean_work_tree() IS BUGGY.  It asks
   silence, does not check the returned value.  Compare with
   callsites like cmd_describe() and cmd_status() to notice that it
   is wrong to call update_index_if_able() unconditionally.
</content>
</entry>
<entry>
<title>i18n: apply: mark error message for translation</title>
<updated>2016-10-17T21:51:42Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-10-17T13:15:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f25dfb5e8d26204e58d60a6fc209e4ae65827d83'/>
<id>urn:sha1:f25dfb5e8d26204e58d60a6fc209e4ae65827d83</id>
<content type='text'>
Update test to reflect changes.

Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: apply: mark error messages for translation</title>
<updated>2016-10-14T17:53:58Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-10-14T11:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d1d42bf5980b2d31f43f4a54c3d98d19f879b919'/>
<id>urn:sha1:d1d42bf5980b2d31f43f4a54c3d98d19f879b919</id>
<content type='text'>
Mark error messages for translation passed to error() and die()
functions.

Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: apply: mark info messages for translation</title>
<updated>2016-10-14T17:53:51Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-10-14T11:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5886637a2fb6e22200d53bc4b86d3f7ae12ab1bc'/>
<id>urn:sha1:5886637a2fb6e22200d53bc4b86d3f7ae12ab1bc</id>
<content type='text'>
Mark messages for translation printed to stderr.

Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: apply: mark plural string for translation</title>
<updated>2016-10-14T17:53:49Z</updated>
<author>
<name>Vasco Almeida</name>
<email>vascomalmeida@sapo.pt</email>
</author>
<published>2016-10-14T11:43:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=965d5c851ac8cea3521e805a3370c587fed78143'/>
<id>urn:sha1:965d5c851ac8cea3521e805a3370c587fed78143</id>
<content type='text'>
Mark plural string for translation using Q_().

Signed-off-by: Vasco Almeida &lt;vascomalmeida@sapo.pt&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>introduce CHECKOUT_INIT</title>
<updated>2016-09-22T20:42:18Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-22T16:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68e3d6292f27f123c072175748183c9cb9bc1c70'/>
<id>urn:sha1:68e3d6292f27f123c072175748183c9cb9bc1c70</id>
<content type='text'>
Add a static initializer for struct checkout and use it throughout the
code base.  It's shorter, avoids a memset(3) call and makes sure the
base_dir member is initialized to a valid (empty) string.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/object-id'</title>
<updated>2016-09-19T20:47:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-19T20:47:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4af9a7d344b0e1c3b504c0cfb650dabdb1df1852'/>
<id>urn:sha1:4af9a7d344b0e1c3b504c0cfb650dabdb1df1852</id>
<content type='text'>
The "unsigned char sha1[20]" to "struct object_id" conversion
continues.  Notable changes in this round includes that ce-&gt;sha1,
i.e. the object name recorded in the cache_entry, turns into an
object_id.

It had merge conflicts with a few topics in flight (Christian's
"apply.c split", Dscho's "cat-file --filters" and Jeff Hostetler's
"status --porcelain-v2").  Extra sets of eyes double-checking for
mismerges are highly appreciated.

* bc/object-id:
  builtin/reset: convert to use struct object_id
  builtin/commit-tree: convert to struct object_id
  builtin/am: convert to struct object_id
  refs: add an update_ref_oid function.
  sha1_name: convert get_sha1_mb to struct object_id
  builtin/update-index: convert file to struct object_id
  notes: convert init_notes to use struct object_id
  builtin/rm: convert to use struct object_id
  builtin/blame: convert file to use struct object_id
  Convert read_mmblob to take struct object_id.
  notes-merge: convert struct notes_merge_pair to struct object_id
  builtin/checkout: convert some static functions to struct object_id
  streaming: make stream_blob_to_fd take struct object_id
  builtin: convert textconv_object to use struct object_id
  builtin/cat-file: convert some static functions to struct object_id
  builtin/cat-file: convert struct expand_data to use struct object_id
  builtin/log: convert some static functions to use struct object_id
  builtin/blame: convert struct origin to use struct object_id
  builtin/apply: convert static functions to struct object_id
  cache: convert struct cache_entry to use struct object_id
</content>
</entry>
<entry>
<title>apply: learn to use a different index file</title>
<updated>2016-09-07T19:29:54Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2016-09-04T20:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b0b57fd91ce684679fdac1c3ae3a50c6aa3943e'/>
<id>urn:sha1:5b0b57fd91ce684679fdac1c3ae3a50c6aa3943e</id>
<content type='text'>
Sometimes we want to apply in a different index file.

Before the apply functionality was libified it was possible to
use the GIT_INDEX_FILE environment variable, for this purpose.

But now, as the apply functionality has been libified, it should
be possible to do that in a libified way.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: pass apply state to build_fake_ancestor()</title>
<updated>2016-09-07T19:29:54Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2016-09-04T20:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4290342dd2d957cbcdb100c7d847802746b0730'/>
<id>urn:sha1:b4290342dd2d957cbcdb100c7d847802746b0730</id>
<content type='text'>
To libify git apply functionality, we will need to read from a
different index file in get_current_sha1(). This index file will be
stored in "struct apply_state", so let's pass the state to
build_fake_ancestor() which will later pass it to get_current_sha1().

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
