aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-02-08 18:26:11 +0100
committerJonas Bernoulli <jonas@bernoul.li>2025-02-08 18:26:11 +0100
commit223461b52c35b0f426c053f4c6e7e7637c4a9b73 (patch)
tree85bf47bc67c13208e89febb37d735c8bc3b59ccb /docs
parentda08c80e29d9472757f298c324e27ded2134dfb1 (diff)
magit-format-file-function: New option
Closes #5308.
Diffstat (limited to 'docs')
-rw-r--r--docs/magit.org8
-rw-r--r--docs/magit.texi8
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/magit.org b/docs/magit.org
index 4441ca1..23d5373 100644
--- a/docs/magit.org
+++ b/docs/magit.org
@@ -3476,6 +3476,14 @@ that they are available here too.
allowed here: ~--stat-width~, ~--stat-name-width~,
~--stat-graph-width~ and ~--compact-summary~. Also see [[man:git-diff]]
+- User Option: magit-format-file-function ::
+
+ This function is used to format lines representing a file. It is
+ used for file headings in diffs, in diffstats and for lists of files
+ (such as the untracked files). Depending on the caller, it receives
+ either three or five arguments; the signature has to be ~(kind file
+ face &optional status orig)~. KIND is one of ~diff~, ~stat~ and ~list~.
+
*** Revision Buffer
- User Option: magit-revision-insert-related-refs ::
diff --git a/docs/magit.texi b/docs/magit.texi
index 24f0a42..4a547d6 100644
--- a/docs/magit.texi
+++ b/docs/magit.texi
@@ -4094,6 +4094,14 @@ the git-diff(1) manpage.
@end iftex
@end defopt
+@defopt magit-format-file-function
+This function is used to format lines representing a file. It is
+used for file headings in diffs, in diffstats and for lists of files
+(such as the untracked files). Depending on the caller, it receives
+either three or five arguments; the signature has to be @code{(kind file
+ face &optional status orig)}. KIND is one of @code{diff}, @code{stat} and @code{list}.
+@end defopt
+
@anchor{Revision Buffer}
@subsection Revision Buffer