git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is there a "--follow" equvalent argument to git-rev-list?
@ 2011-11-28 10:37 Steinar Bang
  2011-11-28 19:53 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Steinar Bang @ 2011-11-28 10:37 UTC (permalink / raw)
  To: git

I'm trying to make emacs vc log (`C-x v l') show the full history of git
versioned files.

In my first attempt, I tried adding a "--follow" argument to "git log"
in the vc-git-print-log message.  This made `C-x v l' show the full log.

But the problem with this solution was that commands done from the log,
such as diffing (a very convenient way to do diffs, when the "version
numbers" are sha1 hashes...), showing a particular revision, or
annotating from that revision and back, didn't work.  See the comment at
the end of this bug:
 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756

Today I decided to take another peek at this, but vc-git.el in the emacs
23.1 version of the file, now uses "git rev-list" instead of "git log"
to get the revision list.

And "git rev-list" doesn't seem to have anything similar to
"--follow"...?  At least I haven't found it.

The man page doesn't contain the text "renam".

Guessing at what the man page has meant, I've tried adding the "--all"
and "--full-history" arguments, but `C-x v l' still only shows history
back to the last move.

Is there an argument to "git rev-list" that will make it track across
renames?  Or is this only possible with "git log --follow"?

Thanks!


- Steinar

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

* Re: Is there a "--follow" equvalent argument to git-rev-list?
  2011-11-28 10:37 Is there a "--follow" equvalent argument to git-rev-list? Steinar Bang
@ 2011-11-28 19:53 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2011-11-28 19:53 UTC (permalink / raw)
  To: Steinar Bang; +Cc: git

[administrivia: do not use Mail-Followup-To here]

Steinar Bang <sb@dod.no> writes:

> Is there an argument to "git rev-list" that will make it track across
> renames?

There isn't, and it is more or less deliberate.

The "log --follow" is not meant as anything more than a checkbox hack. The
intended audience of "rev-list" is scripts that reads plumbing output and
it is expected to be capable of doing all of what "follow" does and more.
It can notice that the path you were following has disappeared at a
particular commit, see what other paths (notice the plural, which is not
what --follow does) in the older tree may have contributed the contents of
the newly added path by running "diff-tree -M" (or -C), etc. That way the
scripts can even notice a case where a file you were following originally
were two separate files that the commit merged into one, which "follow"
would never do.

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

end of thread, other threads:[~2011-11-28 19:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 10:37 Is there a "--follow" equvalent argument to git-rev-list? Steinar Bang
2011-11-28 19:53 ` Junio C Hamano

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