<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.c, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-12-06T11:20:02Z</updated>
<entry>
<title>global: mark code units that generate warnings with `-Wsign-compare`</title>
<updated>2024-12-06T11:20:02Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T10:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41f43b8243f42b9df2e98be8460646d4c0100ad3'/>
<id>urn:sha1:41f43b8243f42b9df2e98be8460646d4c0100ad3</id>
<content type='text'>
Mark code units that generate warnings with `-Wsign-compare`. This
allows for a structured approach to get rid of all such warnings over
time in a way that can be easily measured.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kh/sequencer-comment-char'</title>
<updated>2024-12-06T04:23:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-06T04:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f588c466151392b6df3c1a730f468a6c79e05de'/>
<id>urn:sha1:0f588c466151392b6df3c1a730f468a6c79e05de</id>
<content type='text'>
The sequencer failed to honor core.commentString in some places.

* kh/sequencer-comment-char:
  sequencer: comment commit messages properly
  sequencer: comment `--reference` subject line properly
  sequencer: comment checked-out branch properly
</content>
</entry>
<entry>
<title>sequencer: comment commit messages properly</title>
<updated>2024-11-26T01:05:08Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2024-11-25T20:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e2f377b03b0d3593df73a094f97c27b219b02f5'/>
<id>urn:sha1:7e2f377b03b0d3593df73a094f97c27b219b02f5</id>
<content type='text'>
The rebase todo editor has commands like `fixup -c` which affects
the commit messages of the rebased commits.[1]  For example:

    pick hash1 &lt;msg&gt;
    fixup hash2 &lt;msg&gt;
    fixup -c hash3 &lt;msg&gt;

This says that hash2 and hash3 should be squashed into hash1 and
that hash3’s commit message should be used for the resulting commit.
So the user is presented with an editor where the two first commit
messages are commented out and the third is not.  However this does
not work if `core.commentChar`/`core.commentString` is in use since
the comment char is hardcoded (#) in this `sequencer.c` function.
As a result the first commit message will not be commented out.

† 1: See 9e3cebd97cb (rebase -i: add fixup [-C | -c] command,
    2021-01-29)

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Co-authored-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Reported-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: comment `--reference` subject line properly</title>
<updated>2024-11-26T01:05:08Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2024-11-25T20:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=515d034f8d922602b9d417cdc02768757aa6f6c1'/>
<id>urn:sha1:515d034f8d922602b9d417cdc02768757aa6f6c1</id>
<content type='text'>
`git revert --reference &lt;commit&gt;` leaves behind a comment in the
first line:[1]

    # *** SAY WHY WE ARE REVERTING ON THE TITLE LINE ***

Meaning that the commit will just consist of the next line if the user
exits the editor directly:

    This reverts commit &lt;--format=reference commit&gt;

But the comment char here is hardcoded (#).  Which means that the
comment line will inadvertently be included in the commit message if
`core.commentChar`/`core.commentString` is in use.

† 1: See 43966ab3156 (revert: optionally refer to commit in the
    "reference" format, 2022-05-26)

Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: comment checked-out branch properly</title>
<updated>2024-11-26T01:05:08Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2024-11-25T20:13:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=94304b9f48e9c68f3214e25527c3aac865d3ce63'/>
<id>urn:sha1:94304b9f48e9c68f3214e25527c3aac865d3ce63</id>
<content type='text'>
`git rebase --update-ref` does not insert commands for dependent/sub-
branches which are checked out.[1]  Instead it leaves a comment about
that fact.  The comment char is hardcoded (#).  In turn the comment
line gets interpreted as an invalid command when `core.commentChar`/
`core.commentString` is in use.

† 1: See 900b50c242 (rebase: add --update-refs option, 2022-07-19)

Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: allow passing flags when setting up a transaction</title>
<updated>2024-11-20T22:59:14Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-11-20T07:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a0efef144686ca2c46caad98df72507ba2606ce5'/>
<id>urn:sha1:a0efef144686ca2c46caad98df72507ba2606ce5</id>
<content type='text'>
Allow passing flags when setting up a transaction such that the
behaviour of the transaction itself can be altered. This functionality
will be used in a subsequent patch.

Adapt callers accordingly.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase-merges: try and use branch names as labels</title>
<updated>2024-10-09T17:52:46Z</updated>
<author>
<name>Nicolas Guichard</name>
<email>nicolas@guichard.eu</email>
</author>
<published>2024-10-09T07:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=436892123dd9d442fe4f534bba6f7ead635db06c'/>
<id>urn:sha1:436892123dd9d442fe4f534bba6f7ead635db06c</id>
<content type='text'>
When interactively rebasing merge commits, the commit message is parsed to
extract a probably meaningful label name. For instance if the merge commit
is “Merge branch 'feature0'”, then the rebase script will have thes lines:
```
label feature0

merge -C $sha feature0 # “Merge branch 'feature0'
```

This heuristic fails in the case of octopus merges or when the merge commit
message is actually unrelated to the parent commits.

An example that combines both is:
```
*---.   967bfa4 (HEAD -&gt; integration) Integration
|\ \ \
| | | * 2135be1 (feature2, feat2) Feature 2
| |_|/
|/| |
| | * c88b01a Feature 1
| |/
|/|
| * 75f3139 (feat0) Feature 0
|/
* 25c86d0 (main) Initial commit
```
yields the labels Integration, Integration-2 and Integration-3.

Fix this by using a branch name for each merge commit's parent that is the
tip of at least one branch, and falling back to a label derived from the
merge commit message otherwise.
In the example above, the labels become feat0, Integration and feature2.

Signed-off-by: Nicolas Guichard &lt;nicolas@guichard.eu&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: extract load_branch_decorations</title>
<updated>2024-10-09T17:52:45Z</updated>
<author>
<name>Nicolas Guichard</name>
<email>nicolas@guichard.eu</email>
</author>
<published>2024-10-09T07:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68c9fcb027b4bd2e5d10618829937ee50503c281'/>
<id>urn:sha1:68c9fcb027b4bd2e5d10618829937ee50503c281</id>
<content type='text'>
Extract load_branch_decorations from todo_list_add_update_ref_commands so
it can be re-used in make_script_with_merges.

Since it can now be called multiple times, use non-static lists and place
it next to load_ref_decorations to re-use the decoration_loaded guard.

Signed-off-by: Nicolas Guichard &lt;nicolas@guichard.eu&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 'mt/rebase-x-quiet'</title>
<updated>2024-08-28T17:31:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-08-28T17:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=029c870ab55434ad90652a4b82b1616679ea17be'/>
<id>urn:sha1:029c870ab55434ad90652a4b82b1616679ea17be</id>
<content type='text'>
"git rebase -x --quiet" was not quiet, which was corrected.

* mt/rebase-x-quiet:
  rebase --exec: respect --quiet
</content>
</entry>
<entry>
<title>Merge branch 'ps/config-wo-the-repository'</title>
<updated>2024-08-23T16:02:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-08-23T16:02:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5e56a39e6a9b8621e62f7a18ed027777a095dba7'/>
<id>urn:sha1:5e56a39e6a9b8621e62f7a18ed027777a095dba7</id>
<content type='text'>
Use of API functions that implicitly depend on the_repository
object in the config subsystem has been rewritten to pass a
repository object through the callchain.

* ps/config-wo-the-repository:
  config: hide functions using `the_repository` by default
  global: prepare for hiding away repo-less config functions
  config: don't depend on `the_repository` with branch conditions
  config: don't have setters depend on `the_repository`
  config: pass repo to functions that rename or copy sections
  config: pass repo to `git_die_config()`
  config: pass repo to `git_config_get_expiry_in_days()`
  config: pass repo to `git_config_get_expiry()`
  config: pass repo to `git_config_get_max_percent_split_change()`
  config: pass repo to `git_config_get_split_index()`
  config: pass repo to `git_config_get_index_threads()`
  config: expose `repo_config_clear()`
  config: introduce missing setters that take repo as parameter
  path: hide functions using `the_repository` by default
  path: stop relying on `the_repository` in `worktree_git_path()`
  path: stop relying on `the_repository` when reporting garbage
  hooks: remove implicit dependency on `the_repository`
  editor: do not rely on `the_repository` for interactive edits
  path: expose `do_git_common_path()` as `repo_common_pathv()`
  path: expose `do_git_path()` as `repo_git_pathv()`
</content>
</entry>
</feed>
