From: Miles Bader <miles@gnu.org>
To: Michael Horowitz <michael.horowitz@ieee.org>
Cc: git <git@vger.kernel.org>
Subject: Re: git alias question
Date: Thu, 29 Dec 2011 12:21:22 +0900 [thread overview]
Message-ID: <87wr9g2hcd.fsf@catnip.gol.com> (raw)
In-Reply-To: <CAFLRbopjqW7OEWN4kxy+6Gb828h4zBC_h=4WiP-q1__LeezxUw@mail.gmail.com> (Michael Horowitz's message of "Wed, 28 Dec 2011 20:27:59 -0500")
Michael Horowitz <michael.horowitz@ieee.org> writes:
> I was able to make the following 2 aliases, which work perfectly
> except for one problem...
>
> ldiff = "!git diff `git rev-list --reverse -n 2 HEAD -- $1` -- $1"
> ldifft = "!git difftool `git rev-list --reverse -n 2 HEAD -- $1` -- $1"
>
> The problem is the limitation that shell commands are always executed
> at the top-level directory of the repository.
Hmmm, it'd be cool if git exported an environment variable containing
the CWD when it invoked external aliases like this...!
-Miles
--
Love is the difficult realization that something other than oneself is real.
[Iris Murdoch]
next prev parent reply other threads:[~2011-12-29 3:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 1:27 git alias question Michael Horowitz
2011-12-29 3:21 ` Miles Bader [this message]
2011-12-29 5:32 ` Junio C Hamano
2011-12-29 17:08 ` Dave Borowitz
2011-12-30 1:59 ` David Aguilar
2011-12-31 21:31 ` Michael Horowitz
2011-12-31 23:30 ` Jakub Narebski
2012-01-02 5:57 ` Michael Horowitz
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=87wr9g2hcd.fsf@catnip.gol.com \
--to=miles@gnu.org \
--cc=git@vger.kernel.org \
--cc=michael.horowitz@ieee.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).