]> source.dussan.org Git - jgit.git/commit
Non-Fast-Forward Ref-Updates: Omit isMergedInto() calls 26/21226/3
authorRoberto Tyley <roberto.tyley@gmail.com>
Wed, 29 Jan 2014 00:32:55 +0000 (00:32 +0000)
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>
Thu, 13 Feb 2014 23:05:03 +0000 (18:05 -0500)
commit2b722815c9b6e3f8e50a081404265fb5b56b60e8
treeead7e450a46ca63fda7dfe9f4660ddc74b94b01c
parent47f47ffc07e00109dc069e111274252e4053a599
Non-Fast-Forward Ref-Updates: Omit isMergedInto() calls

When the caller specifies to JGit in advance that a ref-update is a
non-fast-forward update, and that those are permitted, we should never
need to call the potentially expensive isMergedInto() check. Re-checking
that the older commit is /not/ reachable from the newer is superfluous.

http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02258.html

Change-Id: I4bbf593de4dcea6b6f082881c1a33cb3a6a7fb89
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java