diff options
author | Marc Strapetz <marc.strapetz@syntevo.com> | 2010-08-19 15:34:44 +0200 |
---|---|---|
committer | Marc Strapetz <marc.strapetz@syntevo.com> | 2010-08-26 12:58:03 +0200 |
commit | 80c622c49c22e6d303856b8cb916b5fd0da86712 (patch) | |
tree | d430984eb4582368a360b316656832491e1db18c /org.eclipse.jgit.pgm | |
parent | 6517a7c923e012ea4b3d9f2497122d9c64dbdd5e (diff) | |
download | jgit-80c622c49c22e6d303856b8cb916b5fd0da86712.tar.gz jgit-80c622c49c22e6d303856b8cb916b5fd0da86712.zip |
Fix parsing of multiple authors in PersonIdent.
PersonIdent should be parsable for an invalid commit which
contains multiple authors, like "A <a@a.org>, B <b@b.org>".
PersonIdent(String) constructor now delegates to
RawParseUtils.parsePersonIdent().
Change-Id: Ie9798d36d9ecfcc0094ca795f5a44b003136eaf7
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java index b26dde3a4a..dd33a161e9 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java @@ -47,6 +47,7 @@ import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.util.RawParseUtils; import org.kohsuke.args4j.Option; @Command(common = true, usage = "usage_recordChangesToRepository") @@ -65,7 +66,7 @@ class Commit extends TextBuiltin { ConcurrentRefUpdateException, JGitInternalException, Exception { CommitCommand commitCmd = new Git(db).commit(); if (author != null) - commitCmd.setAuthor(new PersonIdent(author)); + commitCmd.setAuthor(RawParseUtils.parsePersonIdent(author)); if (message != null) commitCmd.setMessage(message); Ref head = db.getRef(Constants.HEAD); |