<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit.c, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-02-07T00:03:53Z</updated>
<entry>
<title>commit.c: free() revs.commit in get_fork_point()</title>
<updated>2023-02-07T00:03:53Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2023-02-06T19:08:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0c10ed19c4806e9a75e63fd5185d4d4c15f99c63'/>
<id>urn:sha1:0c10ed19c4806e9a75e63fd5185d4d4c15f99c63</id>
<content type='text'>
Fix a memory leak that's been with us since d96855ff517 (merge-base:
teach "--fork-point" mode, 2013-10-23).

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jt/avoid-lazy-fetch-commits'</title>
<updated>2023-01-05T06:07:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-01-05T06:07:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f9b02b970538e14086d07d6a8cc219259420a6f'/>
<id>urn:sha1:1f9b02b970538e14086d07d6a8cc219259420a6f</id>
<content type='text'>
Even in a repository with promisor remote, it is useless to
attempt to lazily attempt fetching an object that is expected to be
commit, because no "filter" mode omits commit objects.  Take
advantage of this assumption to fail fast on errors.

* jt/avoid-lazy-fetch-commits:
  commit: don't lazy-fetch commits
  object-file: emit corruption errors when detected
  object-file: refactor map_loose_object_1()
  object-file: remove OBJECT_INFO_IGNORE_LOOSE
</content>
</entry>
<entry>
<title>Merge branch 'rs/clear-commit-marks-cleanup'</title>
<updated>2022-12-26T02:42:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-12-26T02:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c637bd230dd705b39b22251110eb1fcc8d15b075'/>
<id>urn:sha1:c637bd230dd705b39b22251110eb1fcc8d15b075</id>
<content type='text'>
Code clean-up.

* rs/clear-commit-marks-cleanup:
  commit: skip already cleared parents in clear_commit_marks_1()
</content>
</entry>
<entry>
<title>commit: don't lazy-fetch commits</title>
<updated>2022-12-15T00:05:55Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2022-12-14T19:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e2ad1cda2759a14f7b046c4c82e2418f8af878c'/>
<id>urn:sha1:7e2ad1cda2759a14f7b046c4c82e2418f8af878c</id>
<content type='text'>
When parsing commits, fail fast when the commit is missing or
corrupt, instead of attempting to fetch them. This is done by inlining
repo_read_object_file() and setting the flag that prevents fetching.

This is motivated by a situation in which through a bug (not necessarily
through Git), there was corruption in the object store of a partial
clone. In this particular case, the problem was exposed when "git gc"
tried to expire reflogs, which calls repo_parse_commit(), which triggers
fetches of the missing commits.

(There are other possible solutions to this problem including passing an
argument from "git gc" to "git reflog" to inhibit all lazy fetches, but
I think that this fix is at the wrong level - fixing "git reflog" means
that this particular command works fine, or so we think (it will fail if
it somehow needs to read a legitimately missing blob, say, a .gitmodules
file), but fixing repo_parse_commit() will fix a whole class of bugs.)

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: skip already cleared parents in clear_commit_marks_1()</title>
<updated>2022-12-13T13:07:08Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-12-13T06:27:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4cb39fcf19b969cdfa042b65d4d0b62a7fd0ba1e'/>
<id>urn:sha1:4cb39fcf19b969cdfa042b65d4d0b62a7fd0ba1e</id>
<content type='text'>
Don't put clean parents on the pending list, as they and their ancestors
don't need any treatment and would be skipped later anyway.  This saves
the allocation and release of a commit list item in ca. 20% of the cases
during a run of the test suite.

Signed-off-by: René 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 'pw/rebase-keep-base-fixes'</title>
<updated>2022-10-31T01:04:42Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2022-10-31T01:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=003f815dd9f42b1bb893338b32d9cce33a8926c1'/>
<id>urn:sha1:003f815dd9f42b1bb893338b32d9cce33a8926c1</id>
<content type='text'>
"git rebase --keep-base" used to discard the commits that are
already cherry-picked to the upstream, even when "keep-base" meant
that the base, on top of which the history is being rebuilt, does
not yet include these cherry-picked commits.  The --keep-base
option now implies --reapply-cherry-picks and --no-fork-point
options.

* pw/rebase-keep-base-fixes:
  rebase --keep-base: imply --no-fork-point
  rebase --keep-base: imply --reapply-cherry-picks
  rebase: factor out branch_base calculation
  rebase: rename merge_base to branch_base
  rebase: store orig_head as a commit
  rebase: be stricter when reading state files containing oids
  t3416: set $EDITOR in subshell
  t3416: tighten two tests
</content>
</entry>
<entry>
<title>rebase: be stricter when reading state files containing oids</title>
<updated>2022-10-17T18:53:00Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2022-10-17T13:17:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b8dbfd030ccc8e5be6b22bc28a342119504e0c2b'/>
<id>urn:sha1:b8dbfd030ccc8e5be6b22bc28a342119504e0c2b</id>
<content type='text'>
The state files for 'onto' and 'orig_head' should contain a full hex
oid, change the reading functions from get_oid() to get_oid_hex() to
reflect this. They should also name commits and not tags so add and use
a function that looks up a commit from an oid like
lookup_commit_reference() but without dereferencing tags.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-compat-util.h: use "UNUSED", not "UNUSED(var)"</title>
<updated>2022-09-01T17:49:48Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-08-25T17:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7'/>
<id>urn:sha1:5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7</id>
<content type='text'>
As reported in [1] the "UNUSED(var)" macro introduced in
2174b8c75de (Merge branch 'jk/unused-annotation' into next,
2022-08-24) breaks coccinelle's parsing of our sources in files where
it occurs.

Let's instead partially go with the approach suggested in [2] of
making this not take an argument. As noted in [1] "coccinelle" will
ignore such tokens in argument lists that it doesn't know about, and
it's less of a surprise to syntax highlighters.

This undoes the "help us notice when a parameter marked as unused is
actually use" part of 9b240347543 (git-compat-util: add UNUSED macro,
2022-08-19), a subsequent commit will further tweak the macro to
implement a replacement for that functionality.

1. https://lore.kernel.org/git/220825.86ilmg4mil.gmgdl@evledraar.gmail.com/
2. https://lore.kernel.org/git/220819.868rnk54ju.gmgdl@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: mark unused reflog callback parameters</title>
<updated>2022-08-19T19:18:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-08-19T10:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c006e9fa59c02261738e20890f1aecd78f9db707'/>
<id>urn:sha1:c006e9fa59c02261738e20890f1aecd78f9db707</id>
<content type='text'>
Functions used with for_each_reflog_ent() need to conform to a
particular interface, but not every function needs all of the
parameters. Mark the unused ones to make -Wunused-parameter happy.

Signed-off-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 'rs/mergesort'</title>
<updated>2022-08-03T20:36:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-03T20:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e0d160bbc88c3486ff7ccae179e4730aab5dd28'/>
<id>urn:sha1:4e0d160bbc88c3486ff7ccae179e4730aab5dd28</id>
<content type='text'>
Make our mergesort implementation type-safe.

* rs/mergesort:
  mergesort: remove llist_mergesort()
  packfile: use DEFINE_LIST_SORT
  fetch-pack: use DEFINE_LIST_SORT
  commit: use DEFINE_LIST_SORT
  blame: use DEFINE_LIST_SORT
  test-mergesort: use DEFINE_LIST_SORT
  test-mergesort: use DEFINE_LIST_SORT_DEBUG
  mergesort: add macros for typed sort of linked lists
  mergesort: tighten merge loop
  mergesort: unify ranks loops
</content>
</entry>
</feed>
