]> source.dussan.org Git - jgit.git/commit
Revert "CommitBuilder should check for duplicate parents" 36/44136/1
authorJonathan Nieder <jrn@google.com>
Wed, 18 Mar 2015 23:26:05 +0000 (16:26 -0700)
committerJonathan Nieder <jrn@google.com>
Wed, 18 Mar 2015 23:26:05 +0000 (16:26 -0700)
commit5967b658381f281496ed61e1dd170cef9bacd7aa
tree4e31789ca41411954d630de70dd19690f2785bf1
parent65c379e02d1d64164f0c4d8486e84493a4add548
Revert "CommitBuilder should check for duplicate parents"

This reverts commit 6bc48cdc62287934ce1b7003280b19a5994e7668.

Until git v1.7.10.2~29^2~1 (builtin/merge.c: reduce parents early,
2012-04-17), C git merge would make merge commits with duplicate parents
when asked to with a series of commands like the following:

  git checkout origin/master
  git merge --no-ff origin/master

Nowadays "git merge" removes redundant parents more aggressively
(whenever one parent is an ancestor of another and not just when
duplicates exist) but merges with duplicate parents are still permitted
and can be created with git fast-import or git commit-tree and history
viewers need to be able to cope with them.

CommitBuilder is an interface analagous to commit-tree, so it should
allow duplicate parents.  (That said, an option to automatically remove
redundant parents would be useful.)

Reported-by: Dave Borowitz <dborowitz@google.com>
Change-Id: Ia682238397eb1de8541802210fa875fdd50f62f0
Signed-off-by: Jonathan Nieder <jrn@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java