From: Taylor Blau <me@ttaylorr.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH 1/1] contrib/git-jump/git-jump: support alias expansion
Date: Wed, 4 Sep 2019 16:51:16 -0400 [thread overview]
Message-ID: <20190904205116.GA20056@syl.local> (raw)
In-Reply-To: <473a7c7b241ad2d449d3bcb6daeb77a179c7e45f.1567619579.git.me@ttaylorr.com>
On Wed, Sep 04, 2019 at 01:55:03PM -0400, Taylor Blau wrote:
> @@ -68,7 +70,7 @@ if test $# -lt 1; then
> usage >&2
> exit 1
> fi
> -mode=$1; shift
> +mode="$(git config --default "$1" --get -- "alias.$1")"; shift
>
> trap 'rm -f "$tmp"' 0 1 2 3 15
> tmp=`mktemp -t git-jump.XXXXXX` || exit 1
I guess it's worth noting that this does _not_ respect extra options
given to the various modes. For example, if I alias 'diff' to 'diff
--minimal', we will try and invoke the function "mode_diff --minimal",
which doesn't make sense.
Perhaps we could take the output of this through "| awk '{ print $1 }'"
to discard any extra options, but it feels like a bit of a hack.
Personally, I'm not bothered by this, but I also don't use aliases to
add "default" options to any git sub-commands. But, I don't know if
other people do, in which case they may want to chime in here.
Thanks in advance for your thoughts.
> --
> 2.22.0
Thanks,
Taylor
next prev parent reply other threads:[~2019-09-04 20:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 17:55 [PATCH 0/1] contrib/git-jump: support alias expansion Taylor Blau
2019-09-04 17:55 ` [PATCH 1/1] contrib/git-jump/git-jump: " Taylor Blau
2019-09-04 20:51 ` Taylor Blau [this message]
2019-09-05 6:04 ` [PATCH 0/1] contrib/git-jump: " Jeff King
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=20190904205116.GA20056@syl.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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.