git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/8] scalar: integrate into core Git

From
Victoria Dye <vdye@github.com>
Date
Aug 31, 2022, 18:42 UTC
Message-ID
<85ad26ba-8461-fdda-fb26-c99080dfa10d@github.com>
In-Reply-To
<220831.86y1v48h2x.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 41 quoted lines
> 
> On Wed, Aug 31 2022, Victoria Dye via GitGitGadget wrote:
> 
>> This series completes the initial implementation of the Scalar command as a
>> core component of Git. For readers new to the topic of Scalar, the
>> roadmap/design doc [1] provides some background information including how
>> the project started & evolved, as well as its current intent & high-level
>> design.
>>
>> [...]
>>
>> Prior series
>> ============
>>
>>  * Add 'scalar' command in 'contrib/':
>>    https://lore.kernel.org/git/pull.1005.v10.git.1638538470.gitgitgadget@gmail.com/
>>  * Introduce 'scalar diagnose':
>>    https://lore.kernel.org/git/pull.1128.v6.git.1653145696.gitgitgadget@gmail.com/
>>  * Add '-c/-C' compatibility:
>>    https://lore.kernel.org/git/pull.1130.v2.git.1643380317358.gitgitgadget@gmail.com/
>>  * [DROPPED] Integrate Scalar into CI builds:
>>    https://lore.kernel.org/git/pull.1129.git.1654160735.gitgitgadget@gmail.com/
>>  * Document Scalar's role in Git & plan remaining work:
>>    https://lore.kernel.org/git/pull.1275.v2.git.1657584367.gitgitgadget@gmail.com/
>>  * Generalize 'scalar diagnose' into 'git diagnose' builtin & 'git bugreport
>>    --diagnose':
>>    https://lore.kernel.org/git/pull.1310.v4.git.1660335019.gitgitgadget@gmail.com/
>>  * Add FSMonitor support to Scalar, refactor enlistment search:
>>    https://lore.kernel.org/git/pull.1324.v3.git.1660858853.gitgitgadget@gmail.com/
>>
>> Thanks!
>>
>>  * Victoria
> 
> I'm happy to see this finally coming. I can say I've thoroughly reviewed
> it & tested it for the better part of a year now. Since most of it is
> the same or functionally the same as previous patches I sent at [1] and
> [2]. It's odd not to see any mention of that here:
> 
> 	1. https://lore.kernel.org/git/cover-v2-0.1-00000000000-20220623T100554Z-avarab@gmail.com/
> 	2. https://lore.kernel.org/git/patch-1.1-86fb8d56307-20211028T185016Z-avarab@gmail.com/

For what it's worth, the lack of mention wasn't meant as a snub. I intentionally wrote this series (with the exception of patches 3 & 4) in a vacuum and avoided using any prior approaches as a reference. In this case, that includes the series you linked, the 'microsoft/git' implementation with 'INCLUDE_SCALAR' [1], and Dscho's dropped CI integration [2].

Like updating the docs & roadmap, my goal was to start "fresh" and keep myself free of any prior discussions/assumptions about the role/purpose of Scalar that may no longer apply to my approach. Although there's something to be said for learning from prior work, I preferred combing through the code to fully understand the *existing* architecture, then using that understanding to figure out where Scalar best fits in. Then, of course, I would iterate on and revise that design based on review comments. :)

[1] https://github.com/microsoft/git/commit/4f553e0027190484899afba955c7cd3f1de77532 [2] https://lore.kernel.org/git/pull.1129.git.1654160735.gitgitgadget@gmail.com/

Show 10 quoted lines
> 
> In any case. I applied this & a rebased version I've kept of [1]
> locally, and I'll be commenting below on the diff between the two, which
> I produced with:
> 
> 	git diff --stat -p avar/scalar-move-build-from-contrib-3 HEAD -- ':!t/t9211-scalar-clone.sh' ':!Documentation/technical/scalar.txt' ':!t/perf/'
> 
> I.e. you can get my version at
> http://github.com/avar/git/tree/avar/scalar-move-build-from-contrib-3 if
> you're interested, and I omitted the changes to paths unique to yours:

For the sake of readability/saving space, I cut out parts of the diff you noted as "ok" or otherwise didn't seem to need comment (like nits). If I neglected to comment on something you'd like me to respond to, though, please let me know!

Show 18 quoted lines
> 	 
> 	diff --git a/Documentation/scalar.txt b/Documentation/scalar.txt
> 	index f33436c7f65..505a1cea0fd 100644
> 	--- a/Documentation/scalar.txt
> 	+++ b/Documentation/scalar.txt
> 	@@ -163,4 +163,4 @@ linkgit:git-clone[1], linkgit:git-maintenance[1].
> 	 
> 	 GIT
> 	 ---
> 	-Part of the linkgit:git[1] suite
> 	+Associated with the linkgit:git[1] suite
> 
> You just kept this, but it really should be the former. The target
> audience of this bit of the documentation is some sysadmin that's
> wondering what this "scalar" thing is, and does "man scalar".
> 
> Let's not be cute, we're shipping it as part of git, it's not
> "associated" anymore, it's part of the git suite.

I originally chose to leave the "associated" to distinguish it from the builtins invoked with 'git <command>' (since 'scalar' is invoked directly). However, given that every single other "GIT" section in the docs (including other directly-invoked commands like 'gitk') says "Part of the linkgit:git[1] suite", it should probably be changed here as well.

Show 7 quoted lines
> 	 
> 	+SCALAR_OBJS += scalar.o
> 	+.PHONY: scalar-objs
> 	+scalar-objs: $(SCALAR_OBJS)
> 
> This part looks missing from yours. I.e. we do this with the rest of our
> "objects", just gravy of course...

This hunk is from my series, I believe it's missing from yours (unless I missed it elsewhere in the diff). It's also mentioned explicitly in the commit message of patch 2 [3].

[3] https://lore.kernel.org/git/4d69e5eaccb8873eece666a3d2bb2b22abdde7ea.1661961746.git.gitgitgadget@gmail.com/
Show 37 quoted lines
> 
> 	@@ -3536,6 +3514,7 @@ ALL_COMMANDS += git-citool
> 	 ALL_COMMANDS += git-gui
> 	 ALL_COMMANDS += gitk
> 	 ALL_COMMANDS += gitweb
> 	+ALL_COMMANDS += scalar
> 	 
> 	 .PHONY: check-docs
> 	 check-docs::
> 	@@ -3571,7 +3550,7 @@ check-docs::
> 	 		    -e 's/\.txt//'; \
> 	 	) | while read how cmd; \
> 	 	do \
> 	-		case " $(patsubst %$X,%,$(ALL_COMMANDS) $(BUILT_INS) $(EXCLUDED_PROGRAMS) scalar) " in \
> 	+		case " $(patsubst %$X,%,$(ALL_COMMANDS) $(BUILT_INS) $(EXCLUDED_PROGRAMS)) " in \
> 	 		*" $$cmd "*)	;; \
> 	 		*) echo "removed but $$how: $$cmd" ;; \
> 	 		esac; \
> 	diff --git a/builtin/help.c b/builtin/help.c
> 	index 09ac4289f13..6f2796f211e 100644
> 	--- a/builtin/help.c
> 	+++ b/builtin/help.c
> 	@@ -440,6 +440,8 @@ static const char *cmd_to_page(const char *git_cmd)
> 	 		return git_cmd;
> 	 	else if (is_git_command(git_cmd))
> 	 		return xstrfmt("git-%s", git_cmd);
> 	+	else if (!strcmp("scalar", git_cmd))
> 	+		return xstrdup(git_cmd);
> 	 	else
> 	 		return xstrfmt("git%s", git_cmd);
> 	 }
> 
> Works, but I wonder if 3/8 here in your series is what we really want,
> i.e. isn't the point of "git" to be a holistic thing for git, and for
> "scalar" to be set apart from that?
> 
> But OTOH much of the docs would need to cross-link anyway...

Like you noted earlier, Scalar is *part of* the Git suite, despite being invoked with 'scalar' (rather than the 'git' executable). Having 'git help scalar' work the same way as, e.g., 'git help gitk' is, to me, a sensible approach both from a philosophical "what is Scalar?" perspective and a user experience/ease-of-access perspective.

Show 20 quoted lines
> 
> 	diff --git a/command-list.txt b/command-list.txt
> 	index 27bd54af49c..f96bdabd7d9 100644
> 	--- a/command-list.txt
> 	+++ b/command-list.txt
> 	@@ -16,7 +16,6 @@
> 	 #   synchingrepositories
> 	 #   synchelpers
> 	 #   purehelpers
> 	-#   optionalcontrib
> 	 #
> 	 # The type names are self explanatory. But if you want to see what
> 	 # command belongs to what group to get a better picture, have a look
> 	@@ -236,4 +235,3 @@ gittutorial                             guide
> 	 gittutorial-2                           guide
> 	 gitweb                                  ancillaryinterrogators
> 	 gitworkflows                            guide
> 	-scalar                                  optionalcontrib
> 
> You don't have it in command-list at all, shouldn't you?

I missed that part of the docs, but I agree that it should be in the command-list. Thanks for pointing this out!

> 
> Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Johannes Schindelin
Message 57 of 70 in “scalar: integrate into core Git”
  1. 0/8 scalar: integrate into core GitVictoria Dye via GitGitGadget, Aug 31, 2022
  2. 1/8 scalar: fix command documentation section headerVictoria Dye via GitGitGadget, Aug 31, 2022
  3. 3/8 git help: special-case `scalar`Johannes Schindelin via GitGitGadget, Aug 31, 2022
  4. 2/8 scalar: include in standard Git build & installationVictoria Dye via GitGitGadget, Aug 31, 2022
  5. Johannes SchindelinSep 1, 2022
  6. 0/5 Makefile: split up $(test_bindir_programs)Ævar Arnfjörð Bjarmason, Sep 1, 2022
  7. 1/5 Makefile: factor sed-powered '#!/bin/sh' munging into a variableÆvar Arnfjörð Bjarmason, Sep 1, 2022
  8. 2/5 Makefile: define "TEST_{PROGRAM,OBJS}" variables earlierÆvar Arnfjörð Bjarmason, Sep 1, 2022
  9. 3/5 Makefile: simplify $(test_bindir_programs) rule by splitting it upÆvar Arnfjörð Bjarmason, Sep 1, 2022
  10. 5/5 Makefile: fix "make clean && make bin-wrappers/$NAME" dependenciesÆvar Arnfjörð Bjarmason, Sep 1, 2022
  11. 4/5 Makefile: define bin-wrappers/% rules with a templateÆvar Arnfjörð Bjarmason, Sep 1, 2022
  12. Derrick StoleeSep 1, 2022
  13. Johannes SchindelinSep 2, 2022
  14. 0/3 Makefile: fix issues with bin-wrappers/% ruleÆvar Arnfjörð Bjarmason, Oct 26, 2022
  15. 1/3 Makefile: factor sed-powered '#!/bin/sh' munging into a variableÆvar Arnfjörð Bjarmason, Oct 26, 2022
  16. Junio C HamanoOct 26, 2022
  17. 3/3 Makefile: simplify $(test_bindir_programs) rule by splitting it upÆvar Arnfjörð Bjarmason, Oct 26, 2022
  18. Junio C HamanoOct 26, 2022
  19. Ævar Arnfjörð BjarmasonOct 26, 2022
  20. Junio C HamanoOct 26, 2022
  21. Ævar Arnfjörð BjarmasonOct 26, 2022
  22. 2/3 Makefile: define "TEST_{PROGRAM,OBJS}" variables earlierÆvar Arnfjörð Bjarmason, Oct 26, 2022
  23. Junio C HamanoOct 26, 2022
  24. Ævar Arnfjörð BjarmasonOct 26, 2022
  25. Junio C HamanoOct 26, 2022
  26. Jeff KingOct 28, 2022
  27. Ævar Arnfjörð BjarmasonOct 28, 2022
  28. 0/4 Makefile: untangle bin-wrappers/% rule complexityÆvar Arnfjörð Bjarmason, Oct 31, 2022
  29. 1/4 Makefile: factor sed-powered '#!/bin/sh' munging into a variableÆvar Arnfjörð Bjarmason, Oct 31, 2022
  30. 3/4 Makefile: rename "test_bindir_programs" variable, pre-declareÆvar Arnfjörð Bjarmason, Oct 31, 2022
  31. 2/4 Makefile: define "TEST_{PROGRAM,OBJS}" variables earlierÆvar Arnfjörð Bjarmason, Oct 31, 2022
  32. 4/4 Makefile: simplify $(test_bindir_programs) rule by splitting it upÆvar Arnfjörð Bjarmason, Oct 31, 2022
  33. Taylor BlauOct 31, 2022
  34. Ævar Arnfjörð BjarmasonNov 1, 2022
  35. 4/8 scalar: implement the `help` subcommandJohannes Schindelin via GitGitGadget, Aug 31, 2022
  36. Ævar Arnfjörð BjarmasonAug 31, 2022
  37. Victoria DyeSep 1, 2022
  38. Johannes SchindelinSep 1, 2022
  39. Johannes SchindelinSep 1, 2022
  40. 5/8 scalar-clone: add test coverageVictoria Dye via GitGitGadget, Aug 31, 2022
  41. Johannes SchindelinSep 1, 2022
  42. Victoria DyeSep 1, 2022
  43. Johannes SchindelinSep 2, 2022
  44. Junio C HamanoSep 2, 2022
  45. 7/8 t/perf: add 'GIT_PERF_USE_SCALAR' run optionVictoria Dye via GitGitGadget, Aug 31, 2022
  46. Johannes SchindelinSep 1, 2022
  47. Victoria DyeSep 2, 2022
  48. Johannes SchindelinSep 2, 2022
  49. 6/8 t/perf: add Scalar performance testsVictoria Dye via GitGitGadget, Aug 31, 2022
  50. Johannes SchindelinSep 1, 2022
  51. Victoria DyeSep 1, 2022
  52. Victoria DyeSep 1, 2022
  53. Johannes SchindelinSep 2, 2022
  54. Junio C HamanoSep 1, 2022
  55. 8/8 Documentation/technical: include Scalar technical docVictoria Dye via GitGitGadget, Aug 31, 2022
  56. Ævar Arnfjörð BjarmasonAug 31, 2022
  57. Victoria DyeAug 31, 2022
  58. Johannes SchindelinSep 1, 2022
  59. 0/9 scalar: integrate into core GitVictoria Dye via GitGitGadget, Sep 2, 2022
  60. 4/9 scalar: implement the `help` subcommandJohannes Schindelin via GitGitGadget, Sep 2, 2022
  61. 3/9 git help: special-case `scalar`Johannes Schindelin via GitGitGadget, Sep 2, 2022
  62. 1/9 scalar: fix command documentation section headerVictoria Dye via GitGitGadget, Sep 2, 2022
  63. 7/9 t/perf: add Scalar performance testsVictoria Dye via GitGitGadget, Sep 2, 2022
  64. 6/9 scalar-clone: add test coverageVictoria Dye via GitGitGadget, Sep 2, 2022
  65. 2/9 scalar: include in standard Git build & installationVictoria Dye via GitGitGadget, Sep 2, 2022
  66. 8/9 t/perf: add 'GIT_PERF_USE_SCALAR' run optionVictoria Dye via GitGitGadget, Sep 2, 2022
  67. 9/9 Documentation/technical: include Scalar technical docVictoria Dye via GitGitGadget, Sep 2, 2022
  68. 5/9 scalar: add to 'git help -a' command listVictoria Dye via GitGitGadget, Sep 2, 2022
  69. Johannes SchindelinSep 5, 2022
  70. Derrick StoleeSep 8, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.