Thread (1 message) 1 message, 1 author, 2018-10-22

Re: [PATCH] alias: detect loops in mixed execution mode

From: Junio C Hamano <hidden>
Date: 2018-10-22 01:23:06

Jeff King [off-list ref] writes:
I agree it's probably quite rare, if it exists at all. But I also wonder
how important looping alias protection is. It's also rare, and the
outcome is usually "gee, I wonder why this is taking so long? ^C".

At least that's my instinct. I don't remember having run into this at
all myself (though certainly I have written my fair share of infinite
loops in other systems, like bash aliases, and that is what happened).
Yup, that instict is shared with me, and I tend to prefer something
based on a simple counter for that reason.
Would we print a long error message? I'd assume that we'd just recurse
for longer and print one error message that says:

  fatal: woah, you're 1000-levels deep in Git commands!

That doesn't help the user find the recursion, but re-running with
GIT_TRACE=1 would make it pretty clear, I'd think.
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help