<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit.h, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-03-26T21:59:03Z</updated>
<entry>
<title>Merge branch 'cm/rebase-i-fixup-amend-reword'</title>
<updated>2021-03-26T21:59:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-26T21:59:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89519f662c9e2b1c406fa72ba7923fcf5c028e89'/>
<id>urn:sha1:89519f662c9e2b1c406fa72ba7923fcf5c028e89</id>
<content type='text'>
"git commit --fixup=&lt;commit&gt;", which was to tweak the changes made
to the contents while keeping the original log message intact,
learned "--fixup=(amend|reword):&lt;commit&gt;", that can be used to
tweak both the message and the contents, and only the message,
respectively.

* cm/rebase-i-fixup-amend-reword:
  doc/git-commit: add documentation for fixup=[amend|reword] options
  t3437: use --fixup with options to create amend! commit
  t7500: add tests for --fixup=[amend|reword] options
  commit: add a reword suboption to --fixup
  commit: add amend suboption to --fixup to create amend! commit
  sequencer: export and rename subject_length()
</content>
</entry>
<entry>
<title>sequencer: export and rename subject_length()</title>
<updated>2021-03-15T21:29:35Z</updated>
<author>
<name>Charvi Mendiratta</name>
<email>charvi077@gmail.com</email>
</author>
<published>2021-03-15T07:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e0e28877988f8b98eb1e5cf4d4c5d29cc0b7f77'/>
<id>urn:sha1:6e0e28877988f8b98eb1e5cf4d4c5d29cc0b7f77</id>
<content type='text'>
This function can be used in other parts of git. Let's move the
function to commit.c and also rename it to make the name of the
function more generic.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Mentored-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Charvi Mendiratta &lt;charvi077@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/signed-objects-with-both-hashes'</title>
<updated>2021-02-23T00:12:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-02-23T00:12:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15af6e6fee54632358798bef548d89dd3764805d'/>
<id>urn:sha1:15af6e6fee54632358798bef548d89dd3764805d</id>
<content type='text'>
Signed commits and tags now allow verification of objects, whose
two object names (one in SHA-1, the other in SHA-256) are both
signed.

* bc/signed-objects-with-both-hashes:
  gpg-interface: remove other signature headers before verifying
  ref-filter: hoist signature parsing
  commit: allow parsing arbitrary buffers with headers
  gpg-interface: improve interface for parsing tags
  commit: ignore additional signatures when parsing signed commits
  ref-filter: switch some uses of unsigned long to size_t
</content>
</entry>
<entry>
<title>Merge branch 'ds/commit-graph-genno-fix'</title>
<updated>2021-02-18T01:21:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-02-18T01:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bd0b21bf78fa365bc5189452e3cbbbec7330002'/>
<id>urn:sha1:5bd0b21bf78fa365bc5189452e3cbbbec7330002</id>
<content type='text'>
Fix incremental update of commit-graph file around corrected commit
date data.

* ds/commit-graph-genno-fix:
  commit-graph: prepare commit graph
  commit-graph: be extra careful about mixed generations
  commit-graph: compute generations separately
  commit-graph: validate layers for generation data
  commit-graph: always parse before commit_graph_data_at()
  commit-graph: use repo_parse_commit
</content>
</entry>
<entry>
<title>Merge branch 'ak/corrected-commit-date'</title>
<updated>2021-02-18T01:21:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-02-18T01:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b4701ae4fa8e68362509013ceb496333b7ca0df'/>
<id>urn:sha1:8b4701ae4fa8e68362509013ceb496333b7ca0df</id>
<content type='text'>
The commit-graph learned to use corrected commit dates instead of
the generation number to help topological revision traversal.

* ak/corrected-commit-date:
  doc: add corrected commit date info
  commit-reach: use corrected commit dates in paint_down_to_common()
  commit-graph: use generation v2 only if entire chain does
  commit-graph: implement generation data chunk
  commit-graph: implement corrected commit date
  commit-graph: return 64-bit generation number
  commit-graph: add a slab to store topological levels
  t6600-test-reach: generalize *_three_modes
  commit-graph: consolidate fill_commit_graph_info
  revision: parse parent in indegree_walk_step()
  commit-graph: fix regression when computing Bloom filters
</content>
</entry>
<entry>
<title>commit: allow parsing arbitrary buffers with headers</title>
<updated>2021-02-11T07:35:42Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2021-02-11T02:08:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=937032e14aaf1eab59c96dd78938be1c48c648e1'/>
<id>urn:sha1:937032e14aaf1eab59c96dd78938be1c48c648e1</id>
<content type='text'>
Currently only commits are signed with headers.  However, in the future,
we'll also sign tags with headers as well.  Let's refactor out a
function called parse_buffer_signed_by_header which does exactly that.
In addition, since we'll want to sign things other than commits this
way, let's call the function sign_with_header instead of do_sign_commit.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: use repo_parse_commit</title>
<updated>2021-02-02T05:03:35Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-02-01T17:15:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4cc08316944d17fc214bdad47bb4e92c31d0751'/>
<id>urn:sha1:c4cc08316944d17fc214bdad47bb4e92c31d0751</id>
<content type='text'>
The write_commit_graph_context has a repository pointer, so use it.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Reviewed-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit_graft_pos(): take an oid instead of a bare hash</title>
<updated>2021-01-28T19:21:07Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-01-28T06:12:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98c431b6f9c767657e1c8cb57370fd1db82b341e'/>
<id>urn:sha1:98c431b6f9c767657e1c8cb57370fd1db82b341e</id>
<content type='text'>
All of our callers have an object_id, and are just dereferencing the
hash field to pass to us. Let's take the actual object_id instead. We
still access the hash to pass to hash_pos, but it's a step in the right
direction.

This makes the callers slightly simpler, but also gets rid of the
untyped pointer, as well as the now-inaccurate name "sha1".

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>commit: ignore additional signatures when parsing signed commits</title>
<updated>2021-01-19T01:38:20Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2021-01-18T23:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1fb5cf0da657ef046c4eb4d0de6f2defb2fb09c6'/>
<id>urn:sha1:1fb5cf0da657ef046c4eb4d0de6f2defb2fb09c6</id>
<content type='text'>
When we create a commit with multiple signatures, neither of these
signatures includes the other.  Consequently, when we produce the
payload which has been signed so we can verify the commit, we must strip
off any other signatures, or the payload will differ from what was
signed.  Do so, and in preparation for verifying with multiple
algorithms, pass the algorithm we want to verify into
parse_signed_commit.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: implement generation data chunk</title>
<updated>2021-01-19T00:21:18Z</updated>
<author>
<name>Abhishek Kumar</name>
<email>abhishekkumar8222@gmail.com</email>
</author>
<published>2021-01-16T18:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e8b63005c48696a26f976f5f9b0ccaf1983e439d'/>
<id>urn:sha1:e8b63005c48696a26f976f5f9b0ccaf1983e439d</id>
<content type='text'>
As discovered by Ævar, we cannot increment graph version to
distinguish between generation numbers v1 and v2 [1]. Thus, one of
pre-requistes before implementing generation number v2 was to
distinguish between graph versions in a backwards compatible manner.

We are going to introduce a new chunk called Generation DATa chunk (or
GDAT). GDAT will store corrected committer date offsets whereas CDAT
will still store topological level.

Old Git does not understand GDAT chunk and would ignore it, reading
topological levels from CDAT. New Git can parse GDAT and take advantage
of newer generation numbers, falling back to topological levels when
GDAT chunk is missing (as it would happen with a commit-graph written
by old Git).

We introduce a test environment variable 'GIT_TEST_COMMIT_GRAPH_NO_GDAT'
which forces commit-graph file to be written without generation data
chunk to emulate a commit-graph file written by old Git.

To minimize the space required to store corrrected commit date, Git
stores corrected commit date offsets into the commit-graph file, instea
of corrected commit dates. This saves us 4 bytes per commit, decreasing
the GDAT chunk size by half, but it's possible for the offset to
overflow the 4-bytes allocated for storage. As such overflows are and
should be exceedingly rare, we use the following overflow management
scheme:

We introduce a new commit-graph chunk, Generation Data OVerflow ('GDOV')
to store corrected commit dates for commits with offsets greater than
GENERATION_NUMBER_V2_OFFSET_MAX.

If the offset is greater than GENERATION_NUMBER_V2_OFFSET_MAX, we set
the MSB of the offset and the other bits store the position of corrected
commit date in GDOV chunk, similar to how Extra Edge List is maintained.

We test the overflow-related code with the following repo history:

           F - N - U
          /         \
U - N - U            N
         \          /
	  N - F - N

Where the commits denoted by U have committer date of zero seconds
since Unix epoch, the commits denoted by N have committer date of
1112354055 (default committer date for the test suite) seconds since
Unix epoch and the commits denoted by F have committer date of
(2 ^ 31 - 2) seconds since Unix epoch.

The largest offset observed is 2 ^ 31, just large enough to overflow.

[1]: https://lore.kernel.org/git/87a7gdspo4.fsf@evledraar.gmail.com/

Signed-off-by: Abhishek Kumar &lt;abhishekkumar8222@gmail.com&gt;
Reviewed-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Reviewed-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
