Skip to content

Tools: git-subsystems-split: do not label a subject twice - #33889

Merged
peterbarker merged 1 commit into
ArduPilot:masterfrom
peterbarker:pr-claude/git-subsystems-split-double-label
Jul 31, 2026
Merged

Tools: git-subsystems-split: do not label a subject twice#33889
peterbarker merged 1 commit into
ArduPilot:masterfrom
peterbarker:pr-claude/git-subsystems-split-double-label

Conversation

@peterbarker

Copy link
Copy Markdown
Contributor

Summary

git subsystems-split labelled a commit subject twice when the subject already named the new subsystem after its own prefix, producing subjects like hwdef: hwdef: avoid shlex when splitting simple hwdef lines.

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

Against the subjects the substitution has to cope with, checking both the ones
which should collapse and the ones which must be left alone:

subsystem subject result
hwdef AP_HAL: hwdef: avoid shlex when splitting simple hwdef lines hwdef: avoid shlex when splitting simple hwdef lines
hwdef AP_HAL_ChibiOS: hwdef: compile the pin-type regex once hwdef: compile the pin-type regex once
hwdef hwdef: hwdef: hwdef: already trebled hwdef: already trebled
hwdef no colon in this subject hwdef: no colon in this subject
hwdef hwdef: hwdef:
Tools Tools: build_script_base: drop redundant Linux boards unchanged
AP_HAL AP_HAL: hwdef: avoid shlex unchanged
Rover Rover: fix a thing unchanged
hwdef hwdef: hwdefs are great unchanged

Description

Tool was fixed to not stuff up the commit lines....

AI assistance disclosure

This change was written with AI assistance (Claude). The AI wrote the patch, the
commit message, and this description, and ran the manual testing described above.
I have reviewed the change and am responsible for it.

build_template() removes one prefix from a subject before substituting
the subsystem in, so a subject which already named the subsystem after
its prefix ended up labelled twice: relabelling

  AP_HAL: hwdef: avoid shlex when splitting simple hwdef lines

for the hwdef subsystem gave "hwdef: hwdef: avoid shlex ...".

Collapse a repeated label when filling the template in, in both the
place which predicts a new subject for the plan and the place which
writes the message of a commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@robertlong13 robertlong13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@peterbarker
peterbarker merged commit db56aaf into ArduPilot:master Jul 31, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from ReadyForDevCall to Done in Peter's ArduPilot 4.8 Queue Jul 31, 2026
@peterbarker
peterbarker deleted the pr-claude/git-subsystems-split-double-label branch July 31, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants