Fossil SCM

Improvements to the help text and code comments for the "describe" command.

danield 2022-03-31 09:14 trunk
Commit 52dd8a91bf2e689010ce8c0bfc2ae0e27d13abea814589d0f82c8d209dc6ad60
1 file changed +15 -12
+15 -12
--- src/info.c
+++ src/info.c
@@ -3681,27 +3681,27 @@
36813681
db_finalize(&q);
36823682
}
36833683
36843684
#if INTERFACE
36853685
/*
3686
-** Description of a checkin relative to an earlier, tagged checkin.
3686
+** Description of a check-in relative to an earlier, tagged check-in.
36873687
*/
36883688
typedef struct CommitDescr {
3689
- char *zRelTagname; /* Tag name on the relative checkin */
3689
+ char *zRelTagname; /* Tag name on the relative check-in */
36903690
int nCommitsSince; /* Number of commits since then */
3691
- char *zCommitHash; /* Hash of the described checkin */
3691
+ char *zCommitHash; /* Hash of the described check-in */
36923692
int isDirty; /* Working directory has uncommitted changes */
36933693
} CommitDescr;
36943694
#endif
36953695
36963696
/*
3697
-** Describe the checkin given by 'zName', and possibly matching 'matchGlob',
3698
-** relative to an earlier, tagged checkin. Use 'descr' for the output.
3697
+** Describe the check-in given by 'zName', and possibly matching 'matchGlob',
3698
+** relative to an earlier, tagged check-in. Use 'descr' for the output.
36993699
**
37003700
** Finds the closest ancestor (ignoring merge-ins) that has a non-propagating
37013701
** label tag and the number of steps backwards that we had to search in
3702
-** order to find that tag.
3702
+** order to find that tag. Tags applied to more than one check-in are ignored.
37033703
**
37043704
** Return values:
37053705
** 0: ok
37063706
** -1: zName does not resolve to a commit
37073707
** -2: zName resolves to more than a commit
@@ -3795,20 +3795,23 @@
37953795
**
37963796
** Usage: %fossil describe ?VERSION? ?OPTIONS?
37973797
**
37983798
** Provide a description of the given VERSION by showing a non-propagating
37993799
** tag of the youngest tagged ancestor, followed by the number of commits
3800
-** since that, and the short hash of VERSION. If VERSION and the found
3801
-** ancestor refer to the same commit, the last two components are omitted,
3802
-** unless --long is provided.
3800
+** since that, and the short hash of VERSION. Only tags applied to a single
3801
+** check-in are considered.
3802
+**
3803
+** If no VERSION is provided, describe the current checked-out version.
38033804
**
3804
-** If no VERSION is provided, describe the current checked-out version. When
3805
-** no fitting tagged ancestor is found, show only the short hash of VERSION.
3805
+** If VERSION and the found ancestor refer to the same commit, the last two
3806
+** components are omitted, unless --long is provided. When no fitting tagged
3807
+** ancestor is found, show only the short hash of VERSION.
38063808
**
38073809
** Options:
38083810
**
3809
-** --digits Display so many hex digits of the hash (default 10)
3811
+** --digits Display so many hex digits of the hash
3812
+** (default: the larger of 6 and the 'hash-digit' setting)
38103813
** -d|--dirty Show whether there are changes to be committed
38113814
** --long Always show all three components
38123815
** --match GLOB Consider only non-propagating tags matching GLOB
38133816
*/
38143817
void describe_cmd(void){
38153818
--- src/info.c
+++ src/info.c
@@ -3681,27 +3681,27 @@
3681 db_finalize(&q);
3682 }
3683
3684 #if INTERFACE
3685 /*
3686 ** Description of a checkin relative to an earlier, tagged checkin.
3687 */
3688 typedef struct CommitDescr {
3689 char *zRelTagname; /* Tag name on the relative checkin */
3690 int nCommitsSince; /* Number of commits since then */
3691 char *zCommitHash; /* Hash of the described checkin */
3692 int isDirty; /* Working directory has uncommitted changes */
3693 } CommitDescr;
3694 #endif
3695
3696 /*
3697 ** Describe the checkin given by 'zName', and possibly matching 'matchGlob',
3698 ** relative to an earlier, tagged checkin. Use 'descr' for the output.
3699 **
3700 ** Finds the closest ancestor (ignoring merge-ins) that has a non-propagating
3701 ** label tag and the number of steps backwards that we had to search in
3702 ** order to find that tag.
3703 **
3704 ** Return values:
3705 ** 0: ok
3706 ** -1: zName does not resolve to a commit
3707 ** -2: zName resolves to more than a commit
@@ -3795,20 +3795,23 @@
3795 **
3796 ** Usage: %fossil describe ?VERSION? ?OPTIONS?
3797 **
3798 ** Provide a description of the given VERSION by showing a non-propagating
3799 ** tag of the youngest tagged ancestor, followed by the number of commits
3800 ** since that, and the short hash of VERSION. If VERSION and the found
3801 ** ancestor refer to the same commit, the last two components are omitted,
3802 ** unless --long is provided.
 
3803 **
3804 ** If no VERSION is provided, describe the current checked-out version. When
3805 ** no fitting tagged ancestor is found, show only the short hash of VERSION.
 
3806 **
3807 ** Options:
3808 **
3809 ** --digits Display so many hex digits of the hash (default 10)
 
3810 ** -d|--dirty Show whether there are changes to be committed
3811 ** --long Always show all three components
3812 ** --match GLOB Consider only non-propagating tags matching GLOB
3813 */
3814 void describe_cmd(void){
3815
--- src/info.c
+++ src/info.c
@@ -3681,27 +3681,27 @@
3681 db_finalize(&q);
3682 }
3683
3684 #if INTERFACE
3685 /*
3686 ** Description of a check-in relative to an earlier, tagged check-in.
3687 */
3688 typedef struct CommitDescr {
3689 char *zRelTagname; /* Tag name on the relative check-in */
3690 int nCommitsSince; /* Number of commits since then */
3691 char *zCommitHash; /* Hash of the described check-in */
3692 int isDirty; /* Working directory has uncommitted changes */
3693 } CommitDescr;
3694 #endif
3695
3696 /*
3697 ** Describe the check-in given by 'zName', and possibly matching 'matchGlob',
3698 ** relative to an earlier, tagged check-in. Use 'descr' for the output.
3699 **
3700 ** Finds the closest ancestor (ignoring merge-ins) that has a non-propagating
3701 ** label tag and the number of steps backwards that we had to search in
3702 ** order to find that tag. Tags applied to more than one check-in are ignored.
3703 **
3704 ** Return values:
3705 ** 0: ok
3706 ** -1: zName does not resolve to a commit
3707 ** -2: zName resolves to more than a commit
@@ -3795,20 +3795,23 @@
3795 **
3796 ** Usage: %fossil describe ?VERSION? ?OPTIONS?
3797 **
3798 ** Provide a description of the given VERSION by showing a non-propagating
3799 ** tag of the youngest tagged ancestor, followed by the number of commits
3800 ** since that, and the short hash of VERSION. Only tags applied to a single
3801 ** check-in are considered.
3802 **
3803 ** If no VERSION is provided, describe the current checked-out version.
3804 **
3805 ** If VERSION and the found ancestor refer to the same commit, the last two
3806 ** components are omitted, unless --long is provided. When no fitting tagged
3807 ** ancestor is found, show only the short hash of VERSION.
3808 **
3809 ** Options:
3810 **
3811 ** --digits Display so many hex digits of the hash
3812 ** (default: the larger of 6 and the 'hash-digit' setting)
3813 ** -d|--dirty Show whether there are changes to be committed
3814 ** --long Always show all three components
3815 ** --match GLOB Consider only non-propagating tags matching GLOB
3816 */
3817 void describe_cmd(void){
3818

Keyboard Shortcuts

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