git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Marco Costalba <mcostalba@gmail.com>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: gitweb.cgi history not shown
Date: Sun, 11 Jun 2006 09:40:36 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0606110933040.5498@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0606110902090.5498@g5.osdl.org>



On Sun, 11 Jun 2006, Linus Torvalds wrote:
> 
> See? No renames. The renames is not what is fundamental here. What is 
> fundamental is the _STATE_ of the tree. Remember: that's what git tracks, 
> and that is what "git log" shows you.

Btw, this is also why I suggested adding a "--no-simplify-history" flag, 
because in this case, that's exactly what _you_ want. The reason git is 
doing something unexpected - and in your case inferior - is exactly that 
what you want in this case is really not "explain the STATE of this file", 
but you want "give me ALL THE HISTORY concerning this filename".

Both are very valid things to ask for, it just happens that "git log" by 
default answers the _other_ question. It does NOT answer the "what is all 
the history" question that you're asking, it answers the "how did this 
state come to be" question.

Btw, the original "git whatchanged -p" answered exactly the question you 
had, and the semantics changed when we rewrite "git whatchanged" to act 
like "git log -p". But you can still get the old semantics by hand, if you 
really want it, by doing

	git-rev-list --all | git-diff-tree -p -- <filename>

because (and this actually makes total sense when you look at it), you now 
actually say "first give me all the history" and then "show the actual 
changes in that history as it pertains to <filename>".

See? 

I hope this explains the not-so-subtle (but still easy to overlook) 
difference between the two.

And I do agree that we should teach "git log" and friends to be able to 
answer both questions, and that's what my suggested patch (fleshed out 
properly, of course) should do.

Not that I ever _tested_ it, of course. Me? Testing? You make me laugh. Ho 
Ho Ho.

			Linus

  reply	other threads:[~2006-06-11 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-11  5:31 gitweb.cgi history not shown Marco Costalba
2006-06-11  6:02 ` Linus Torvalds
2006-06-11  6:32   ` Marco Costalba
2006-06-11 16:19     ` Linus Torvalds
2006-06-11 16:40       ` Linus Torvalds [this message]
2006-06-11 16:54         ` Linus Torvalds
2006-06-11 16:59         ` Jakub Narebski
2006-06-11 17:57           ` Linus Torvalds

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=Pine.LNX.4.64.0606110933040.5498@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=mcostalba@gmail.com \
    /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).