doc: fix the max number of git show-branches shown
PATCH 1/1 doc: fix the max number of git show-branches shown
From: wonda-tea-coffee <[email protected]>
Contrary to the number listed in the current document, only 26 are actually shown.
---
doc: fix the max number of git show-branches shown
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1757%2Fwonda-tea-coffee%2Fupdate-git-show-branch-description-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1757/wonda-tea-coffee/update-git-show-branch-description-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1757
Documentation/git-show-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-show-branch.txt +1 -1
@@ -22,7 +22,7 @@ Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually. -It cannot show more than 29 branches and commits at a time. +It cannot show more than 26 branches and commits at a time. It uses `showbranch.default` multi-valued configuration items if no <rev> or <glob> is given on the command line.
base-commit: 06e570c0dfb2a2deb64d217db78e2ec21672f558
Signature · 1 line
gitgitgadget
Quoted 4 lines · wonda-tea-coffee via GitGitGadget
From: wonda-tea-coffee <[email protected]>
Contrary to the number listed in the current document, only 26 are actually shown.
The commit message would be a good place to explain how we know "26" is the right number. ;)
It looks like this is computed at build-time based on FLAG_BITS:
#define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) /* should not exceed bits_per_int - REV_SHIFT */
That's defined in object.h. Looking at "git log -GFLAG_BITS object.h", it seems it was 27, then 29, and now 28. So I'm not sure how it was ever 29, but 26 makes sense now.
It is unfortunate that it _could_ change again without us realizing the documentation is now stale. But I don't think it's something we'd touch very often, so this is probably OK in practice (and as the TODO above those lines says, ultimately this should use a commit-slab to handle an arbitrary number of refs).
Quoted 1 line
Signed-off-by wonda-tea-coffee <[email protected]>
We generally want a real name here, since this is certifying that you agree to the DCO. See:
https://git-scm.com/docs/SubmittingPatches#sign-off
-Peff
Quoted 8 lines · Jeff King
It looks like this is computed at build-time based on
FLAG_BITS:#define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) /* should not exceed bits_per_int - REV_SHIFT */That's defined in
object.h. Looking at "git log -GFLAG_BITSobject.h", it seems it was 27, then 29, and now 28. So I'm not sure how it was ever 29, but 26 makes sense now.
Originally it was bits-per-word minus REV_SHIFT -- back then we didn't even have FLAG_BITS.
Quoted 5 lines
It is unfortunate that it _could_ change again without us realizing the documentation is now stale. But I don't think it's something we'd touch very often, so this is probably OK in practice (and as the TODO above those lines says, ultimately this should use a commit-slab to handle an arbitrary number of refs).
Yup, I was hoping I can craft a response that tricks somebody (preferrably those who are not too experienced, as it should be too easy for some of the experienced ones) into tackling that TODO item, but you responded before I did ;-).
Quoted 6 lines
Quoted 1 line
Signed-off-by wonda-tea-coffee <[email protected]>We generally want a real name here, since this is certifying that you agree to the DCO. See:
Another rule is that the name used to sign-off and the name of the author of the patch on "From: " line must match.
Thanks. I was getting tired of the only person to point it out to new contributors.
PATCH v2 1/1 doc: fix the max number of git show-branches shown
In reply to wonda-tea-coffee via GitGitGadgetFrom: wonda-tea-coffee <[email protected]>
The number to be displayed is calculated by the
following defined in object.h.
``` #define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) ```
FLAG_BITS is currently 28, so 26 is the correct
number.
---
doc: fix the max number of git show-branches shown
Changes since v1:
* Explain in the commit message why "26" is the correct number.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1757%2Fwonda-tea-coffee%2Fupdate-git-show-branch-description-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1757/wonda-tea-coffee/update-git-show-branch-description-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1757
Range-diff vs v1:
1: b809d610a36 ! 1: 6fc335807d2 doc: fix the max number of git show-branches shown
@@ Metadata
## Commit message ##
doc: fix the max number of git show-branches shown
- Contrary to the number listed in the current document,
- only 26 are actually shown.
+ The number to be displayed is calculated by the
+ following defined in object.h.
- Signed-off-by: wonda-tea-coffee <[email protected]>
+ ```
+ #define REV_SHIFT 2
+ #define MAX_REVS (FLAG_BITS - REV_SHIFT)
+ ```
+
+ FLAG_BITS is currently 28, so 26 is the correct
+ number.
+
+ Signed-off-by: Rikita Ishikawa <[email protected]>
## Documentation/git-show-branch.txt ##
@@ Documentation/git-show-branch.txt: Shows the commit ancestry graph starting from the commits named
Documentation/git-show-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-show-branch.txt +1 -1
@@ -22,7 +22,7 @@ Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually. -It cannot show more than 29 branches and commits at a time. +It cannot show more than 26 branches and commits at a time. It uses `showbranch.default` multi-valued configuration items if no <rev> or <glob> is given on the command line.
base-commit: 06e570c0dfb2a2deb64d217db78e2ec21672f558
Signature · 1 line
gitgitgadget
Quoted 10 lines · wonda-tea-coffee via GitGitGadget
From: wonda-tea-coffee <[email protected]>
The number to be displayed is calculated by the
following defined inobject.h.``` #define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) ```
Quoted 4 lines
FLAG_BITSis currently 28, so 26 is the correct
number.Signed-off-by Rikita Ishikawa <[email protected]>
Thanks, this version looks good to me. As Junio noted, we'd generally want the "From" to match the Sign-off (where the former is coming from the author name in the commit). You can either re-send, or if you give the OK, he might just fix it up as he applies.
-Peff
PATCH v3 1/1 doc: fix the max number of git show-branches shown
In reply to wonda-tea-coffee via GitGitGadgetFrom: wonda-tea-coffee <[email protected]>
The number to be displayed is calculated by the
following defined in object.h.
``` #define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) ```
FLAG_BITS is currently 28, so 26 is the correct
number.
---
doc: fix the max number of git show-branches shown
Changes since v1:
* Explain in the commit message why "26" is the correct number.
* No change (to rename GitHub and re-send).
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1757%2Fwonda-tea-coffee%2Fupdate-git-show-branch-description-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1757/wonda-tea-coffee/update-git-show-branch-description-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/1757
Range-diff vs v2:
1: 6fc335807d2 = 1: c1e236d843c doc: fix the max number of git show-branches shown
Documentation/git-show-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-show-branch.txt +1 -1
@@ -22,7 +22,7 @@ Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually. -It cannot show more than 29 branches and commits at a time. +It cannot show more than 26 branches and commits at a time. It uses `showbranch.default` multi-valued configuration items if no <rev> or <glob> is given on the command line.
base-commit: 06e570c0dfb2a2deb64d217db78e2ec21672f558
Signature · 1 line
gitgitgadget
PATCH v4 1/1 doc: fix the max number of git show-branches shown
From: Rikita Ishikawa <[email protected]>
The number to be displayed is calculated by the
following defined in object.h.
``` #define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) ```
FLAG_BITS is currently 28, so 26 is the correct
number.
---
doc: fix the max number of git show-branches shown
Changes since v1:
* Explain in the commit message why "26" is the correct number.
* No change (to rename GitHub and re-send).
* Change the author of the commit.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1757%2Fwonda-tea-coffee%2Fupdate-git-show-branch-description-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1757/wonda-tea-coffee/update-git-show-branch-description-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/1757
Range-diff vs v3:
1: c1e236d843c ! 1: 76ab2f17015 doc: fix the max number of git show-branches shown
@@
## Metadata ##
-Author: wonda-tea-coffee <[email protected]>
+Author: Rikita Ishikawa <[email protected]>
## Commit message ##
doc: fix the max number of git show-branches shown
Documentation/git-show-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-show-branch.txt +1 -1
@@ -22,7 +22,7 @@ Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually. -It cannot show more than 29 branches and commits at a time. +It cannot show more than 26 branches and commits at a time. It uses `showbranch.default` multi-valued configuration items if no <rev> or <glob> is given on the command line.
base-commit: 06e570c0dfb2a2deb64d217db78e2ec21672f558
Signature · 1 line
gitgitgadget
Sorry for sending in consecutive messages.
I changed From:.
Thank you for following us often.
2024年7月7日(日) 11:28 Rikita Ishikawa via GitGitGadget <[email protected]>:
Quoted 60 lines
From: Rikita Ishikawa <[email protected]>
The number to be displayed is calculated by the
following defined inobject.h.``` #define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) ```
FLAG_BITSis currently 28, so 26 is the correct
number.Signed-off-by Rikita Ishikawa <[email protected]>---
doc: fix the max number of git show-branches shownChanges since v1:
* Explain in the commit message why "26" is the correct number.
* No change (to rename GitHub and re-send).
* Change the author of the commit.Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1757%2Fwonda-tea-coffee%2Fupdate-git-show-branch-description-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1757/wonda-tea-coffee/update-git-show-branch-description-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/1757Range-diff vs v3:
1:
c1e236d843c! 1:76ab2f17015doc: fix the max number of git show-branches shown
@@
## Metadata ##
-Author: wonda-tea-coffee <[email protected]>
+Author: Rikita Ishikawa <[email protected]>## Commit message ##
doc: fix the max number of git show-branches shownDocumentation/git-show-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/git-show-branch.txt +1
-1@@ -22,7 +22,7 @@ Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually. -It cannot show more than 29 branches and commits at a time. +It cannot show more than 26 branches and commits at a time. It uses `showbranch.default` multi-valued configuration items if no <rev> or <glob> is given on the command line.base-commit:
06e570c0dfb2a2deb64d217db78e2ec21672f558--
gitgitgadget
Quoted 10 lines · Rikita Ishikawa via GitGitGadget
From: Rikita Ishikawa <[email protected]>
The number to be displayed is calculated by the
following defined inobject.h.``` #define REV_SHIFT 2 #define MAX_REVS (FLAG_BITS - REV_SHIFT) ```
Quoted 5 lines
FLAG_BITSis currently 28, so 26 is the correct
number.Signed-off-by Rikita Ishikawa <[email protected]>---
Thanks, this version looks pretty good to me.
One minor nit: commit messages are not actually markdown (even when rendered on GitHub), so your ``` block delimiters are a bit unusual. We'd usually just rely on the indentation and blank lines to show the structure.
-Peff
Thanks for the feedback.
I will fix it.
PATCH v5 1/1 doc: fix the max number of git show-branches shown
In reply to Rikita Ishikawa via GitGitGadgetFrom: Rikita Ishikawa <[email protected]>
The number to be displayed is calculated by the
following defined in object.h.
#define REV_SHIFT 2
#define MAX_REVS (FLAG_BITS - REV_SHIFT)FLAG_BITS is currently 28, so 26 is the correct
number.
---
doc: fix the max number of git show-branches shown
Changes since v1:
* Explain in the commit message why "26" is the correct number.
* No change (to rename GitHub and re-send).
* Change the author of the commit.
* Fixed code block in commit message.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1757%2Fwonda-tea-coffee%2Fupdate-git-show-branch-description-v5
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1757/wonda-tea-coffee/update-git-show-branch-description-v5
Pull-Request: https://github.com/gitgitgadget/git/pull/1757
Range-diff vs v4:
1: 76ab2f17015 ! 1: 7c0af41794f doc: fix the max number of git show-branches shown
@@ Commit message
The number to be displayed is calculated by the
following defined in object.h.
- ```
- #define REV_SHIFT 2
- #define MAX_REVS (FLAG_BITS - REV_SHIFT)
- ```
+ #define REV_SHIFT 2
+ #define MAX_REVS (FLAG_BITS - REV_SHIFT)
FLAG_BITS is currently 28, so 26 is the correct number.
Documentation/git-show-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-show-branch.txt +1 -1
@@ -22,7 +22,7 @@ Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually. -It cannot show more than 29 branches and commits at a time. +It cannot show more than 26 branches and commits at a time. It uses `showbranch.default` multi-valued configuration items if no <rev> or <glob> is given on the command line.
base-commit: 06e570c0dfb2a2deb64d217db78e2ec21672f558
Signature · 1 line
gitgitgadget
Quoted 6 lines · Rikita Ishikawa via GitGitGadget
From: Rikita Ishikawa <[email protected]>
...FLAG_BITSis currently 28, so 26 is the correct number.Signed-off-by Rikita Ishikawa <[email protected]>
Looking good. Thanks. Will queue.