Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] JGit rebase conflicts


I've been playing around with CRLF and pushed some changes to Gerrit. Hopefully a bit cleaner than before.
Unfortunately attempting to use the code on EGit yields interesting problems since we have blobs with CRLF
in the repo. C Git seems a bit happier.

Among other things i tried a rebase of a branch with two (irrelevant commits) on top of
6fb4990b76d2bbf88c6943f23b945fd7508134d4 onto e44e3d439044d17a7e4ec7e4e7b419ac26a3c338. This causes a conflict
because JGit sees a blob with CRLF in it and therefore thinks the normalized worktree file is changed and
rebase (pull with rebase actually) aborts and then finds a conflict again,

DirCacheCheckout ca line 774:
					} else if (dce != null
							&& (f == null || f.isModified(dce, true))) {
						conflict(name, dce, h, m);

One of the strange things happens in DirCacheCheckout when a STAGE_1 entry is supposed to be created,
but after the copyMetaData the entry is stage 0.

	private void conflict(String path, DirCacheEntry e, AbstractTreeIterator h, AbstractTreeIterator m) {

		DirCacheEntry entry;
		if (e != null) {
			entry = new DirCacheEntry(e.getPathString(), DirCacheEntry.STAGE_1);

That can't be right.

-- robin

Back to the top