From: Jeff King Date: Fri, 19 Oct 2018 22:09:47 GMT Subject: Re: [PATCH] alias: detect loops in mixed execution mode Message-ID: <20181019220946.GB31563@sigill.intra.peff.net> In-Reply-To: <87pnw6cpcp.fsf@evledraar.gmail.com> On Fri, Oct 19, 2018 at 10:28:22AM +0200, Ævar Arnfjörð Bjarmason wrote: > > - string_list_append(&cmd_list, *argv[0]); > > + add_cmd_history(&env, &cmd_list, *argv[0]); > > > > /* > > * It could be an alias -- this works around the insanity > > Just to sanity check an assumption of mine: One thing I didn't do is use > sq_quote_buf() and sq_dequote_to_argv() like we do for > CONFIG_DATA_ENVIRONMENT. This is because in the case of config we need > to deal with: > > $ git config alias.cfgdump > !env > $ git -c x.y=z -c "foo.bar='baz'" cfgdump|grep baz > GIT_CONFIG_PARAMETERS='x.y=z' 'foo.bar='\''baz'\''' > > But in this case I don't see how a command-name would ever contain > whitespace. So we skip quoting and just delimit by space. Alias names cannot currently contain whitespace, because it's not allowed in the key. However, we've discussed making the syntax alias..command, which would then make it possible. Whether anyone would use that is a different question, but hey, apparently some people think "My Documents" is a good name for a directory. ;) -Peff