]> source.dussan.org Git - jgit.git/commit
Generate conflicts and index updates on file mode changes 78/5078/1
authorChristian Halstrick <christian.halstrick@sap.com>
Mon, 13 Feb 2012 08:39:05 +0000 (09:39 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 13 Feb 2012 08:39:05 +0000 (09:39 +0100)
commited7b322186a872bdd4f41a1a31554a7e90d74de6
treed6032dff24e3fc1b3338e1c68f66b1d69274a754
parent3b358ce514ec655d3ff67de1430994d8428cdb04
Generate conflicts and index updates on file mode changes

Handle more cases for file mode changes. Especially make sure that the
following cases are handled correctly.

Case 1)

  An entry in the working tree, HEAD tree, and merge tree have
  different modes and different content.

  Prior Outcome:
    Dirty working tree content is replaced and file mode
    changes are lost.

  New Outcome:
    Conflict is generated.

Case 2)

  An entry in the index and merge tree have the same content
  but different modes but both modes are file type modes.

  Prior Outcome:
    File mode in working tree is not updated and the working
    directory is dirty.

  New Outcome:
    Index is updated and the working directory is clean.

Bug: 363772
Change-Id: I224602d68228eb419813986807f1eeab77e9c302
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Also-by: Kevin Sawicki <kevin@github.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java