Fossil SCM

Added the "Showing Information About Commits" section to the gitusers doc.

wyoung 2020-11-01 20:59 trunk
Commit 9cf1a1664e9f9d4694ffaf376b1345e7e8032b9b5df8367af31763371a2ff7f6
1 file changed +69
--- www/gitusers.md
+++ www/gitusers.md
@@ -463,10 +463,79 @@
463463
common objections as well. Chances are not good that you are going to
464464
come up with a new objection that we haven’t already considered and
465465
addressed there.
466466
467467
[3]: ./rebaseharm.md
468
+
469
+
470
+## <a id="show"></a> Showing Information About Commits
471
+
472
+While there is no direct equivalent to Git’s “`show`” command, similar
473
+functionality may be present in Fossil under other commands:
474
+
475
+
476
+#### <a name="patch"></a> Show A Patch For A Commit
477
+
478
+ git show -p COMMIT_ID
479
+
480
+…gives much the same output as
481
+
482
+ fossil diff --checkin COMMIT_ID
483
+
484
+…only without the patch email header. Git comes out of the [LKML] world,
485
+where emailing a patch is a normal thing to do. Fossil is designed for
486
+[more cohesive teams][devorg] where such drive-by patches are rarer.
487
+
488
+You can use any of [Fossil’s special check-in names][scin] in place of
489
+the `COMMIT_ID` in this and later examples. Fossil docs usually say
490
+“`VERSION`” or “`NAME`” where this is allowed, since the version string
491
+or name might not refer to a commit ID, but instead to a forum post, a
492
+wiki document, etc. The following command answers the question “What did
493
+I just commit?”
494
+
495
+ fossil diff --checkin tip
496
+
497
+[devorg]: ./fossil-v-git.wiki#devorg
498
+[LKML]: https://lkml.org/
499
+
500
+
501
+#### <a name="cmsg"></a> Show A Specific Commit Message
502
+
503
+ git show -s COMMIT_ID
504
+
505
+
506
+…is
507
+
508
+ fossil time -n 1 COMMIT_ID
509
+
510
+…or with a shorter, more obvious command, with more verbose output:
511
+
512
+ fossil info COMMIT_ID
513
+
514
+The `fossil info` command isn’t otherwise a good equivalent to
515
+`git show`. It just overlaps its functionality in some areas. Much of
516
+what’s missing is present in the corresponding [`/info` web
517
+view][infow], though.
518
+
519
+
520
+#### <a name="dstat"></a> Diff Statistics
521
+
522
+Fossil doesn’t have an internal equivalent to commands like
523
+`git show --stat`, but it’s easily remedied by using
524
+[the widely-available `diffstat` tool][dst]:
525
+
526
+ fossil diff -i --from 2020-04-01 | diffstat
527
+
528
+We gave the `-i` flag here to force Fossil to use its internal diff
529
+implementation, bypassing [your local `diff-command` setting][dcset].
530
+If you had that set to [`colordiff`][cdiff], for example, its output
531
+would confuse `diffstat`.
532
+
533
+[cdiff]: https://www.colordiff.org/
534
+[dcset]: https://fossil-scm.org/home/help?cmd=diff-command
535
+[dst]: https://invisible-island.net/diffstat/diffstat.html
536
+
468537
469538
470539
<a id="btnames"></a>
471540
## Branch and Tag Names
472541
473542
--- www/gitusers.md
+++ www/gitusers.md
@@ -463,10 +463,79 @@
463 common objections as well. Chances are not good that you are going to
464 come up with a new objection that we haven’t already considered and
465 addressed there.
466
467 [3]: ./rebaseharm.md
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
469
470 <a id="btnames"></a>
471 ## Branch and Tag Names
472
473
--- www/gitusers.md
+++ www/gitusers.md
@@ -463,10 +463,79 @@
463 common objections as well. Chances are not good that you are going to
464 come up with a new objection that we haven’t already considered and
465 addressed there.
466
467 [3]: ./rebaseharm.md
468
469
470 ## <a id="show"></a> Showing Information About Commits
471
472 While there is no direct equivalent to Git’s “`show`” command, similar
473 functionality may be present in Fossil under other commands:
474
475
476 #### <a name="patch"></a> Show A Patch For A Commit
477
478 git show -p COMMIT_ID
479
480 …gives much the same output as
481
482 fossil diff --checkin COMMIT_ID
483
484 …only without the patch email header. Git comes out of the [LKML] world,
485 where emailing a patch is a normal thing to do. Fossil is designed for
486 [more cohesive teams][devorg] where such drive-by patches are rarer.
487
488 You can use any of [Fossil’s special check-in names][scin] in place of
489 the `COMMIT_ID` in this and later examples. Fossil docs usually say
490 “`VERSION`” or “`NAME`” where this is allowed, since the version string
491 or name might not refer to a commit ID, but instead to a forum post, a
492 wiki document, etc. The following command answers the question “What did
493 I just commit?”
494
495 fossil diff --checkin tip
496
497 [devorg]: ./fossil-v-git.wiki#devorg
498 [LKML]: https://lkml.org/
499
500
501 #### <a name="cmsg"></a> Show A Specific Commit Message
502
503 git show -s COMMIT_ID
504
505
506 …is
507
508 fossil time -n 1 COMMIT_ID
509
510 …or with a shorter, more obvious command, with more verbose output:
511
512 fossil info COMMIT_ID
513
514 The `fossil info` command isn’t otherwise a good equivalent to
515 `git show`. It just overlaps its functionality in some areas. Much of
516 what’s missing is present in the corresponding [`/info` web
517 view][infow], though.
518
519
520 #### <a name="dstat"></a> Diff Statistics
521
522 Fossil doesn’t have an internal equivalent to commands like
523 `git show --stat`, but it’s easily remedied by using
524 [the widely-available `diffstat` tool][dst]:
525
526 fossil diff -i --from 2020-04-01 | diffstat
527
528 We gave the `-i` flag here to force Fossil to use its internal diff
529 implementation, bypassing [your local `diff-command` setting][dcset].
530 If you had that set to [`colordiff`][cdiff], for example, its output
531 would confuse `diffstat`.
532
533 [cdiff]: https://www.colordiff.org/
534 [dcset]: https://fossil-scm.org/home/help?cmd=diff-command
535 [dst]: https://invisible-island.net/diffstat/diffstat.html
536
537
538
539 <a id="btnames"></a>
540 ## Branch and Tag Names
541
542

Keyboard Shortcuts

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