]> source.dussan.org Git - jgit.git/commit
log: Implement --follow 55/1055/1
authorShawn O. Pearce <spearce@spearce.org>
Sun, 4 Jul 2010 01:13:10 +0000 (18:13 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 4 Jul 2010 01:17:55 +0000 (18:17 -0700)
commit1913b41bc749ed8a176d7ea8100fb4b260547523
tree6592da4054933991cb42b5edc1cbbbfc14d7291d
parente9de5643fad6abdfe081d1a11416f2e4fa669038
log: Implement --follow

The FollowFilter can be installed on a RevWalk to cause the path
to be updated through rename detection when the affected file is
found to be added to the project.

The filter works reasonably well, for example we can follow the
history of the fsck command in git-core:

  $ jgit log --name-status --follow builtin/fsck.c | grep ^R
  R100 builtin-fsck.c builtin/fsck.c
  R099 fsck.c builtin-fsck.c
  R099 fsck-objects.c fsck.c
  R099 fsck-cache.c fsck-objects.c

Change-Id: I4017bcfd150126aa342fdd423a688493ca660a1f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteTreeFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java