git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Help creating git alias

From
David Aguilar <davvid@gmail.com>
Date
Oct 31, 2013, 18:15 UTC
Message-ID
<20131031181509.GB39079@gmail.com>
In-Reply-To
<xmqqd2ml8gbs.fsf@gitster.dls.corp.google.com>
On Thu, Oct 31, 2013 at 11:07:19AM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> David Aguilar <davvid@gmail.com> writes:
> 
> > A-ha.. I think adding the chdir to alias is possible using a function.
> 
> You do not have to use a function to do so, no?
Right, of course.
So something like:
[alias]
	example = "!cd ${GIT_PREFIX:-.} && git log \"$@\""
should do the trick.
-- 
David
Previous: Junio C HamanoNext: Eugene Sajine
Message 12 of 15 in “Help creating git alias”
  1. Eugene SajineOct 30, 2013
  2. Andrew ArdillOct 30, 2013
  3. Eugene SajineOct 30, 2013
  4. Ralf ThielowOct 30, 2013
  5. Eugene SajineOct 30, 2013
  6. Junio C HamanoOct 30, 2013
  7. Eugene SajineOct 31, 2013
  8. Junio C HamanoOct 31, 2013
  9. Eugene SajineOct 31, 2013
  10. David AguilarOct 31, 2013
  11. Junio C HamanoOct 31, 2013
  12. David AguilarOct 31, 2013
  13. Eugene SajineOct 31, 2013
  14. Junio C HamanoOct 31, 2013
  15. Eugene SajineOct 31, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.