diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-01-20 21:21:13 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-01-20 22:18:41 +0100 |
commit | 152e4b43a3711f0da6fa5f7beb98129fc8b9e9c8 (patch) | |
tree | 74644c3f4bd20e442ee9cdc792e061ab573c1b9a /org.eclipse.jgit.pgm | |
parent | 7a64771b9e761ef37c8ab0a29ffe03d29b688ec4 (diff) | |
download | jgit-152e4b43a3711f0da6fa5f7beb98129fc8b9e9c8.tar.gz jgit-152e4b43a3711f0da6fa5f7beb98129fc8b9e9c8.zip |
pgm: Fix missing braces in Fetch.run()
Change-Id: I4655417fd879733a357bf712a486ce0883021198
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java index f29740d8a0..da3c498796 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java @@ -140,24 +140,30 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback { protected void run() { try (Git git = new Git(db)) { FetchCommand fetch = git.fetch(); - if (fsck != null) + if (fsck != null) { fetch.setCheckFetchedObjects(fsck.booleanValue()); - if (prune != null) + } + if (prune != null) { fetch.setRemoveDeletedRefs(prune.booleanValue()); - if (toget != null) + } + if (toget != null) { fetch.setRefSpecs(toget); + } if (tags != null) { fetch.setTagOpt(tags.booleanValue() ? TagOpt.FETCH_TAGS : TagOpt.NO_TAGS); } - if (0 <= timeout) + if (0 <= timeout) { fetch.setTimeout(timeout); + } fetch.setDryRun(dryRun); fetch.setRemote(remote); - if (thin != null) + if (thin != null) { fetch.setThin(thin.booleanValue()); - if (quiet == null || !quiet.booleanValue()) + } + if (quiet == null || !quiet.booleanValue()) { fetch.setProgressMonitor(new TextProgressMonitor(errw)); + } fetch.setRecurseSubmodules(recurseSubmodules).setCallback(this); if (force != null) { fetch.setForceUpdate(force.booleanValue()); @@ -165,9 +171,9 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback { FetchResult result = fetch.call(); if (result.getTrackingRefUpdates().isEmpty() - && result.submoduleResults().isEmpty()) + && result.submoduleResults().isEmpty()) { return; - + } showFetchResult(result); } catch (GitAPIException | IOException e) { throw die(e.getMessage(), e); |