Skip to content

Commit 47e09af

Browse files
redsun82Copilot
andcommitted
Just: say what keeps two root recipes apart, since nothing in the code does
Two repositories that each define a root recipe produce identical dumps in every field a reader would call meaningful, and are kept apart only by the doc comment one of them carries. Removing `doc` from the comparison is the obvious cleanup, documentation having no business deciding behaviour, and on its own it silently discards an invocation: measured over the paired trees, six of eight paths collapse. Comment only. The discriminator this wants is a separate question, and the note is here so that whoever reaches for the cleanup meets the coupling first. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 186ccd9 commit 47e09af

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

misc/just/forward_command.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,13 @@ def find_justfiles_above(command, arg):
232232
recipe = implements(dump, command, argc)
233233
# These justfiles are nested, so a recipe that was seen already is one this
234234
# one merely imported, and the nearest spelling of it has been taken.
235+
#
236+
# Two repositories that each define a root recipe are not that case: the text
237+
# can match while the workspace, the tool it runs and the paths it excludes all
238+
# differ, so they have to stay apart. Nothing here says so. They are told apart
239+
# only by the doc comment one of them happens to carry, which means dropping
240+
# `doc` from this comparison silently discards an invocation unless a real
241+
# discriminator arrives in the same change.
235242
if recipe is not None and recipe not in seen:
236243
seen.append(recipe)
237244
found.append((justfile, recipe))

0 commit comments

Comments
 (0)