Fossil SCM

Added "git diff" delegation trick to the gitusers doc.

wyoung 2021-01-26 13:36 trunk
Commit f42b5773ed0300337d739b696bf7df1175580a1f65f5328fac6d6a0f3f71a109
1 file changed +10 -1
+10 -1
--- www/gitusers.md
+++ www/gitusers.md
@@ -711,11 +711,13 @@
711711
The graphical diffs in the Fossil web UI and `fossil diff --tk` use
712712
color to distinguish insertions, deletions, and replacements, but unlike
713713
with `git diff` when the output is to an ANSI X3.64 capable terminal,
714714
`fossil diff` does not.
715715
716
-There’s an easy way to add this feature to Fossil, though: install
716
+There are a few easy ways to add this feature to Fossil, though.
717
+
718
+One is to install
717719
[`colordiff`][cdiff], which is included in [many package systems][cdpkg],
718720
then say:
719721
720722
fossil set --global diff-command 'colordiff -wu'
721723
@@ -722,10 +724,17 @@
722724
Because this is unconditional, unlike `git diff --color=auto`, you will
723725
then have to remember to add the `-i` option to `fossil diff` commands
724726
when you want color disabled, such as when piping diff output to another
725727
command that doesn’t understand ANSI escape sequences. There’s an
726728
example of this [below](#dstat).
729
+
730
+Another way, which avoids this problem, is to say instead:
731
+
732
+ fossil set --global diff-command 'git diff --no-index'
733
+
734
+This delegates `fossil diff` to `git diff` by using the latter’s
735
+abiliity to run on files not inside any repository.
727736
728737
[cdpkg]: https://repology.org/project/colordiff/versions
729738
730739
731740
## <a id="show"></a> Showing Information About Commits
732741
--- www/gitusers.md
+++ www/gitusers.md
@@ -711,11 +711,13 @@
711 The graphical diffs in the Fossil web UI and `fossil diff --tk` use
712 color to distinguish insertions, deletions, and replacements, but unlike
713 with `git diff` when the output is to an ANSI X3.64 capable terminal,
714 `fossil diff` does not.
715
716 There’s an easy way to add this feature to Fossil, though: install
 
 
717 [`colordiff`][cdiff], which is included in [many package systems][cdpkg],
718 then say:
719
720 fossil set --global diff-command 'colordiff -wu'
721
@@ -722,10 +724,17 @@
722 Because this is unconditional, unlike `git diff --color=auto`, you will
723 then have to remember to add the `-i` option to `fossil diff` commands
724 when you want color disabled, such as when piping diff output to another
725 command that doesn’t understand ANSI escape sequences. There’s an
726 example of this [below](#dstat).
 
 
 
 
 
 
 
727
728 [cdpkg]: https://repology.org/project/colordiff/versions
729
730
731 ## <a id="show"></a> Showing Information About Commits
732
--- www/gitusers.md
+++ www/gitusers.md
@@ -711,11 +711,13 @@
711 The graphical diffs in the Fossil web UI and `fossil diff --tk` use
712 color to distinguish insertions, deletions, and replacements, but unlike
713 with `git diff` when the output is to an ANSI X3.64 capable terminal,
714 `fossil diff` does not.
715
716 There are a few easy ways to add this feature to Fossil, though.
717
718 One is to install
719 [`colordiff`][cdiff], which is included in [many package systems][cdpkg],
720 then say:
721
722 fossil set --global diff-command 'colordiff -wu'
723
@@ -722,10 +724,17 @@
724 Because this is unconditional, unlike `git diff --color=auto`, you will
725 then have to remember to add the `-i` option to `fossil diff` commands
726 when you want color disabled, such as when piping diff output to another
727 command that doesn’t understand ANSI escape sequences. There’s an
728 example of this [below](#dstat).
729
730 Another way, which avoids this problem, is to say instead:
731
732 fossil set --global diff-command 'git diff --no-index'
733
734 This delegates `fossil diff` to `git diff` by using the latter’s
735 abiliity to run on files not inside any repository.
736
737 [cdpkg]: https://repology.org/project/colordiff/versions
738
739
740 ## <a id="show"></a> Showing Information About Commits
741

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button