git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is it possible for git to remember the options preference for "git log"?
@ 2007-11-12  0:33 eric miao
  2007-11-12  0:56 ` Jakub Narebski
  2007-11-12  1:02 ` Daniel Barkalow
  0 siblings, 2 replies; 4+ messages in thread
From: eric miao @ 2007-11-12  0:33 UTC (permalink / raw)
  To: git

All,

Most of the time I'm using git-log for inspecting a brief history
and insert/remove/modify commits between, which I have to
type "git log --abbrev-commit --pretty=oneline" every time. Is
it possible for git to remember this command line options
preference?

And no, I don't really want to use shell's alias or something
else, I was just used to type "git xxx" :-)

-- 
Cheers
- eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible for git to remember the options preference for "git log"?
  2007-11-12  0:33 Is it possible for git to remember the options preference for "git log"? eric miao
@ 2007-11-12  0:56 ` Jakub Narebski
  2007-11-12  1:02 ` Daniel Barkalow
  1 sibling, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2007-11-12  0:56 UTC (permalink / raw)
  To: git

eric miao wrote:


> Most of the time I'm using git-log for inspecting a brief history
> and insert/remove/modify commits between, which I have to
> type "git log --abbrev-commit --pretty=oneline" every time. Is
> it possible for git to remember this command line options
> preference?
> 
> And no, I don't really want to use shell's alias or something
> else, I was just used to type "git xxx" :-)

You can always use (global) _git_ alias ;-p

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible for git to remember the options preference for "git log"?
  2007-11-12  0:33 Is it possible for git to remember the options preference for "git log"? eric miao
  2007-11-12  0:56 ` Jakub Narebski
@ 2007-11-12  1:02 ` Daniel Barkalow
  2007-11-12  2:21   ` eric miao
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Barkalow @ 2007-11-12  1:02 UTC (permalink / raw)
  To: eric miao; +Cc: git

On Mon, 12 Nov 2007, eric miao wrote:

> All,
> 
> Most of the time I'm using git-log for inspecting a brief history
> and insert/remove/modify commits between, which I have to
> type "git log --abbrev-commit --pretty=oneline" every time. Is
> it possible for git to remember this command line options
> preference?
> 
> And no, I don't really want to use shell's alias or something
> else, I was just used to type "git xxx" :-)

Git has a built-in alias mechanism, which is probably what you want. If 
you put in your config file:

[alias]
	xxx = log --abbrev-commit --pretty=online

then you can type "git xxx" and it'll do what you want. Changing the 
default behavior of the basic commands is looked down on because there are 
scripts that use them to get their input, and those scripts have 
particular formats they expect.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible for git to remember the options preference for "git log"?
  2007-11-12  1:02 ` Daniel Barkalow
@ 2007-11-12  2:21   ` eric miao
  0 siblings, 0 replies; 4+ messages in thread
From: eric miao @ 2007-11-12  2:21 UTC (permalink / raw)
  To: Daniel Barkalow; +Cc: git

On Nov 12, 2007 9:02 AM, Daniel Barkalow <barkalow@iabervon.org> wrote:
>
> On Mon, 12 Nov 2007, eric miao wrote:
>
> > All,
> >
> > Most of the time I'm using git-log for inspecting a brief history
> > and insert/remove/modify commits between, which I have to
> > type "git log --abbrev-commit --pretty=oneline" every time. Is
> > it possible for git to remember this command line options
> > preference?
> >
> > And no, I don't really want to use shell's alias or something
> > else, I was just used to type "git xxx" :-)
>
> Git has a built-in alias mechanism, which is probably what you want. If
> you put in your config file:
>
> [alias]
>         xxx = log --abbrev-commit --pretty=online
>

Thanks, this is exactly what I want.

> then you can type "git xxx" and it'll do what you want. Changing the
> default behavior of the basic commands is looked down on because there are
> scripts that use them to get their input, and those scripts have
> particular formats they expect.
>

Ye, agree, I don't think that's a good idea either.

>         -Daniel
> *This .sig left intentionally blank*
>



-- 
Cheers
- eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-12  2:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-12  0:33 Is it possible for git to remember the options preference for "git log"? eric miao
2007-11-12  0:56 ` Jakub Narebski
2007-11-12  1:02 ` Daniel Barkalow
2007-11-12  2:21   ` eric miao

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).