<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.c, branch v2.17.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.17.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.17.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-03-21T18:30:10Z</updated>
<entry>
<title>Merge branch 'ma/skip-writing-unchanged-index'</title>
<updated>2018-03-21T18:30:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-21T18:30:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=beb2cdf5041104a7513301a9b20944a617eec94e'/>
<id>urn:sha1:beb2cdf5041104a7513301a9b20944a617eec94e</id>
<content type='text'>
Internal API clean-up to allow write_locked_index() optionally skip
writing the in-core index when it is not modified.

* ma/skip-writing-unchanged-index:
  write_locked_index(): add flag to avoid writing unchanged index
</content>
</entry>
<entry>
<title>Merge branch 'ma/roll-back-lockfiles'</title>
<updated>2018-03-14T19:01:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-14T19:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=787aa97f217eb97827205271daba6d95c80b9049'/>
<id>urn:sha1:787aa97f217eb97827205271daba6d95c80b9049</id>
<content type='text'>
Some codepaths used to take a lockfile and did not roll it back;
they are automatically rolled back at program exit, so there is no
real "breakage", but it still is a good practice to roll back when
you are done with a lockfile.

* ma/roll-back-lockfiles:
  sequencer: do not roll back lockfile unnecessarily
  merge: always roll back lock in `checkout_fast_forward()`
  merge-recursive: always roll back lock in `merge_recursive_generic()`
  sequencer: always roll back lock in `do_recursive_merge()`
  sequencer: make lockfiles non-static
</content>
</entry>
<entry>
<title>Merge branch 'bw/c-plus-plus'</title>
<updated>2018-03-06T22:54:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-06T22:54:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=169c9c0169a00876f699678ac66ebe9563b0c29f'/>
<id>urn:sha1:169c9c0169a00876f699678ac66ebe9563b0c29f</id>
<content type='text'>
Avoid using identifiers that clash with C++ keywords.  Even though
it is not a goal to compile Git with C++ compilers, changes like
this help use of code analysis tools that targets C++ on our
codebase.

* bw/c-plus-plus: (37 commits)
  replace: rename 'new' variables
  trailer: rename 'template' variables
  tempfile: rename 'template' variables
  wrapper: rename 'template' variables
  environment: rename 'namespace' variables
  diff: rename 'template' variables
  environment: rename 'template' variables
  init-db: rename 'template' variables
  unpack-trees: rename 'new' variables
  trailer: rename 'new' variables
  submodule: rename 'new' variables
  split-index: rename 'new' variables
  remote: rename 'new' variables
  ref-filter: rename 'new' variables
  read-cache: rename 'new' variables
  line-log: rename 'new' variables
  imap-send: rename 'new' variables
  http: rename 'new' variables
  entry: rename 'new' variables
  diffcore-delta: rename 'new' variables
  ...
</content>
</entry>
<entry>
<title>Merge branch 'rs/strbuf-read-file-or-whine'</title>
<updated>2018-03-06T22:54:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-06T22:54:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c14d5f99cd91347db3978c58c4b24d60ca29af75'/>
<id>urn:sha1:c14d5f99cd91347db3978c58c4b24d60ca29af75</id>
<content type='text'>
Code clean-up.

* rs/strbuf-read-file-or-whine:
  sequencer: factor out strbuf_read_file_or_whine()
</content>
</entry>
<entry>
<title>Merge branch 'nd/rebase-show-current-patch'</title>
<updated>2018-03-06T22:54:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-06T22:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ca488c04bdab90668471640baeb0d9140be064c'/>
<id>urn:sha1:9ca488c04bdab90668471640baeb0d9140be064c</id>
<content type='text'>
The new "--show-current-patch" option gives an end-user facing way
to get the diff being applied when "git rebase" (and "git am")
stops with a conflict.

* nd/rebase-show-current-patch:
  rebase: introduce and use pseudo-ref REBASE_HEAD
  rebase: add --show-current-patch
  am: add --show-current-patch
</content>
</entry>
<entry>
<title>write_locked_index(): add flag to avoid writing unchanged index</title>
<updated>2018-03-01T21:28:01Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2018-03-01T20:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=610008146ed1647bb1da6a098e314b8929ff213e'/>
<id>urn:sha1:610008146ed1647bb1da6a098e314b8929ff213e</id>
<content type='text'>
We have several callers like

	if (active_cache_changed &amp;&amp; write_locked_index(...))
		handle_error();
	rollback_lock_file(...);

where the final rollback is needed because "!active_cache_changed"
shortcuts the if-expression. There are also a few variants of this,
including some if-else constructs that make it more clear when the
explicit rollback is really needed.

Teach `write_locked_index()` to take a new flag SKIP_IF_UNCHANGED and
simplify the callers. Leave the most complicated of the callers (in
builtin/update-index.c) unchanged. Rewriting it to use this new flag
would end up duplicating logic.

We could have made the new flag behave the other way round
("FORCE_WRITE"), but that could break existing users behind their backs.
Let's take the more conservative approach. We can still migrate existing
callers to use our new flag. Later we might even be able to flip the
default, possibly without entirely ignoring the risk to in-flight or
out-of-tree topics.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: do not roll back lockfile unnecessarily</title>
<updated>2018-02-28T19:15:51Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2018-02-28T19:07:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=350292a1efb38bbcd6255a424df6adbfe78910ac'/>
<id>urn:sha1:350292a1efb38bbcd6255a424df6adbfe78910ac</id>
<content type='text'>
If `commit_lock_file()` or `hold_lock_file_for_update()` fail, there is
no need to call `rollback_lock_file()` on the lockfile. It doesn't hurt
either, but it does make different callers in this file inconsistent,
which might be confusing.

While at it, remove a trailing '.' from a recurring error message.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: always roll back lock in `do_recursive_merge()`</title>
<updated>2018-02-27T22:48:17Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2018-02-27T21:30:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6481652432eed5b073428411763d5b5d712b6745'/>
<id>urn:sha1:6481652432eed5b073428411763d5b5d712b6745</id>
<content type='text'>
If we return early, we forget to roll back the lockfile. Do so.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: make lockfiles non-static</title>
<updated>2018-02-27T22:48:16Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2018-02-27T21:30:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14bca6c63cec3bd6e9b636fd1ff5b0ea2bd5edce'/>
<id>urn:sha1:14bca6c63cec3bd6e9b636fd1ff5b0ea2bd5edce</id>
<content type='text'>
After 076aa2cbd (tempfile: auto-allocate tempfiles on heap, 2017-09-05),
we can have lockfiles on the stack.

One of these functions fails to always roll back the lock. That will be
fixed in the next commit.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: factor out strbuf_read_file_or_whine()</title>
<updated>2018-02-22T20:57:38Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2018-02-22T19:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=878056005e94f5fea00c9ff8999f30a99bf10cae'/>
<id>urn:sha1:878056005e94f5fea00c9ff8999f30a99bf10cae</id>
<content type='text'>
Reduce code duplication by factoring out a function that reads an entire
file into a strbuf, or reports errors on stderr if something goes wrong.

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>
</feed>
