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

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

From: Junio C Hamano <hidden>
Date: 2025-09-15 19:19:16

Possibly related (same subject, not in this thread)

kristofferhaugsbakk@fastmail.com writes:
§ 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help