Thread (4 messages) 4 messages, 3 authors, 2025-09-17

Re: [PATCH v5 0/8] you-still-use-that??: improve breaking changes troubleshooting

flat view

From: Kristoffer Haugsbakk <hidden>
Date: 2025-09-16 20:48:20

Possibly related (same subject, not in this thread)

On Mon, Sep 15, 2025, at 21:19, Junio C Hamano wrote:
quoted hunk ↗ jump to hunk
kristofferhaugsbakk@fastmail.com writes:
quoted
§ Changes in v5

Fix the leak that Peff found (with Peff’s suggestion).  Also fix (with
Peff’s help) a regression where you were able to get into an infinite
alias loop specifically when using deprecated builtin names.
When merged to 'seen' and run with WITH_BREAKING_CHANGES=YesPlease,
looping alias test would chage the behaviour, and the test needs to
be prepared for it, I think.  Here is how t0014 fails

expecting success of 0014.4 'looping aliases - deprecated builtins':
        test_config alias.whatchanged pack-redundant &&
        test_config alias.pack-redundant whatchanged &&
        cat >expect <<-EOF &&
        ${SQ}whatchanged${SQ} is aliased to ${SQ}pack-redundant${SQ}
        ${SQ}pack-redundant${SQ} is aliased to ${SQ}whatchanged${SQ}
        ${SQ}whatchanged${SQ} is aliased to ${SQ}pack-redundant${SQ}
        fatal: alias loop detected: expansion of ${SQ}whatchanged${SQ}
does not terminate:
          whatchanged <==
          pack-redundant ==>
        EOF
        test_must_fail git whatchanged -h 2>actual &&
        test_cmp expect actual
--- expect      2025-09-15 19:16:26.340366359 +0000
+++ actual      2025-09-15 19:16:26.360366313 +0000
@@ -1,6 +1 @@
-'whatchanged' is aliased to 'pack-redundant'
-'pack-redundant' is aliased to 'whatchanged'
-'whatchanged' is aliased to 'pack-redundant'
-fatal: alias loop detected: expansion of 'whatchanged' does not terminate:
-  whatchanged <==
-  pack-redundant ==>
+fatal: cannot handle whatchanged as a builtin
not ok 4 - looping aliases - deprecated builtins
Thanks.  This is (maybe you surmise or know already but) a
problem when on the branch itself as well.  I did some compiling
`WITH_BREAKING_CHANGES=YesPlease` and it seems that 07572f220a8
(whatchanged: remove when built with WITH_BREAKING_CHANGES, 2025-05-12)
made it a hard error to call `whatchanged` after its death:

    $ ./bin-wrappers/git whatchanged
    fatal: cannot handle whatchanged as a builtin

This seems fine, although I would have expected it to say something more
neutral like “command not found”.

What I don’t understand though is this:

    $ ./bin-wrappers/git -c alias.whatchanged=status whatchanged
    fatal: cannot handle whatchanged as a builtin

People have been saying that people can at least alias `whatchanged` to
`log <something>` and then it will work after the removal.  But now that
it has been removed (according to the commit message) its spirit lives
on and prevents reusing the name?

Am I missing something here?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help