Skip to content

Commit

Permalink
Merge branch 'martinvonz:main' into patch-4042
Browse files Browse the repository at this point in the history
  • Loading branch information
InCogNiTo124 authored Aug 16, 2024
2 parents 72e28f3 + be35ab1 commit 03c0982
Show file tree
Hide file tree
Showing 14 changed files with 864 additions and 667 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa
uses: github/codeql-action/upload-sarif@429e1977040da7a23b6822b13c129cd1ba93dbb2
with:
sarif_file: results.sarif
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### New features

* The following diff formats now include information about copies and moves:
`--color-words`, `--stat`, `--summary`
`--color-words`, `--git`, `--stat`, `--summary`, `--types`, and external diff
tools in file-by-file mode.

* A tilde (`~`) at the start of the path will now be expanded to the user's home
directory when configuring a `signing.key` for SSH commit signing.
Expand Down
18 changes: 15 additions & 3 deletions cli/src/commit_templater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1366,8 +1366,20 @@ fn builtin_tree_diff_methods<'repo>() -> CommitTemplateBuildMethodFnMap<'repo, T
let template = (self_property, context_property)
.map(|(diff, context)| {
let context = context.unwrap_or(diff_util::DEFAULT_CONTEXT_LINES);
diff.into_formatted(move |formatter, store, tree_diff| {
diff_util::show_git_diff(formatter, store, tree_diff, context)
// TODO: don't pass separate copies of from_tree/to_tree/matcher
let from_tree = diff.from_tree.clone();
let to_tree = diff.to_tree.clone();
let matcher = diff.matcher.clone();
diff.into_formatted(move |formatter, store, _tree_diff| {
diff_util::show_git_diff(
formatter,
store,
&from_tree,
&to_tree,
matcher.as_ref(),
&Default::default(), // TODO: real copy tracking
context,
)
})
})
.into_template();
Expand Down Expand Up @@ -1405,7 +1417,7 @@ fn builtin_tree_diff_methods<'repo>() -> CommitTemplateBuildMethodFnMap<'repo, T
&from_tree,
&to_tree,
matcher.as_ref(),
&Default::default(),
&Default::default(), // TODO: real copy tracking
)
})
})
Expand Down
Loading

0 comments on commit 03c0982

Please sign in to comment.