All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Christoph Anton Mitterer <calestyo@scientia.org>
Cc: Elijah Newren <newren@gmail.com>,  git@vger.kernel.org
Subject: Re: why can't one alias `git stash`?
Date: Mon, 18 Aug 2025 18:01:36 -0700	[thread overview]
Message-ID: <xmqqh5y4gm4v.fsf@gitster.g> (raw)
In-Reply-To: <d8b279098a41949eef06f26d3f09c3950486380b.camel@scientia.org> (Christoph Anton Mitterer's message of "Sat, 16 Aug 2025 04:11:20 +0200")

Christoph Anton Mitterer <calestyo@scientia.org> writes:

> As mentioned in the other thread, IMO it sounds rather brittle if
> aliases are considered at all in scripting.

As a program, how would you tell when you are run by a script?

If you are a shell, you go into "interactive" mode when you are
taking your command stream from a tty, and otherwise assume you are
not interactive.  The same trick would not work at all for programs
started by a shell, would it?

Asking script writers to pass "--no-alias" option to all of their
"git" invocation will probably not be a viable way forward, either.

  parent reply	other threads:[~2025-08-19  1:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15  0:33 why can't one alias `git stash`? Christoph Anton Mitterer
2025-08-15  1:23 ` Junio C Hamano
2025-08-15  2:02   ` Christoph Anton Mitterer
2025-08-15  4:04     ` Elijah Newren
2025-08-15 11:22       ` rsbecker
2025-08-16  2:03         ` Christoph Anton Mitterer
2025-08-15 15:27       ` Junio C Hamano
2025-08-16  2:11         ` Christoph Anton Mitterer
2025-08-16  9:15           ` Matthias Aßhauer
2025-08-19  1:01           ` Junio C Hamano [this message]
2025-08-19 21:38             ` Christoph Anton Mitterer
2025-08-16  1:35       ` Christoph Anton Mitterer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh5y4gm4v.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=calestyo@scientia.org \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.