Commit 63f49cd4 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'rustfmt'

f8ce105b rustfmt: apply formatting changes
26781820 rustfmt: use Vertical for trailing_comma
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !67
parents 25b6f61d f8ce105b
......@@ -3,5 +3,5 @@ force_multiline_blocks = true
report_todo = "Unnumbered"
report_fixme = "Unnumbered"
struct_lit_single_line = false
trailing_comma = "Always"
trailing_comma = "Vertical"
license_template_path = ".license.template"
......@@ -290,9 +290,10 @@ impl GitContext {
/// Check if a topic commit is mergeable into a target branch.
pub fn mergeable(&self, base: &CommitId, topic: &CommitId) -> Result<MergeStatus> {
let merge_base = self.git()
let merge_base = self
.git()
.arg("merge-base")
.arg("--all") // find all merge bases
.arg("--all") // find all merge bases
.arg(base.as_str())
.arg(topic.as_str())
.output()
......
......@@ -326,10 +326,11 @@ impl PreparingGitWorkArea {
/// preparations.
fn prepare(&self, rev: &CommitId) -> Result<()> {
// Read the base into the temporary index
let res = self.git()
let res = self
.git()
.arg("read-tree")
.arg("-i") // ignore the working tree
.arg("-m") // perform a merge
.arg("-i") // ignore the working tree
.arg("-m") // perform a merge
.arg(rev.as_str())
.output()
.chain_err(|| "failed to construct read-tree command")?;
......@@ -571,10 +572,11 @@ impl GitWorkArea {
let submodule_ctx = GitContext::new(self.gitdir().join("modules").join(name));
// NOTE: The submodule is assumed to be kept up-to-date externally.
let refs = submodule_ctx.git()
let refs = submodule_ctx
.git()
.arg("rev-list")
.arg("--first-parent") // only look at first-parent history
.arg("--reverse") // start with oldest commits
.arg("--first-parent") // only look at first-parent history
.arg("--reverse") // start with oldest commits
.arg(branch)
.arg(format!("^{}", ours))
.arg(format!("^{}", theirs))
......@@ -660,7 +662,11 @@ impl GitWorkArea {
} else if stage == "2" {
ours = CommitId::new(hash);
} else if stage == "3" {
conflict_info.push(self.submodule_conflict(path, &ours, &CommitId::new(hash))?);
conflict_info.push(self.submodule_conflict(
path,
&ours,
&CommitId::new(hash),
)?);
}
} else {
conflict_info.push(Conflict::Path(Path::new(path).to_path_buf()));
......
......@@ -32,8 +32,7 @@ fn setup_logging() {
}
}
fn flush(&self) {
}
fn flush(&self) {}
}
static LOGGER: SimpleLogger = SimpleLogger;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment