path: root/Documentation/diff-options.txt
diff options
authorJacob Keller <>2016-08-31 23:27:20 (GMT)
committerJunio C Hamano <>2016-09-01 01:07:09 (GMT)
commit660e113ce11840f4bc4028bff89889e6122fe89a (patch)
treee98e14ea62b3546aad402dcc01a6541de36eb26c /Documentation/diff-options.txt
parentcd48dadb8d840637f0f55b1ad0d8f50d892c767d (diff)
graph: add support for --line-prefix on all graph-aware output
Add an extension to git-diff and git-log (and any other graph-aware displayable output) such that "--line-prefix=<string>" will print the additional line-prefix on every line of output. To make this work, we have to fix a few bugs in the graph API that force graph_show_commit_msg to be used only when you have a valid graph. Additionally, we extend the default_diff_output_prefix handler to work even when no graph is enabled. This is somewhat of a hack on top of the graph API, but I think it should be acceptable here. This will be used by a future extension of submodule display which displays the submodule diff as the actual diff between the pre and post commit in the submodule project. Add some tests for both git-log and git-diff to ensure that the prefix is honored correctly. Signed-off-by: Jacob Keller <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/diff-options.txt')
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 705a873..cc4342e 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -569,5 +569,8 @@ endif::git-format-patch[]
Do not show any source or destination prefix.
+ Prepend an additional prefix to every line of output.
For more detailed explanation on these common options, see also