git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: cte <cestreich@gmail.com>
Cc: sverre@rabbelier.nl, Dmitry Potapov <dpotapov@gmail.com>,
	git@vger.kernel.org
Subject: Re: linking libgit.a in C++ projects
Date: Thu, 31 Jul 2008 18:54:23 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0807311840240.3277@nehalem.linux-foundation.org> (raw)
In-Reply-To: <ac9f0f090807311817n551f53a5mb1270e6f4b2a058e@mail.gmail.com>



On Thu, 31 Jul 2008, cte wrote:
>
> Instead, git-log had to be altered to address gitk's needs, and an 
> option was added that users don't typically use.

Actually, no. 

I ended up doing a hack to add "git log --early-output", and some quick 
hacks to make git use it. But I'm happy to say that gitk doesn't use it 
any more. Gitk just parses the normal git log output, although obviously 
it ends up needing enough data to be able to fill in the gaps (ie it uses 
the "--parents" flag to get the rewritten parenthood info and the merges 
to keep it together).

So yeah, we have some options that enable output that simply doesn't make 
_sense_ to humans, but does when you are post-processing it (git has 
always had those, since it very much was about scripting from day one), 
but no, at least gitk doesn't use any really odd ones.

It literally does

	git log --no-color -z --pretty=raw --parents --boundary

(plus the args the user gave it). The --no-color turns off color if it's 
enabled by default.

The -z makes it the git log output a bit easier to parse by using a NUL 
character between commits.

The --pretty=raw is just to give the full/raw commit info - like giving 
the timestamps in the native raw format that is much easier to parse than 
any human-readable format.

The --parents I already mentioned - it is what makes you able to stitch 
the commits together (and it's useful for other things too: any scripts 
that look for merges will tend to use it, for example)

And the --boundary is to show the commits that aren't part of the actual 
selected set in gray.

It's all pretty generic, in other words. The -z option is purely for 
machine parsing, the others _can_ actually be useful even for humans (eg, 
--boundary together with --left-right and --pretty=oneline actually is 
very readable if you are used to that format).

So it's very true that git in general is geared towards scripting (and 
we've often added things to make it even more so), but no, your particular 
complaint isn't true. gitk doesn't do anything really strange.

		Linus

  reply	other threads:[~2008-08-01  1:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31  9:53 linking libgit.a in C++ projects cte
2008-07-31 10:57 ` Dmitry Potapov
2008-07-31 11:10   ` cte
2008-07-31 11:16     ` Pedro Melo
2008-07-31 11:20       ` Petr Baudis
2008-07-31 11:20       ` cte
2008-07-31 18:27     ` Sverre Rabbelier
2008-07-31 21:44       ` cte
2008-07-31 21:51         ` Sverre Rabbelier
2008-07-31 21:58           ` Shawn O. Pearce
2008-07-31 22:10             ` Sverre Rabbelier
2008-08-04 14:52             ` Steve Frécinaux
2008-08-01  1:17           ` cte
2008-08-01  1:54             ` Linus Torvalds [this message]
2008-08-01  2:12               ` cte
2008-07-31 22:23         ` Dmitry Potapov
2008-07-31 11:14   ` Petr Baudis
2008-07-31 11:18     ` cte
2008-07-31 12:34     ` Dmitry Potapov
2008-07-31 13:04 ` Boaz Harrosh
2008-07-31 14:44   ` Dmitry Potapov
2008-07-31 18:37   ` Alex Riesen
2008-07-31 18:55     ` Avery Pennarun
2008-08-03 20:12       ` Alex Riesen
2008-08-04  8:57         ` Boaz Harrosh
2008-07-31 21:31   ` cte

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=alpine.LFD.1.10.0807311840240.3277@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=cestreich@gmail.com \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sverre@rabbelier.nl \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).