<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.c, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-05-19T20:35:57Z</updated>
<entry>
<title>Merge branch 'js/rebase-count-fixes'</title>
<updated>2023-05-19T20:35:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-05-19T20:35:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cacc15ee3fa1a00b1a01ca2caf050cf2f6e0cc8f'/>
<id>urn:sha1:cacc15ee3fa1a00b1a01ca2caf050cf2f6e0cc8f</id>
<content type='text'>
A few bugs in the sequencer machinery that results in miscounting
the steps have been corrected.

* js/rebase-count-fixes:
  rebase -r: fix the total number shown in the progress
  rebase --update-refs: fix loops
</content>
</entry>
<entry>
<title>rebase -r: fix the total number shown in the progress</title>
<updated>2023-05-15T04:44:50Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2023-05-13T08:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=170eea9750e1bca7a35b5d27def9ee77df92fdf1'/>
<id>urn:sha1:170eea9750e1bca7a35b5d27def9ee77df92fdf1</id>
<content type='text'>
For regular, non-`--rebase-merges` runs, there is very little work to do
for the parser when determining the total number of commands in a rebase
script: it is simply the number of lines after stripping the commented
lines and then trimming the trailing empty line, if any.

The `--rebase-merges` mode complicates things by introducing empty lines
and comments in the middle of the script. These should _not_ be counted
as commands, and indeed, when an interactive rebase is interrupted and
subsequently resumed, the total number of commands can magically shrink,
sometimes dramatically.

The reason for this strange behavior is that empty lines _are_ counted
in `edit_todo_list()` (but not the comments, as they are stripped via
`strbuf_stripspace(..., 1)`, which is a bug.

Let's fix this so that the correct total number is shown from the
get-go, by carefully adjusting it according to what's in the rebase
script. Extra care needs to be taken in case the user edits the script:
the number of commands might be different after the user edited than
beforehand.

Note: Even though commented lines are skipped in `edit_todo_list()`, we
still need to handle `TODO_COMMENT` items by decrementing the
already-incremented `total_nr` again: empty lines are also marked as
`TODO_COMMENT`.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Acked-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>rebase --update-refs: fix loops</title>
<updated>2023-05-15T04:44:50Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2023-05-13T08:11:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa5103dd8913366b031ad8daa11f27e9452638be'/>
<id>urn:sha1:fa5103dd8913366b031ad8daa11f27e9452638be</id>
<content type='text'>
The `total_nr` field in the `todo_list` structure merely serves display
purposes, and should only be used when generating the progress message.

In these two instances, however, we want to loop over all of the
commands in the parsed rebase script. The loop limit therefore needs to
be `nr`, which refers to the count of commands in the current
`todo_list`.

This is important because the two numbers, `nr` and `total_nr` can
differ wildly, e.g. due to `total_nr` _not_ counting comments or empty
lines, while `nr` skips any commands that already moved from the
`git-rebase-todo` file to the `done` file.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Acked-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>Merge branch 'ob/messages-capitalize-exception'</title>
<updated>2023-05-09T23:45:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-05-09T23:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=461eea3fb88b92ce174a2a38ed12b22cd390ee81'/>
<id>urn:sha1:461eea3fb88b92ce174a2a38ed12b22cd390ee81</id>
<content type='text'>
Message update.

* ob/messages-capitalize-exception:
  messages: capitalization and punctuation exceptions
</content>
</entry>
<entry>
<title>Merge branch 'ob/sequencer-i18n-fix'</title>
<updated>2023-05-09T23:45:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-05-09T23:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d6b7f01cd70a4d9d55de8126c2f2678e2478dce8'/>
<id>urn:sha1:d6b7f01cd70a4d9d55de8126c2f2678e2478dce8</id>
<content type='text'>
Message update.

* ob/sequencer-i18n-fix:
  sequencer: actually translate report in do_exec()
</content>
</entry>
<entry>
<title>Merge branch 'en/header-split-cache-h-part-2'</title>
<updated>2023-05-09T23:45:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-05-09T23:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ccd12a3d6cc62f51b746654ae56e26d92f89ba92'/>
<id>urn:sha1:ccd12a3d6cc62f51b746654ae56e26d92f89ba92</id>
<content type='text'>
More header clean-up.

* en/header-split-cache-h-part-2: (22 commits)
  reftable: ensure git-compat-util.h is the first (indirect) include
  diff.h: reduce unnecessary includes
  object-store.h: reduce unnecessary includes
  commit.h: reduce unnecessary includes
  fsmonitor: reduce includes of cache.h
  cache.h: remove unnecessary headers
  treewide: remove cache.h inclusion due to previous changes
  cache,tree: move basic name compare functions from read-cache to tree
  cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.c
  hash-ll.h: split out of hash.h to remove dependency on repository.h
  tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define from cache.h
  dir.h: move DTYPE defines from cache.h
  versioncmp.h: move declarations for versioncmp.c functions from cache.h
  ws.h: move declarations for ws.c functions from cache.h
  match-trees.h: move declarations for match-trees.c functions from cache.h
  pkt-line.h: move declarations for pkt-line.c functions from cache.h
  base85.h: move declarations for base85.c functions from cache.h
  copy.h: move declarations for copy.c functions from cache.h
  server-info.h: move declarations for server-info.c functions from cache.h
  packfile.h: move pack_window and pack_entry from cache.h
  ...
</content>
</entry>
<entry>
<title>messages: capitalization and punctuation exceptions</title>
<updated>2023-04-28T19:06:27Z</updated>
<author>
<name>Oswald Buddenhagen</name>
<email>oswald.buddenhagen@gmx.de</email>
</author>
<published>2023-04-28T12:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b734fe49fddb4bbd02f471fa3b11d3605bd6921d'/>
<id>urn:sha1:b734fe49fddb4bbd02f471fa3b11d3605bd6921d</id>
<content type='text'>
These are conscious violations of the usual rules for error messages,
based on this reasoning:

 - If an error message is directly followed by another sentence, it
   needs to be properly terminated with a period, lest the grammar
   looks broken and becomes hard to read.

 - That second sentence isn't actually an error message any more, so
   it should abide to conventional language rules for good looks and
   legibility. Arguably, these should be converted to advice
   messages (which the user can squelch, too), but that's a much
   bigger effort to get right.

 - Neither of these apply to the first hunk in do_exec(), but this
   two-line message looks just too much like a real sentence to not
   terminate it. Also, leaving it alone would make it asymmetrical
   to the other hunk.

Signed-off-by: Oswald Buddenhagen &lt;oswald.buddenhagen@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: actually translate report in do_exec()</title>
<updated>2023-04-28T19:03:40Z</updated>
<author>
<name>Oswald Buddenhagen</name>
<email>oswald.buddenhagen@gmx.de</email>
</author>
<published>2023-04-28T12:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d45cbe3fe0e68253934cfdea4a960705fdb07852'/>
<id>urn:sha1:d45cbe3fe0e68253934cfdea4a960705fdb07852</id>
<content type='text'>
N_() is meant to be used on strings that are subsequently _()'d, which
isn't the case here.

The affected construct is a bit questionable from an i18n perspective,
as it pieces together a sentence from separate strings. However, it
doesn't appear to be that bad, as the "assembly instructions" are in a
translatable message as well. Lacking specific complaints from
translators, it doesn't seem worth changing this.

Signed-off-by: Oswald Buddenhagen &lt;oswald.buddenhagen@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/header-split-cache-h'</title>
<updated>2023-04-25T20:56:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-04-25T20:56:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0807e57807aaffe2813fffb7704dcc9153f03832'/>
<id>urn:sha1:0807e57807aaffe2813fffb7704dcc9153f03832</id>
<content type='text'>
Header clean-up.

* en/header-split-cache-h: (24 commits)
  protocol.h: move definition of DEFAULT_GIT_PORT from cache.h
  mailmap, quote: move declarations of global vars to correct unit
  treewide: reduce includes of cache.h in other headers
  treewide: remove double forward declaration of read_in_full
  cache.h: remove unnecessary includes
  treewide: remove cache.h inclusion due to pager.h changes
  pager.h: move declarations for pager.c functions from cache.h
  treewide: remove cache.h inclusion due to editor.h changes
  editor: move editor-related functions and declarations into common file
  treewide: remove cache.h inclusion due to object.h changes
  object.h: move some inline functions and defines from cache.h
  treewide: remove cache.h inclusion due to object-file.h changes
  object-file.h: move declarations for object-file.c functions from cache.h
  treewide: remove cache.h inclusion due to git-zlib changes
  git-zlib: move declarations for git-zlib functions from cache.h
  treewide: remove cache.h inclusion due to object-name.h changes
  object-name.h: move declarations for object-name.c functions from cache.h
  treewide: remove unnecessary cache.h inclusion
  treewide: be explicit about dependence on mem-pool.h
  treewide: be explicit about dependence on oid-array.h
  ...
</content>
</entry>
<entry>
<title>copy.h: move declarations for copy.c functions from cache.h</title>
<updated>2023-04-24T19:47:31Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-04-22T20:17:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5fff46f4025e23ec61b9d74eac2bb19e7a2385d'/>
<id>urn:sha1:d5fff46f4025e23ec61b9d74eac2bb19e7a2385d</id>
<content type='text'>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
