jgit/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm
Christian Halstrick 5fe44ed3ee Fix DirCacheCheckout to return CheckoutConflictException
Problem occurs when the checkout wants to create a file 'd/f' but
the workingtree contains a dirty file 'd'. In order to create d/f the
file 'd' would have to be deleted and since the file is dirty that
content would be lost. This should lead to a CheckoutConflictException
for d/f when failOnConflict was set to true.

This fix also changes jgit checkout semantics to be more like native
gits checkout semantics. If during a checkout jgit wants to delete a
folder but finds that the working tree contains a dirty file at this
path then JGit will now throw an exception instead of silently keeping
the dirty file. Like in this example:

	git init
	touch b
	git add b
	git commit -m addB
	mkdir a
	touch a/c
	git add a/c
	git commit -m addAC
	rm -fr a
	touch a
	git checkout HEAD~

Change-Id: I9089123179e09dd565285d50b0caa308d290cccd
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
Also-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
2016-06-23 09:34:22 +02:00
..
AddTest.java Fixed few locale dependent pgm tests 2016-01-02 17:41:58 +01:00
ArchiveTest.java Make sure CLIGitCommand and Main produce (almost) same results 2016-01-06 17:27:31 -05:00
BranchTest.java Merge branch 'stable-4.2' 2016-01-20 09:45:48 +09:00
CLIGitCommandTest.java Allow to write tests with CLI syntax 2012-04-18 18:57:36 +02:00
CheckoutTest.java Fix DirCacheCheckout to return CheckoutConflictException 2016-06-23 09:34:22 +02:00
CloneTest.java Add missing @Test annotations 2016-06-01 16:06:23 -04:00
CommitAndLogTest.java Allow to write tests with CLI syntax 2012-04-18 18:57:36 +02:00
CommitTest.java Simplify pgm tests: allow varargs and trim output for toString() 2016-01-02 17:41:58 +01:00
ConfigTest.java ConfigTest: Create Git instance in try-with-resource 2016-01-21 15:31:56 +09:00
DescribeTest.java Added CLIText.fatalError(String) API for tests 2016-01-06 17:26:43 -05:00
FetchTest.java CLI fetch command should support --tags 2013-10-26 17:25:23 -04:00
InitTest.java JGit CLI: allow to call git init with specific directory 2016-05-22 22:11:03 +02:00
LsRemoteTest.java [pgm] Add option --tags for ls-remote 2014-12-16 15:29:08 +01:00
MergeTest.java Added CLIText.fatalError(String) API for tests 2016-01-06 17:26:43 -05:00
ReflogTest.java ReflogTest: Open Git instances in try-with-resource 2016-02-12 12:26:58 +09:00
RemoteTest.java Add remote command to JGit CLI 2015-12-11 22:54:48 +01:00
RepoTest.java RepoTest: Open Git in try-with-resources 2016-02-05 18:17:02 +09:00
ResetTest.java Sort "eager" path-like options to the end of the help 2015-12-29 15:00:31 +01:00
StatusTest.java Sort "eager" path-like options to the end of the help 2015-12-29 15:00:31 +01:00
TagTest.java Make sure tests don't blindly continue if a command is "silently" failed 2015-12-31 00:48:11 +01:00