Fossil SCM
Added "git diff" delegation trick to the gitusers doc.
Commit
f42b5773ed0300337d739b696bf7df1175580a1f65f5328fac6d6a0f3f71a109
Parent
48a4be5058d8979…
1 file changed
+10
-1
+10
-1
| --- www/gitusers.md | ||
| +++ www/gitusers.md | ||
| @@ -711,11 +711,13 @@ | ||
| 711 | 711 | The graphical diffs in the Fossil web UI and `fossil diff --tk` use |
| 712 | 712 | color to distinguish insertions, deletions, and replacements, but unlike |
| 713 | 713 | with `git diff` when the output is to an ANSI X3.64 capable terminal, |
| 714 | 714 | `fossil diff` does not. |
| 715 | 715 | |
| 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 | |
| 717 | 719 | [`colordiff`][cdiff], which is included in [many package systems][cdpkg], |
| 718 | 720 | then say: |
| 719 | 721 | |
| 720 | 722 | fossil set --global diff-command 'colordiff -wu' |
| 721 | 723 | |
| @@ -722,10 +724,17 @@ | ||
| 722 | 724 | Because this is unconditional, unlike `git diff --color=auto`, you will |
| 723 | 725 | then have to remember to add the `-i` option to `fossil diff` commands |
| 724 | 726 | when you want color disabled, such as when piping diff output to another |
| 725 | 727 | command that doesn’t understand ANSI escape sequences. There’s an |
| 726 | 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. | |
| 727 | 736 | |
| 728 | 737 | [cdpkg]: https://repology.org/project/colordiff/versions |
| 729 | 738 | |
| 730 | 739 | |
| 731 | 740 | ## <a id="show"></a> Showing Information About Commits |
| 732 | 741 |
| --- 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 |