Skip to content

Commit a2df1fb

Browse files
angavrilovgitster
authored andcommitted
Documentation: New GUI configuration and command-line options.
Add information on new git-gui and gitk command-line options, configuration variables, and the encoding attribute. Signed-off-by: Alexander Gavrilov <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e1ca0de commit a2df1fb

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

Documentation/config.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,14 @@ gui.diffcontext::
796796
Specifies how many context lines should be used in calls to diff
797797
made by the linkgit:git-gui[1]. The default is "5".
798798

799+
gui.encoding::
800+
Specifies the default encoding to use for displaying of
801+
file contents in linkgit:git-gui[1] and linkgit:gitk[1].
802+
It can be overridden by setting the 'encoding' attribute
803+
for relevant files (see linkgit:gitattributes[5]).
804+
If this option is not set, the tools default to the
805+
locale encoding.
806+
799807
gui.matchtrackingbranch::
800808
Determines if new branches created with linkgit:git-gui[1] should
801809
default to tracking remote branches with matching names or
@@ -818,6 +826,22 @@ gui.spellingdictionary::
818826
the linkgit:git-gui[1]. When set to "none" spell checking is turned
819827
off.
820828

829+
gui.fastcopyblame::
830+
If true, 'git gui blame' uses '-C' instead of '-C -C' for original
831+
location detection. It makes blame significantly faster on huge
832+
repositories at the expense of less thorough copy detection.
833+
834+
gui.copyblamethreshold::
835+
Specifies the theshold to use in 'git gui blame' original location
836+
detection, measured in alphanumeric characters. See the
837+
linkgit:git-blame[1] manual for more information on copy detection.
838+
839+
gui.blamehistoryctx::
840+
Specifies the radius of history context in days to show in
841+
linkgit:gitk[1] for the selected commit, when the `Show History
842+
Context` menu item is invoked from 'git gui blame'. If this
843+
variable is set to zero, the whole history is shown.
844+
821845
help.browser::
822846
Specify the browser that will be used to display help in the
823847
'web' format. See linkgit:git-help[1].

Documentation/git-gui.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,28 @@ git gui blame v0.99.8 Makefile::
6565
example the file is read from the object database and not
6666
the working directory.
6767

68+
git gui blame --line=100 Makefile::
69+
70+
Loads annotations as described above and automatically
71+
scrolls the view to center on line '100'.
72+
6873
git gui citool::
6974

7075
Make one commit and return to the shell when it is complete.
76+
This command returns a non-zero exit code if the window was
77+
closed in any way other than by making a commit.
78+
79+
git gui citool --amend::
80+
81+
Automatically enter the 'Amend Last Commit' mode of
82+
the interface.
83+
84+
git gui citool --nocommit::
85+
86+
Behave as normal citool, but instead of making a commit
87+
simply terminate with a zero exit code. It still checks
88+
that the index does not contain any unmerged entries, so
89+
you can use it as a GUI version of linkgit:git-mergetool[1]
7190

7291
git citool::
7392

Documentation/gitattributes.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,23 @@ in the file. E.g. the string `$Format:%H$` will be replaced by the
535535
commit hash.
536536

537537

538+
Viewing files in GUI tools
539+
~~~~~~~~~~~~~~~~~~~~~~~~~~
540+
541+
`encoding`
542+
^^^^^^^^^^
543+
544+
The value of this attribute specifies the character encoding that should
545+
be used by GUI tools (e.g. linkgit:gitk[1] and linkgit:git-gui[1]) to
546+
display the contents of the relevant file. Note that due to performance
547+
considerations linkgit:gitk[1] does not use this attribute unless you
548+
manually enable per-file encodings in its options.
549+
550+
If this attribute is not set or has an invalid value, the value of the
551+
`gui.encoding` configuration variable is used instead
552+
(See linkgit:git-config[1]).
553+
554+
538555
USING ATTRIBUTE MACROS
539556
----------------------
540557

Documentation/gitk.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ frequently used options.
5656
Use this instead of explicitly specifying <revs> if the set of
5757
commits to show may vary between refreshes.
5858

59+
--select-commit=<ref>::
60+
61+
Automatically select the specified commit after loading the graph.
62+
Default behavior is equivalent to specifying '--select-commit=HEAD'.
63+
5964
<revs>::
6065

6166
Limit the revisions to show. This can be either a single revision

0 commit comments

Comments
 (0)