<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin, branch v2.37.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-08-11T04:52:36Z</updated>
<entry>
<title>Merge branch 'jc/string-list-cleanup' into maint</title>
<updated>2022-08-11T04:52:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-11T04:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0fd38a5159f3cf5dfcb40776c863d42b695491a'/>
<id>urn:sha1:b0fd38a5159f3cf5dfcb40776c863d42b695491a</id>
<content type='text'>
Code clean-up.
source: &lt;xmqq7d471dns.fsf@gitster.g&gt;

* jc/string-list-cleanup:
  builtin/remote.c: use the right kind of STRING_LIST_INIT
</content>
</entry>
<entry>
<title>Merge branch 'mt/checkout-count-fix' into maint</title>
<updated>2022-08-11T04:52:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-11T04:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=340a6120e5efdc37edc2a2dbc7ddc6befd5e6995'/>
<id>urn:sha1:340a6120e5efdc37edc2a2dbc7ddc6befd5e6995</id>
<content type='text'>
"git checkout" miscounted the paths it updated, which has been
corrected.
source: &lt;cover.1657799213.git.matheus.bernardino@usp.br&gt;

* mt/checkout-count-fix:
  checkout: fix two bugs on the final count of updated entries
  checkout: show bug about failed entries being included in final report
  checkout: document bug where delayed checkout counts entries twice
</content>
</entry>
<entry>
<title>Merge branch 'jc/resolve-undo' into maint</title>
<updated>2022-08-11T04:52:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-11T04:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6aeb2fef9850e05c51e36a8c05b019e2954b2ef'/>
<id>urn:sha1:a6aeb2fef9850e05c51e36a8c05b019e2954b2ef</id>
<content type='text'>
The resolve-undo information in the index was not protected against
GC, which has been corrected.
source: &lt;xmqq35f7kzad.fsf@gitster.g&gt;

* jc/resolve-undo:
  fsck: do not dereference NULL while checking resolve-undo data
  revision: mark blobs needed for resolve-undo as reachable
</content>
</entry>
<entry>
<title>Merge branch 'jk/clone-unborn-confusion' into maint</title>
<updated>2022-08-05T22:51:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-05T22:51:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=de28459136810bc12d4fd380e02b7fb8b5b49421'/>
<id>urn:sha1:de28459136810bc12d4fd380e02b7fb8b5b49421</id>
<content type='text'>
"git clone" from a repository with some ref whose HEAD is unborn
did not set the HEAD in the resulting repository correctly, which
has been corrected.
source: &lt;YsdyLS4UFzj0j/wB@coredump.intra.peff.net&gt;

* jk/clone-unborn-confusion:
  clone: move unborn head creation to update_head()
  clone: use remote branch if it matches default HEAD
  clone: propagate empty remote HEAD even with other branches
  clone: drop extra newline from warning message
</content>
</entry>
<entry>
<title>Merge branch 'ro/mktree-allow-missing-fix' into maint</title>
<updated>2022-07-27T20:00:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-07-27T20:00:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=54ec7b817d15d4e7a24935286a9f8382ce216651'/>
<id>urn:sha1:54ec7b817d15d4e7a24935286a9f8382ce216651</id>
<content type='text'>
"git mktree --missing" lazily fetched objects that are missing from
the local object store, which was totally unnecessary for the purpose
of creating the tree object(s) from its input.
source: &lt;748f39a9-65aa-2110-cf92-7ddf81b5f507@roku.com&gt;

* ro/mktree-allow-missing-fix:
  mktree: do not check type of remote objects
</content>
</entry>
<entry>
<title>Merge branch 'jk/diff-files-cleanup-fix' into maint</title>
<updated>2022-07-27T20:00:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-07-27T20:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=494d31e9d6c7e6e40f53e06ae6909f00c4b5fb01'/>
<id>urn:sha1:494d31e9d6c7e6e40f53e06ae6909f00c4b5fb01</id>
<content type='text'>
An earlier attempt to plug leaks placed a clean-up label to jump to
at a bogus place, which as been corrected.
source: &lt;Ys0c0ePxPOqZ/5ck@coredump.intra.peff.net&gt;

* jk/diff-files-cleanup-fix:
  diff-files: move misplaced cleanup label
</content>
</entry>
<entry>
<title>builtin/remote.c: use the right kind of STRING_LIST_INIT</title>
<updated>2022-07-21T04:46:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-07-21T01:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e11fab59c71d191970233cf8c2f573458ed952c'/>
<id>urn:sha1:1e11fab59c71d191970233cf8c2f573458ed952c</id>
<content type='text'>
Since 4a4b4cda (builtin-remote: Make "remote -v" display push urls,
2009-06-13), the string_list that was initialized with 0 in its
strdup_string member is immediately made to strdup its key strings
by flipping the strdup_string member to true.  When 183113a5
(string_list: Add STRING_LIST_INIT macro and make use of it.,
2010-07-04) has introduced STRING_LIST_INIT macros, it mechanically
replaced the initialization to STRING_LIST_INIT_NODUP.

Instead, just use the other initialization macro to make it strdup
the key from the beginning.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>shortlog: use a stable sort</title>
<updated>2022-07-14T18:24:11Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-07-14T15:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=df534dcbaafa74be9e922418712bede75676588b'/>
<id>urn:sha1:df534dcbaafa74be9e922418712bede75676588b</id>
<content type='text'>
When sorting the output of `git shortlog` by count, a list of authors in
alphabetical order is then sorted by contribution count. Obviously, the
idea is to maintain the alphabetical order for items with identical
contribution count.

At the moment, this job is performed by `qsort()`. As that function is
not guaranteed to implement a stable sort algorithm, this can lead to
inconsistent and/or surprising behavior: items with identical
contribution count could lose their alphabetical sub-order.

The `qsort()` in MS Visual C's runtime does _not_ implement a stable
sort algorithm, and under certain circumstances this even causes a test
failure in t4201.21 "shortlog can match multiple groups", where two
authors both are listed with 2 contributions, and are listed in inverse
alphabetical order.

Let's instead use the stable sort provided by `git_stable_qsort()` to
avoid this inconsistency.

This is a companion to 2049b8dc65 (diffcore_rename(): use a stable sort,
2019-09-30).

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>checkout: fix two bugs on the final count of updated entries</title>
<updated>2022-07-14T17:19:28Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2022-07-14T11:49:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=611c7785e8e22637e183333c54ed266e6e83e163'/>
<id>urn:sha1:611c7785e8e22637e183333c54ed266e6e83e163</id>
<content type='text'>
At the end of `git checkout &lt;pathspec&gt;`, we get a message informing how
many entries were updated in the working tree. However, this number can
be inaccurate for two reasons:

1) Delayed entries currently get counted twice.
2) Failed entries are included in the count.

The first problem happens because the counter is first incremented
before inserting the entry in the delayed checkout queue, and once again
when finish_delayed_checkout() calls checkout_entry(). And the second
happens because the counter is incremented too early in
checkout_entry(), before the entry was in fact checked out. Fix that by
moving the count increment further down in the call stack and removing
the duplicate increment on delayed entries. Note that we have to keep
a per-entry reference for the counter (both on parallel checkout and
delayed checkout) because not all entries are always accumulated at the
same counter. See checkout_worktree(), at builtin/checkout.c for an
example.

Signed-off-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-files: move misplaced cleanup label</title>
<updated>2022-07-12T14:17:28Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-07-12T07:03:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04393ae7f7951ba8af982cd1943c4dfb3102f6ed'/>
<id>urn:sha1:04393ae7f7951ba8af982cd1943c4dfb3102f6ed</id>
<content type='text'>
Commit 0139c58ab9 (revisions API users: add "goto cleanup" for
release_revisions(), 2022-04-13) converted an early return in
cmd_diff_files() into a goto. But it put the cleanup label too early: if
read_cache_preload() returns an error, we'll set result to "-1", but
then jump to calling run_diff_files(), overwriting our result.

We should jump past the call to run_diff_files(). Likewise, we should go
past diff_result_code(), which is expecting to see a code from an actual
diff, not a negative error code.

In practice, I suspect this bug cannot actually be triggered, because
read_cache_preload() does not seem to ever return an error. Its return
value (eventually) comes from do_read_index(), which gives the number of
cache entries found, and calls die() on error. Still, it makes sense to
fix the inadvertent change from 0139c58ab9 first, and we can look into
the overall error handling of read_cache() separately (which is present
in many other callsites).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
