From patchwork Wed Aug 31 16:02:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victoria Dye X-Patchwork-Id: 12961010 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57370ECAAD1 for ; Wed, 31 Aug 2022 16:03:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbiHaQDH (ORCPT ); Wed, 31 Aug 2022 12:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231899AbiHaQCn (ORCPT ); Wed, 31 Aug 2022 12:02:43 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 290C5B6D0B for ; Wed, 31 Aug 2022 09:02:35 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id n17so18889076wrm.4 for ; Wed, 31 Aug 2022 09:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=+sA02ZlHH203KZ20PCvybxVgbV54HnngBsC+EL6Obxw=; b=PFaoU0Wqy4dcniH/IS+H7geKYZuQTOoFoXVxmOP6iziHeKEUWJhQYlXBtb9XKFstxZ btCasodI7Tk44/S2TvLuoWTXC/nj/Od5AWOE/CD/nvf6LXXy1fEqpWAuh5vxWjDZh4TK KEvk/7bIV4VzbaYxmGcK58y92eLncZQZzEF8k2Qa0boXo7bR+xDc613dA3H0Zdj4uRUA FMgIqTX6IC164jWrApnP3oZ9Zo0GV6K41dVoXp7UYO7AZcF4Uez8IcDklwdOxFb9Nv+s 8sixvcscs2blqctLE/kS661kudjMYouD2jfZ/piB+gQZYDqYllLn2l/6OGqMJujYUhv/ 95kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=+sA02ZlHH203KZ20PCvybxVgbV54HnngBsC+EL6Obxw=; b=1lOW/gGxnKMV2LSk0vDlPsHG8D51jDxVqQH8FZgXmMpGJgr95OCXAz5zLVX02XRWCi 8S4mc1vt0+QfdiotqVX9864Ad5OHm1jAY9qQCCCQLrwL7d9ZjLkVf53Y05yBZ63p6+O4 w4oHFd5yXCDk1RMTaCAcwMOGF2tLmJT00mnc//cRwoms1ojp5eV8sKAuEF0RV3ahy9Pe p84LGKEzavdbsoZxnhu4cF8nMPh087CL3MECerTGDUlGYCGhKTku+UIf5QZkFezC/DOT f4AYSnJ68IA7aqNvmD/7r4s3iJeRBMLoFrx2VYCy9+Xaf40LjK4dQgnYRcbmLSp3pUqY UhBQ== X-Gm-Message-State: ACgBeo04NnKUati2gVaNH344RqgnAVmZCpwcJstQewaAhHDBmO4JbJwJ ybvaw+nzrbRRMHa5p6F0CkUTnmeC7pY= X-Google-Smtp-Source: AA6agR6VxmLiNnNqeOG12HbfZmhUg8GjMju/UTidC69ZOSuQURH06ccGpXQxXc+ULAFSEs3A2ej3Lw== X-Received: by 2002:a05:6000:381:b0:221:7540:b1ee with SMTP id u1-20020a056000038100b002217540b1eemr11780538wrf.307.1661961753401; Wed, 31 Aug 2022 09:02:33 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id r10-20020a05600c284a00b003a531c7aa66sm2628554wmb.1.2022.08.31.09.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:31 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:18 +0000 Subject: [PATCH 1/8] scalar: fix command documentation section header Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Victoria Dye Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Victoria Dye From: Victoria Dye Rename the last section header in 'contrib/scalar/scalar.txt' from "Scalar" to "GIT". The linting rules of the 'documentation' CI build enforce the existence of a "GIT" section in command documentation. Although 'scalar.txt' is not yet checked, it will be in a future patch. Here, changing the header name is more appropriate than making a Scalar-specific exception to the linting rule. The existing "Scalar" section contains only a link back to the main Git documentation, essentially the same as the "GIT" section in builtin documentation. Changing the section name further clarifies the Scalar-Git association and maintains consistency with the rest of Git. Signed-off-by: Victoria Dye --- contrib/scalar/scalar.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/scalar/scalar.txt b/contrib/scalar/scalar.txt index 1a12dc45077..505a1cea0fd 100644 --- a/contrib/scalar/scalar.txt +++ b/contrib/scalar/scalar.txt @@ -161,6 +161,6 @@ SEE ALSO -------- linkgit:git-clone[1], linkgit:git-maintenance[1]. -Scalar +GIT --- Associated with the linkgit:git[1] suite From patchwork Wed Aug 31 16:02:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victoria Dye X-Patchwork-Id: 12961012 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 123F3ECAAD3 for ; Wed, 31 Aug 2022 16:03:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231626AbiHaQDY (ORCPT ); Wed, 31 Aug 2022 12:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231966AbiHaQCu (ORCPT ); Wed, 31 Aug 2022 12:02:50 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FDEDCD784 for ; Wed, 31 Aug 2022 09:02:42 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id n23-20020a7bc5d7000000b003a62f19b453so11958889wmk.3 for ; Wed, 31 Aug 2022 09:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=f4+KVXtYQADQWYr3muKlEl+8wqKMyzhhSgGPvikqpOg=; b=f6ieRIUQeR8gWiEpHo+CbkiATzIAPqY9o6kTSBvJK+eETAeCi3lhn1NMRgUYa6yHnK v7MnmBBVzYY62zN1L1uUoaJUs5YAQVTFJKQZ1wKxddktZrLT6P4tzaggPTWZNy0ufqLh X98P5IYRa+RXYCoU39IDa0sUL7KIulrrWxW9gL8sZpkY/XQdDzpDtQuRIkCI/18DX1ML 8n00QiNMqRHsXOA5sTkH0MMbhtdjVQNfiDaVu6ZqhFRlTmNVH1eMRGtYFFMPYLXfKktW Dvuy81nVVRBDy2sJ4MCGnNwUc84CVzkl+8kTtnyP6DKnk+SFtYAB/abXKwsSuDYSKxK2 gWjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=f4+KVXtYQADQWYr3muKlEl+8wqKMyzhhSgGPvikqpOg=; b=kRwxwLHNBpzGF1K8tM/YuiLyP8yM/gSTWTGuCz/yfgKlHjzbYQxwpJelG7w/8cPsTO BapDtDl2FSnmUB6itiyovbvosyEXDZaIqbrx//TC7SqN6LlsryzzL7vedfbuPNzM/hvf wFUN8xWejAZ+DoeSEEiCGptjaySnxpmZEZ8uEeFOqIY1HNBZUKe3/KEgEuBGfN2nm2Nc y3i1O+quRwcDlfHhfa7GWXp8SDRx9FY260rc9w3pOrW+eksvyoatMVLMnuiFq2BtxxXu sFTJDCw4hVI5KYE71y76V1RDT+0XA1gIH3pzPwadt2r47xZmlTZIu5Gz3NtvEc3Cf1Jz iosA== X-Gm-Message-State: ACgBeo0ZA1xRtUU7OuS29Y786zswv7P1bywToLY8O/uGbA0+Sd1uNtDi 2CWTAWDrASCU/OmPqFTFaU/pllGB+a4= X-Google-Smtp-Source: AA6agR4L5bzR7GtW0HzF7NoarC4pchz4F+9wTYREWX6UF/KEZSuWZ7WJm3o2lpQU0LvitCby8kjUag== X-Received: by 2002:a7b:c451:0:b0:3a6:829a:6102 with SMTP id l17-20020a7bc451000000b003a6829a6102mr2527670wmi.12.1661961759908; Wed, 31 Aug 2022 09:02:39 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o21-20020a05600c4fd500b003a32297598csm2788480wmq.43.2022.08.31.09.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:35 -0700 (PDT) Message-Id: <4d69e5eaccb8873eece666a3d2bb2b22abdde7ea.1661961746.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:19 +0000 Subject: [PATCH 2/8] scalar: include in standard Git build & installation Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Victoria Dye Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Victoria Dye From: Victoria Dye Move 'scalar' out of 'contrib/' and into the root of the Git tree. The goal of this change is to build 'scalar' as part of the standard Git build & install processes. This patch includes both the physical move of Scalar's files out of 'contrib/' ('scalar.c', 'scalar.txt', and 't9xxx-scalar.sh'), and the changes to the build definitions in 'Makefile' and 'CMakelists.txt' to accommodate the new program. At a high level, Scalar is built so that: - there is a 'scalar-objs' target (similar to those created in 029bac01a8 (Makefile: add {program,xdiff,test,git,fuzz}-objs & objects targets, 2021-02-23)) for debugging purposes. - it appears in the root of the install directory (rather than the gitexecdir). - it is included in the 'bin-wrappers/' directory for use in tests. - it receives a platform-specific executable suffix (e.g., '.exe'), if applicable. - 'scalar.txt' is installed as 'man1' documentation. - the 'clean' target removes the 'scalar' executable. Additionally, update the root level '.gitignore' file to ignore the Scalar executable. Signed-off-by: Victoria Dye --- .gitignore | 1 + Documentation/Makefile | 1 + {contrib/scalar => Documentation}/scalar.txt | 0 Makefile | 30 ++++--- contrib/buildsystems/CMakeLists.txt | 9 ++- contrib/scalar/.gitignore | 2 - contrib/scalar/Makefile | 35 -------- contrib/scalar/t/Makefile | 81 ------------------- contrib/scalar/scalar.c => scalar.c | 0 .../t/t9099-scalar.sh => t/t9210-scalar.sh | 10 +-- 10 files changed, 28 insertions(+), 141 deletions(-) rename {contrib/scalar => Documentation}/scalar.txt (100%) delete mode 100644 contrib/scalar/.gitignore delete mode 100644 contrib/scalar/Makefile delete mode 100644 contrib/scalar/t/Makefile rename contrib/scalar/scalar.c => scalar.c (100%) rename contrib/scalar/t/t9099-scalar.sh => t/t9210-scalar.sh (96%) diff --git a/.gitignore b/.gitignore index 80b530bbed2..3d1b880101e 100644 --- a/.gitignore +++ b/.gitignore @@ -185,6 +185,7 @@ /git-whatchanged /git-worktree /git-write-tree +/scalar /git-core-*/?* /git.res /gitweb/GITWEB-BUILD-OPTIONS diff --git a/Documentation/Makefile b/Documentation/Makefile index bd6b6fcb930..16c9e062390 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -21,6 +21,7 @@ MAN1_TXT += $(filter-out \ MAN1_TXT += git.txt MAN1_TXT += gitk.txt MAN1_TXT += gitweb.txt +MAN1_TXT += scalar.txt # man5 / man7 guides (note: new guides should also be added to command-list.txt) MAN5_TXT += gitattributes.txt diff --git a/contrib/scalar/scalar.txt b/Documentation/scalar.txt similarity index 100% rename from contrib/scalar/scalar.txt rename to Documentation/scalar.txt diff --git a/Makefile b/Makefile index eac30126e29..66dd3321f57 100644 --- a/Makefile +++ b/Makefile @@ -608,7 +608,9 @@ FUZZ_OBJS = FUZZ_PROGRAMS = GIT_OBJS = LIB_OBJS = +SCALAR_OBJS = OBJECTS = +OTHER_PROGRAMS = PROGRAM_OBJS = PROGRAMS = EXCLUDED_PROGRAMS = @@ -821,10 +823,12 @@ BUILT_INS += git-switch$X BUILT_INS += git-whatchanged$X # what 'all' will build but not install in gitexecdir -OTHER_PROGRAMS = git$X +OTHER_PROGRAMS += git$X +OTHER_PROGRAMS += scalar$X # what test wrappers are needed and 'install' will install, in bindir BINDIR_PROGRAMS_NEED_X += git +BINDIR_PROGRAMS_NEED_X += scalar BINDIR_PROGRAMS_NEED_X += git-receive-pack BINDIR_PROGRAMS_NEED_X += git-shell BINDIR_PROGRAMS_NEED_X += git-upload-archive @@ -2222,7 +2226,7 @@ profile-fast: profile-clean all:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS ifneq (,$X) - $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';) + $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) $(OTHER_PROGRAMS))), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';) endif all:: @@ -2545,7 +2549,12 @@ GIT_OBJS += git.o .PHONY: git-objs git-objs: $(GIT_OBJS) +SCALAR_OBJS += scalar.o +.PHONY: scalar-objs +scalar-objs: $(SCALAR_OBJS) + OBJECTS += $(GIT_OBJS) +OBJECTS += $(SCALAR_OBJS) OBJECTS += $(PROGRAM_OBJS) OBJECTS += $(TEST_OBJS) OBJECTS += $(XDIFF_OBJS) @@ -2556,10 +2565,6 @@ ifndef NO_CURL OBJECTS += http.o http-walker.o remote-curl.o endif -SCALAR_SOURCES := contrib/scalar/scalar.c -SCALAR_OBJECTS := $(SCALAR_SOURCES:c=o) -OBJECTS += $(SCALAR_OBJECTS) - .PHONY: objects objects: $(OBJECTS) @@ -2691,7 +2696,7 @@ $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS) -contrib/scalar/scalar$X: $(SCALAR_OBJECTS) GIT-LDFLAGS $(GITLIBS) +scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \ $(filter %.o,$^) $(LIBS) @@ -2747,7 +2752,7 @@ XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \ XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --language=Perl \ --keyword=__ --keyword=N__ --keyword="__n:1,2" MSGMERGE_FLAGS = --add-location --backup=off --update -LOCALIZED_C = $(sort $(FOUND_C_SOURCES) $(FOUND_H_SOURCES) $(SCALAR_SOURCES) \ +LOCALIZED_C = $(sort $(FOUND_C_SOURCES) $(FOUND_H_SOURCES) \ $(GENERATED_H)) LOCALIZED_SH = $(sort $(SCRIPT_SH) git-sh-setup.sh) LOCALIZED_PERL = $(sort $(SCRIPT_PERL)) @@ -3062,7 +3067,7 @@ bin-wrappers/%: wrap-for-bin.sh $(call mkdir_p_parent_template) $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's|@@BUILD_DIR@@|$(shell pwd)|' \ - -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%$(X),$(@F))$(patsubst git%,$(X),$(filter $(@F),$(BINDIR_PROGRAMS_NEED_X)))|' < $< > $@ && \ + -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \ chmod +x $@ # GNU make supports exporting all variables by "export" without parameters. @@ -3276,14 +3281,14 @@ ifndef NO_TCLTK $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install endif ifneq (,$X) - $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) + $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) $(OTHER_PROGRAMS))), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) endif bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ destdir_from_execdir_SQ=$$(echo '$(gitexecdir_relative_SQ)' | sed -e 's|[^/][^/]*|..|g') && \ { test "$$bindir/" = "$$execdir/" || \ - for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ + for p in $(OTHER_PROGRAMS) $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ $(RM) "$$execdir/$$p" && \ test -n "$(INSTALL_SYMLINKS)" && \ ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/$$p" "$$execdir/$$p" || \ @@ -3458,7 +3463,7 @@ clean: profile-clean coverage-clean cocciclean $(RM) git.res $(RM) $(OBJECTS) $(RM) $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(REFTABLE_TEST_LIB) - $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X + $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) $(RM) $(TEST_PROGRAMS) $(RM) $(FUZZ_PROGRAMS) $(RM) $(SP_OBJ) @@ -3509,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:: diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 2237109b57f..bae203c1fb9 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -610,7 +610,7 @@ unset(CMAKE_REQUIRED_INCLUDES) #programs set(PROGRAMS_BUILT git git-daemon git-http-backend git-sh-i18n--envsubst - git-shell) + git-shell scalar) if(NOT CURL_FOUND) list(APPEND excluded_progs git-http-fetch git-http-push) @@ -757,6 +757,9 @@ target_link_libraries(git-sh-i18n--envsubst common-main) add_executable(git-shell ${CMAKE_SOURCE_DIR}/shell.c) target_link_libraries(git-shell common-main) +add_executable(scalar ${CMAKE_SOURCE_DIR}/scalar.c) +target_link_libraries(scalar common-main) + if(CURL_FOUND) add_library(http_obj OBJECT ${CMAKE_SOURCE_DIR}/http.c) @@ -903,7 +906,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/") #install foreach(program ${PROGRAMS_BUILT}) -if(program STREQUAL "git" OR program STREQUAL "git-shell") +if(program MATCHES "^(git|git-shell|scalar)$") install(TARGETS ${program} RUNTIME DESTINATION bin) else() @@ -977,7 +980,7 @@ endif() #wrapper scripts set(wrapper_scripts - git git-upload-pack git-receive-pack git-upload-archive git-shell git-remote-ext) + git git-upload-pack git-receive-pack git-upload-archive git-shell git-remote-ext scalar) set(wrapper_test_scripts test-fake-ssh test-tool) diff --git a/contrib/scalar/.gitignore b/contrib/scalar/.gitignore deleted file mode 100644 index ff3d47e84d0..00000000000 --- a/contrib/scalar/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/*.exe -/scalar diff --git a/contrib/scalar/Makefile b/contrib/scalar/Makefile deleted file mode 100644 index 37f283f35d7..00000000000 --- a/contrib/scalar/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# The default target of this Makefile is... -all:: - -# Import tree-wide shared Makefile behavior and libraries -include ../../shared.mak - -include ../../config.mak.uname --include ../../config.mak.autogen --include ../../config.mak - -TARGETS = scalar$(X) scalar.o -GITLIBS = ../../common-main.o ../../libgit.a ../../xdiff/lib.a - -all:: scalar$(X) ../../bin-wrappers/scalar - -$(GITLIBS): - $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) $(subst ../../,,$@) - -$(TARGETS): $(GITLIBS) scalar.c - $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) $(patsubst %,contrib/scalar/%,$@) - -clean: - $(RM) $(TARGETS) ../../bin-wrappers/scalar - -../../bin-wrappers/scalar: ../../wrap-for-bin.sh Makefile - @mkdir -p ../../bin-wrappers - $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ - -e 's|@@BUILD_DIR@@|$(shell cd ../.. && pwd)|' \ - -e 's|@@PROG@@|contrib/scalar/scalar$(X)|' < $< > $@ && \ - chmod +x $@ - -test: all - $(MAKE) -C t - -.PHONY: $(GITLIBS) all clean test FORCE diff --git a/contrib/scalar/t/Makefile b/contrib/scalar/t/Makefile deleted file mode 100644 index 1ed174a8cf3..00000000000 --- a/contrib/scalar/t/Makefile +++ /dev/null @@ -1,81 +0,0 @@ -# Import tree-wide shared Makefile behavior and libraries -include ../../../shared.mak - -# Run scalar tests -# -# Copyright (c) 2005,2021 Junio C Hamano, Johannes Schindelin -# - --include ../../../config.mak.autogen --include ../../../config.mak - -SHELL_PATH ?= $(SHELL) -PERL_PATH ?= /usr/bin/perl -RM ?= rm -f -PROVE ?= prove -DEFAULT_TEST_TARGET ?= test -TEST_LINT ?= test-lint - -ifdef TEST_OUTPUT_DIRECTORY -TEST_RESULTS_DIRECTORY = $(TEST_OUTPUT_DIRECTORY)/test-results -else -TEST_RESULTS_DIRECTORY = ../../../t/test-results -endif - -# Shell quote; -SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) -PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) -TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY)) - -T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) - -all: $(DEFAULT_TEST_TARGET) - -test: $(TEST_LINT) - $(MAKE) aggregate-results-and-cleanup - -prove: $(TEST_LINT) - @echo "*** prove ***"; GIT_CONFIG=.git/config $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS) - $(MAKE) clean-except-prove-cache - -$(T): - @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS) - -clean-except-prove-cache: - $(RM) -r 'trash directory'.* - $(RM) -r valgrind/bin - -clean: clean-except-prove-cache - $(RM) .prove - -test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax - -test-lint-duplicates: - @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \ - test -z "$$dups" || { \ - echo >&2 "duplicate test numbers:" $$dups; exit 1; } - -test-lint-executable: - @bad=`for i in $(T); do test -x "$$i" || echo $$i; done` && \ - test -z "$$bad" || { \ - echo >&2 "non-executable tests:" $$bad; exit 1; } - -test-lint-shell-syntax: - @'$(PERL_PATH_SQ)' ../../../t/check-non-portable-shell.pl $(T) - -aggregate-results-and-cleanup: $(T) - $(MAKE) aggregate-results - $(MAKE) clean - -aggregate-results: - for f in '$(TEST_RESULTS_DIRECTORY_SQ)'/t*-*.counts; do \ - echo "$$f"; \ - done | '$(SHELL_PATH_SQ)' ../../../t/aggregate-results.sh - -valgrind: - $(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind" - -test-results: - mkdir -p test-results - -.PHONY: $(T) aggregate-results clean valgrind diff --git a/contrib/scalar/scalar.c b/scalar.c similarity index 100% rename from contrib/scalar/scalar.c rename to scalar.c diff --git a/contrib/scalar/t/t9099-scalar.sh b/t/t9210-scalar.sh similarity index 96% rename from contrib/scalar/t/t9099-scalar.sh rename to t/t9210-scalar.sh index dfb949f52ee..14ca575a214 100755 --- a/contrib/scalar/t/t9099-scalar.sh +++ b/t/t9210-scalar.sh @@ -2,15 +2,9 @@ test_description='test the `scalar` command' -TEST_DIRECTORY=$PWD/../../../t -export TEST_DIRECTORY +. ./test-lib.sh -# Make it work with --no-bin-wrappers -PATH=$PWD/..:$PATH - -. ../../../t/test-lib.sh - -GIT_TEST_MAINT_SCHEDULER="crontab:test-tool crontab ../cron.txt,launchctl:true,schtasks:true" +GIT_TEST_MAINT_SCHEDULER="crontab:test-tool crontab cron.txt,launchctl:true,schtasks:true" export GIT_TEST_MAINT_SCHEDULER test_expect_success 'scalar shows a usage' ' From patchwork Wed Aug 31 16:02:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin X-Patchwork-Id: 12961011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EB04ECAAD1 for ; Wed, 31 Aug 2022 16:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231533AbiHaQDW (ORCPT ); Wed, 31 Aug 2022 12:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231963AbiHaQCu (ORCPT ); Wed, 31 Aug 2022 12:02:50 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DB2BC993B for ; Wed, 31 Aug 2022 09:02:44 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id v16so16153553wrm.8 for ; Wed, 31 Aug 2022 09:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=34CmBf8CuIsfMqN+5OEJmvDj0KavnYpIi3zcg1sxGUQ=; b=PNp7N6NC7uMyOB3lwQVghKdaA9V+7zdTbJ+NbWqbk/0Kt8A31Q+KC4IXW6lATZKPfp mt6iK/3NR/n+55CQJVaysJjNJiD4ifyVYGh5hOv90/wZ0q7ic0GgJzOPSz9znYBXnCnZ BQsO/D8JtQiJzjni+3QCiAQeciz4P7AMVGf/jhg/xVh0wsfhT0qerq15vI+g4WMBSRgX pm0fMzLKI0h2+m7xgkCjFueQUB8AUZc0ONt8goWkkWsOtEwN2JNjGtqU8FZCXqQd6Eln LYgfTau9KK9r5UkL6Jg7OT8v1CGDup/9+LqgMMIOZfi5CiwRSbxQZS9rM80cKkX4ErST 179w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=34CmBf8CuIsfMqN+5OEJmvDj0KavnYpIi3zcg1sxGUQ=; b=4FaqrCNEtr7B1XJBUafWLNK336CK7bRJeBIoZ9JjSxzyFFvrQMQOqE1g8obROLuc33 8Up/F+m6oTjjyJdDHvSfFMAXJd4ql5EXhxo5uT1odxdfB68+4trTUQ3+83jTQDOjngxV qR3EdTRIuqHJip+eB75+Srs80LXdkKQGdym1Q+PC10NKIpoqs5ufA2mfwjtOSwIbljjK S9XAG7M9HNGS83Il6EEfm8POJEdpVc++0fTdZlddHodCLIHDzsAFJ+6JeeQ+vX1WxDvF YQ0DhlNJ64V86oCrU/jLYF7pw4WbSLrCLJBKNE3Hie9PTFGB4uIn1C04MA0+6rX14DYi ZApw== X-Gm-Message-State: ACgBeo0ucizjnaHJhnZbzd9qAn0I4ajH62J+GkF/1wR8WVCC7Flm+dlD PaPLmMkvmYEnz7jm4IJSECXjvCcaWns= X-Google-Smtp-Source: AA6agR5YnlnLxgsmMP5fDd6xaM1R8jCE+nJpsaZh6NR6El8OosAvUg0s1hchJHPFB1V2dm2T2KPaHQ== X-Received: by 2002:a05:6000:1885:b0:226:dcaa:f00e with SMTP id a5-20020a056000188500b00226dcaaf00emr7627567wri.154.1661961762484; Wed, 31 Aug 2022 09:02:42 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id p8-20020a1c5448000000b003a63a3b55c3sm2939579wmi.14.2022.08.31.09.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:41 -0700 (PDT) Message-Id: <969160650aa08f0cb6ef03cbdd3324f640a20a4e.1661961746.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:20 +0000 Subject: [PATCH 3/8] git help: special-case `scalar` Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin From: Johannes Schindelin With this commit, `git help scalar` will open the appropriate manual or HTML page (instead of looking for `gitscalar`). Signed-off-by: Johannes Schindelin Signed-off-by: Victoria Dye --- builtin/help.c | 2 ++ 1 file changed, 2 insertions(+) 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); } From patchwork Wed Aug 31 16:02:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin X-Patchwork-Id: 12961013 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1148CECAAD1 for ; Wed, 31 Aug 2022 16:03:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231661AbiHaQD0 (ORCPT ); Wed, 31 Aug 2022 12:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231545AbiHaQCv (ORCPT ); Wed, 31 Aug 2022 12:02:51 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B71A6C0B46 for ; Wed, 31 Aug 2022 09:02:46 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id z14-20020a7bc7ce000000b003a5db0388a8so2053986wmk.1 for ; Wed, 31 Aug 2022 09:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=/65WLX84ti1xb6mAYXh4iJe/ahbDthLvUFdM3hoa+1A=; b=OQOFIzJxQlshfP50ptx19bimGXPlwZpLYOnFCGngQZYNDENyvo7wCwDIyWAC0hX8wj bjGw2yR3mjwBMk2fh7+nh4/tvl5ZJWEggD9XgJExkAmM4NunpA0HLXuZcidRBJvJd/Vb M7BzmB4Jjyei3tLvbqAsPratlfTVTUahSAMQQnAI8Jk8JNudSPVI6JW6ksqi52qZzsbF s0Bcy64IbpoerI+gvDXsxqhsY5fyocgv4Q2wGrmfNrOVKT3soe3LcFCPsl0Pt81iC8gW JdT6jdsWYxibsLx6osA5u4oSqdZhFU0ZbFeEmVltHWzdmMbxmaJcz1IIyyuQDZ0xaVBq BfSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=/65WLX84ti1xb6mAYXh4iJe/ahbDthLvUFdM3hoa+1A=; b=qmB1UBUXtRMYLu9gMq8cPE0YrcEXMjRERn9C72a4pZJTM+00GUjCUDwRkYPTY9VaNm PzBQeMnbBAs+qdojCC5FvvuB+ExI5WXd6mnmVfK9KX7tDR8xqGS2wo/y6TdKy6xUx5ZL TULMUA6LBZAhb8gtT81vqdm2NmD5E/ovSMlvBE/zLDyd0Dt3JdRqS1ZtAF+wjmRIwLG2 jKXlY5hNfoaDomQSpP6PHRkEoFz7/2BqopjEvWhoODj1OMHVauPZHVFkWwfVkYDWutCi jJPRP7qFdObGvzocO6M/Pi6tRFmbbEakiPJFQH8ou66SL5ph2/g9eEtOzdTzexLiVfg2 wOig== X-Gm-Message-State: ACgBeo2JZvdh05Ev5qqG5r9uiVNetaOPyBHx7f1wUzQApNGvQboL+Cps b5wodc2F+zLlxQJucN1U5QKjjc4iqBE= X-Google-Smtp-Source: AA6agR5Fow7P1lvxr4SD5VK2a+moYBiZXOi5rFCVYm8Jx3AQavAzPm15CwZyUfBRVbxGiO9TBzwi/w== X-Received: by 2002:a05:600c:3b92:b0:3a6:8d6:9a2f with SMTP id n18-20020a05600c3b9200b003a608d69a2fmr2502832wms.159.1661961764490; Wed, 31 Aug 2022 09:02:44 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id d18-20020adff2d2000000b0022542581800sm14601456wrp.45.2022.08.31.09.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:43 -0700 (PDT) Message-Id: <46d0fddfe8fbc2c568cb5a3d14594276db2bc1a9.1661961746.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:21 +0000 Subject: [PATCH 4/8] scalar: implement the `help` subcommand Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin From: Johannes Schindelin It is merely handing off to `git help scalar`. Signed-off-by: Johannes Schindelin Signed-off-by: Victoria Dye --- scalar.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scalar.c b/scalar.c index 642d16124eb..675d7a6b0a9 100644 --- a/scalar.c +++ b/scalar.c @@ -819,6 +819,25 @@ static int cmd_delete(int argc, const char **argv) return res; } +static int cmd_help(int argc, const char **argv) +{ + struct option options[] = { + OPT_END(), + }; + const char * const usage[] = { + N_("scalar help"), + NULL + }; + + argc = parse_options(argc, argv, NULL, options, + usage, 0); + + if (argc != 0) + usage_with_options(usage, options); + + return run_git("help", "scalar", NULL); +} + static int cmd_version(int argc, const char **argv) { int verbose = 0, build_options = 0; @@ -858,6 +877,7 @@ static struct { { "run", cmd_run }, { "reconfigure", cmd_reconfigure }, { "delete", cmd_delete }, + { "help", cmd_help }, { "version", cmd_version }, { "diagnose", cmd_diagnose }, { NULL, NULL}, From patchwork Wed Aug 31 16:02:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victoria Dye X-Patchwork-Id: 12961014 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B39DAECAAD1 for ; Wed, 31 Aug 2022 16:03:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231681AbiHaQD3 (ORCPT ); Wed, 31 Aug 2022 12:03:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231583AbiHaQCv (ORCPT ); Wed, 31 Aug 2022 12:02:51 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD4CCB6016 for ; Wed, 31 Aug 2022 09:02:47 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id e13so17977781wrm.1 for ; Wed, 31 Aug 2022 09:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=xqcQOfyiDgT7nCN+ojM9zvzSM76LM5R6p1VuKM/vYIE=; b=Tl/FebpDsaNNbctb7fJE4TaG8KXPABE8U00WR9RAoM9XitlBzWIN/TfIhq7pLPEJ9s nZnpwyNPPkJ1/nRI/fEegd8OvHlsGEg24KbErchvsOMa2QE6gaePVah4DxFhkPSAV+UE BNj5mVJjZLDb+rg/Ys+FKwkiSQA/L78ocuhTjons12O17z6CDjvdDvs96ZgydobTha+b 9gDdrmkhHw+Cqm5oSqpdRiZluOR6UTuSmo0PJ8mAH4ULXiAx1P0s05pj5DnD+iRHPR4Z 4t524+xKT4AE1uHalHQdWhVY7file/0ALTtGJbvaxQv8qqddyELdb0y6ARnjqRTQzuON 6dXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=xqcQOfyiDgT7nCN+ojM9zvzSM76LM5R6p1VuKM/vYIE=; b=bMrdLXtIBeW6C+AC5VBfFwEaOBBzJky1yk/cpjEq9d/YtGX1+b8aQQJmhCiWzhbDU9 SO434hOvI5HYYlQjiL8FiEc44IQy/xQeiKSjJVgUK/IBCub5hg5fIKJxyBcuqDubiRAX Sf5rvrKRBXtPnRgPGZMRdTIXjbGYEOVAlx4z40X9EWDOOo+zyPj5mkGikcM2ThsR44Jv zgem7tLelXMPNYkDnmMLoF0CKm1udC9ognuAAjc452il5kZddjAdP+32bu3LIXaun0vS MBWEdYu3uGC0q8CjDmZLKu+uqN8JKQgeDfqkN9cT/3qOWEiGN2m4yYQoXg2GvOiuer5g ih3A== X-Gm-Message-State: ACgBeo3P5bPE0wfl9RFH/xnSNrSeapT8Ra9PBPETsXI3fyWbWndF49Ww bqtE5QFf+UisvITQZ66tct91pMKxryw= X-Google-Smtp-Source: AA6agR7e2H5/36aqHLSnivOUPlXykNYUkImIJ0v0RBg7xaRak2v3B+uW8cu5czNENSDJqOw0uhb9fA== X-Received: by 2002:adf:dd0d:0:b0:225:8759:a35a with SMTP id a13-20020adfdd0d000000b002258759a35amr13097626wrm.615.1661961765914; Wed, 31 Aug 2022 09:02:45 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 12-20020a05600c028c00b003a317ee3036sm2571988wmk.2.2022.08.31.09.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:45 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:22 +0000 Subject: [PATCH 5/8] scalar-clone: add test coverage Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Victoria Dye Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Victoria Dye From: Victoria Dye Create a new test file ('t9211-scalar-clone.sh') to exercise the options and behavior of the 'scalar clone' command. Signed-off-by: Victoria Dye --- t/t9211-scalar-clone.sh | 135 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100755 t/t9211-scalar-clone.sh diff --git a/t/t9211-scalar-clone.sh b/t/t9211-scalar-clone.sh new file mode 100755 index 00000000000..9fbbc4de2c0 --- /dev/null +++ b/t/t9211-scalar-clone.sh @@ -0,0 +1,135 @@ +#!/bin/sh + +test_description='test the `scalar clone` subcommand' + +. ./test-lib.sh + +GIT_TEST_MAINT_SCHEDULER="crontab:test-tool crontab cron.txt,launchctl:true,schtasks:true" +export GIT_TEST_MAINT_SCHEDULER + +test_expect_success 'set up repository to clone' ' + rm -rf .git && + git init to-clone && + ( + cd to-clone && + git branch -m base && + + test_commit first && + test_commit second && + test_commit third && + + git switch -c parallel first && + mkdir -p 1/2 && + test_commit 1/2/3 && + + git switch base && + + # By default, permit + git config uploadpack.allowfilter true && + git config uploadpack.allowanysha1inwant true + ) +' + +cleanup_clone () { + rm -rf "$1" +} + +test_expect_success 'creates content in enlistment root' ' + test_when_finished cleanup_clone cloned && + + scalar clone "file://$(pwd)/to-clone" cloned && + ls -A cloned >enlistment-root && + test_line_count = 1 enlistment-root && + test_path_is_dir cloned/src && + test_path_is_dir cloned/src/.git +' + +test_expect_success 'with spaces' ' + test_when_finished cleanup_clone "cloned with space" && + + scalar clone "file://$(pwd)/to-clone" "cloned with space" && + test_path_is_dir "cloned with space" && + test_path_is_dir "cloned with space/src" && + test_path_is_dir "cloned with space/src/.git" +' + +test_expect_success 'partial clone if supported by server' ' + test_when_finished cleanup_clone cloned && + + scalar clone "file://$(pwd)/to-clone" cloned && + + ( + cd cloned/src && + + # Two promisor packs: one for refs, the other for blobs + ls .git/objects/pack/pack-*.promisor >promisorlist && + test_line_count = 2 promisorlist + ) +' + +test_expect_success 'fall back on full clone if partial unsupported' ' + test_when_finished cleanup_clone cloned && + + test_config -C to-clone uploadpack.allowfilter false && + test_config -C to-clone uploadpack.allowanysha1inwant false && + + scalar clone "file://$(pwd)/to-clone" cloned 2>err && + grep "filtering not recognized by server, ignoring" err && + + ( + cd cloned/src && + + # Still get a refs promisor file, but none for blobs + ls .git/objects/pack/pack-*.promisor >promisorlist && + test_line_count = 1 promisorlist + ) +' + +test_expect_success 'initializes sparse-checkout by default' ' + test_when_finished cleanup_clone cloned && + + scalar clone "file://$(pwd)/to-clone" cloned && + ( + cd cloned/src && + test_cmp_config true core.sparseCheckout && + test_cmp_config true core.sparseCheckoutCone + ) +' + +test_expect_success '--full-clone does not create sparse-checkout' ' + test_when_finished cleanup_clone cloned && + + scalar clone --full-clone "file://$(pwd)/to-clone" cloned && + ( + cd cloned/src && + test_cmp_config "" --default "" core.sparseCheckout && + test_cmp_config "" --default "" core.sparseCheckoutCone + ) +' + +test_expect_success '--single-branch clones HEAD only' ' + test_when_finished cleanup_clone cloned && + + scalar clone --single-branch "file://$(pwd)/to-clone" cloned && + ( + cd cloned/src && + git for-each-ref refs/remotes/origin >out && + test_line_count = 1 out && + grep "refs/remotes/origin/base" out + ) +' + +test_expect_success '--no-single-branch clones all branches' ' + test_when_finished cleanup_clone cloned && + + scalar clone --no-single-branch "file://$(pwd)/to-clone" cloned && + ( + cd cloned/src && + git for-each-ref refs/remotes/origin >out && + test_line_count = 2 out && + grep "refs/remotes/origin/base" out && + grep "refs/remotes/origin/parallel" out + ) +' + +test_done From patchwork Wed Aug 31 16:02:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victoria Dye X-Patchwork-Id: 12961016 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73786ECAAD1 for ; Wed, 31 Aug 2022 16:03:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231824AbiHaQDd (ORCPT ); Wed, 31 Aug 2022 12:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231562AbiHaQCw (ORCPT ); Wed, 31 Aug 2022 12:02:52 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEAF1CACB6 for ; Wed, 31 Aug 2022 09:02:49 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id b16so11264227wru.7 for ; Wed, 31 Aug 2022 09:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=MCYwFiy9vE738DPnjGDmJN+C5Cur1qVQh+PXJTq/GGI=; b=bzr0BSbMbSIlAVgFBaQdACVHkLInoMvnbrHJNV3oeu3PVciEam2PlUgkx13qdA324P NEWQsfuOWlwevpfvsOBhXYa+e7dQyB82LGAFTgiyjP+Ni7G/rSQNfvzuRTOdVhnHvqxH oHDjuZ3klFP82vk94EHv1c49AiA9VVyqIcDydi2qbLniLGrEYtYDQ0IQKkLnmTZH7vep Aw1qxAFDEFuq22buQLnSlNCKkkC7RZdF1OCPRZfM9rz79DvZyHSW+f4h/xN0uAm24yHG LxGAg6O8S5XY4wkOxSW0dZLvNC57DwWBJHnmx+rAovXAJy1hAwNofHWE1a+02X4/0K+N FoJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=MCYwFiy9vE738DPnjGDmJN+C5Cur1qVQh+PXJTq/GGI=; b=Ndc5XVLqygvSq73opzsLqFRFBlTz8Pwu/hsKlM/3iZhoEood25T3FOuyn2RI68hbGE dY1SNEA41rpajTIVUs3nWEX+NS4epxHLVldKcwBtVN7CuzQcEEZGxBk0x2IaHd76uFJP FErpQ+mM0D7TY81QQDGh8GtvVnmDIAz/DuXfnCARcyh/9WlKjKVM8W+NT83V2Ap4GSHt erEUNjva7jIl39LpFds2p1eqOuwaLgfuMmC7Ubp2o0a6DkeO2cnd5y1kHjYDTesCtW9c qmHb9zNcdmg0+U4n8/xp8gwbtnbee9Y0/DAU17eu2I1CBnl4Tb807JEVrs2yMK74loLs 5Z8Q== X-Gm-Message-State: ACgBeo0pN1KNr+1BsaQzMuQychy3tGre2koA1CJpApWsYch3hqBSKMD6 cpdyKnRWcn8hlBTBuGkyKiNzdXaOuX0= X-Google-Smtp-Source: AA6agR7TMs0tL5M9sKWl6LBDQLsksRTxMK5efQEOKcXbafAd2T35ukI3U5XeZN6Pd0iK3WhQD3i/sg== X-Received: by 2002:adf:ffcc:0:b0:226:df89:73d2 with SMTP id x12-20020adfffcc000000b00226df8973d2mr7207930wrs.612.1661961768007; Wed, 31 Aug 2022 09:02:48 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id b8-20020a5d4d88000000b002253d865715sm9501313wru.87.2022.08.31.09.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:46 -0700 (PDT) Message-Id: <42ab39f21212d3da1af3546d3425aa790637056f.1661961746.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:23 +0000 Subject: [PATCH 6/8] t/perf: add Scalar performance tests Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Victoria Dye Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Victoria Dye From: Victoria Dye Create 'p9210-scalar.sh' for testing Scalar performance and comparing performance of Git operations in Scalar registrations and standard repositories. Example results: Test this tree ------------------------------------------------------------------------ 9210.2: scalar clone 14.82(18.00+3.63) 9210.3: git clone 26.15(36.67+6.90) 9210.4: git status (scalar) 0.04(0.01+0.01) 9210.5: git status (non-scalar) 0.10(0.02+0.11) 9210.6: test_commit --append --no-tag A (scalar) 0.08(0.02+0.03) 9210.7: test_commit --append --no-tag A (non-scalar) 0.13(0.03+0.11) Signed-off-by: Victoria Dye --- t/perf/p9210-scalar.sh | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 t/perf/p9210-scalar.sh diff --git a/t/perf/p9210-scalar.sh b/t/perf/p9210-scalar.sh new file mode 100755 index 00000000000..a68eb6b223d --- /dev/null +++ b/t/perf/p9210-scalar.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +test_description='test scalar performance' +. ./perf-lib.sh + +test_perf_large_repo "$TRASH_DIRECTORY/to-clone" + +test_expect_success 'enable server-side partial clone' ' + git -C to-clone config uploadpack.allowFilter true && + git -C to-clone config uploadpack.allowAnySHA1InWant true +' + +test_perf 'scalar clone' ' + rm -rf scalar-clone && + scalar clone "file://$(pwd)/to-clone" scalar-clone +' + +test_perf 'git clone' ' + rm -rf git-clone && + git clone "file://$(pwd)/to-clone" git-clone +' + +test_compare_perf () { + command="$@" + test_perf "$command (scalar)" " + ( + cd scalar-clone/src && + $command + ) + " + + test_perf "$command (non-scalar)" " + ( + cd git-clone && + $command + ) + " +} + +test_compare_perf git status +test_compare_perf test_commit --append --no-tag A + +test_done From patchwork Wed Aug 31 16:02:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victoria Dye X-Patchwork-Id: 12961015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8811AECAAD4 for ; Wed, 31 Aug 2022 16:03:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231755AbiHaQDb (ORCPT ); Wed, 31 Aug 2022 12:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbiHaQCx (ORCPT ); Wed, 31 Aug 2022 12:02:53 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F7B3B1B9C for ; Wed, 31 Aug 2022 09:02:52 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id b5so18878172wrr.5 for ; Wed, 31 Aug 2022 09:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=mbou4husCoj4ysZil9oV2bMlRkeKF7YupR72z0aR9cw=; b=JOdauR93UxdcVc0qw+9rSxtKMMSLEc+QgYZID1I/pn9qYPauZL8cnsX7ImGI36pD0g rr2cwcbdgzIU2g9nZHBg20ftFosYEfGnduq1ocKiS+1eQgFHCNTAsVl1NoeWepiPD9fo pa4ABlW541y8l4wzG5qlZEqZxh21kZWyfNU/AwvzyVqPrc8l4ENxOFUT8BoShxIGb5G8 ys3cJ4CTLGT0n6NjMnHHZJ9/CQYpuzJ0KeoOQm9crsi474TYHqIB3gcLnKuHJaX56UYa oQlObX/gL6rT3AdI04YucEsFRiz9odhdH3rkVk4NfVkwO4m56dmjCJ9i2WcYFDkD439l 3lPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=mbou4husCoj4ysZil9oV2bMlRkeKF7YupR72z0aR9cw=; b=0xeVA5wlXETIV9SEdru/Ql7jH9noc/95d6TgQSkoJPPqwyE8XmV065h0TQKbUYRXl9 q+DPA5jmQGqaQuzsOuIIyGrAot6g2uKtdiAIkaBUwJTFjvkclp8JL+Uwep8HGsM49NHM srFhWkzTFR7xqxUVrRmZecFaODQSYem8HBFb8EYYCLAkG4WFFARM8lo46ba4hLzB1pN6 nje3n/8g8yP/6WmJHMk/gc88aISrUMWyrKsgckbqwpw0nRF3JYxjySuyBM1N2EuYEu5e egJRdszJdu6kgwtYgCjtJUN5WMdjiZApzMHnea9y7HIkwZ2s2AD78FrxtPmEmJxNezTj dejQ== X-Gm-Message-State: ACgBeo28XhTKISeuQFHoJvM2SMr1NFiUJBYpn0fuhF+LRBKhCh5rh+Xg ey3JLWewCCPHDSj5MCDITkaKlEPotI4= X-Google-Smtp-Source: AA6agR6cbbCBPOhfLNziROqVKYD7/cjHbTVWS06oQ8U8sJpFrla60a0YnQVs3RqmliLbLhCYl9hlPQ== X-Received: by 2002:adf:e8cd:0:b0:226:cfa3:82ca with SMTP id k13-20020adfe8cd000000b00226cfa382camr12131598wrn.525.1661961770617; Wed, 31 Aug 2022 09:02:50 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id m4-20020a05600c4f4400b003a5c999cd1asm3064945wmq.14.2022.08.31.09.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:49 -0700 (PDT) Message-Id: <96e08a95265ea66839b439ce8abc50b34395aaa3.1661961746.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:24 +0000 Subject: [PATCH 7/8] t/perf: add 'GIT_PERF_USE_SCALAR' run option Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Victoria Dye Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Victoria Dye From: Victoria Dye Add a 'GIT_PERF_USE_SCALAR' environment variable (and corresponding perf config 'useScalar') to register a repository created with any of: * test_perf_fresh_repo * test_perf_default_repo * test_perf_large_repo as a Scalar enlistment. This is intended to allow a developer to test the impact of Scalar on already-defined performance scenarios. Suggested-by: Derrick Stolee Signed-off-by: Victoria Dye --- t/perf/README | 4 ++++ t/perf/perf-lib.sh | 13 ++++++++++++- t/perf/run | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/t/perf/README b/t/perf/README index fb9127a66f7..8f217d7be7d 100644 --- a/t/perf/README +++ b/t/perf/README @@ -95,6 +95,10 @@ You can set the following variables (also in your config.mak): Git (e.g., performance of index-pack as the number of threads changes). These can be enabled with GIT_PERF_EXTRA. + GIT_PERF_USE_SCALAR + Boolean indicating whether to register test repo(s) with Scalar + before executing tests. + You can also pass the options taken by ordinary git tests; the most useful one is: diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index 27c28017921..b960b0f6301 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -49,6 +49,9 @@ export TEST_DIRECTORY TRASH_DIRECTORY GIT_BUILD_DIR GIT_TEST_CMP MODERN_GIT=$GIT_BUILD_DIR/bin-wrappers/git export MODERN_GIT +MODERN_SCALAR=$GIT_BUILD_DIR/bin-wrappers/scalar +export MODERN_SCALAR + perf_results_dir=$TEST_RESULTS_DIR test -n "$GIT_PERF_SUBSECTION" && perf_results_dir="$perf_results_dir/$GIT_PERF_SUBSECTION" mkdir -p "$perf_results_dir" @@ -120,6 +123,10 @@ test_perf_create_repo_from () { # status" due to a locked index. Since we have # a copy it's fine to remove the lock. rm .git/index.lock + fi && + if test_bool_env "$GIT_PERF_USE_SCALAR" false + then + "$MODERN_SCALAR" register fi ) || error "failed to copy repository '$source' to '$repo'" } @@ -130,7 +137,11 @@ test_perf_fresh_repo () { "$MODERN_GIT" init -q "$repo" && ( cd "$repo" && - test_perf_do_repo_symlink_config_ + test_perf_do_repo_symlink_config_ && + if test_bool_env "$GIT_PERF_USE_SCALAR" false + then + "$MODERN_SCALAR" register + fi ) } diff --git a/t/perf/run b/t/perf/run index 55219aa4056..33da4d2aba2 100755 --- a/t/perf/run +++ b/t/perf/run @@ -171,6 +171,9 @@ run_subsection () { get_var_from_env_or_config "GIT_PERF_MAKE_COMMAND" "perf" "makeCommand" get_var_from_env_or_config "GIT_PERF_MAKE_OPTS" "perf" "makeOpts" + get_var_from_env_or_config "GIT_PERF_USE_SCALAR" "perf" "useScalar" "--bool" + export GIT_PERF_USE_SCALAR + get_var_from_env_or_config "GIT_PERF_REPO_NAME" "perf" "repoName" export GIT_PERF_REPO_NAME From patchwork Wed Aug 31 16:02:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victoria Dye X-Patchwork-Id: 12961017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2552BECAAD1 for ; Wed, 31 Aug 2022 16:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbiHaQDy (ORCPT ); Wed, 31 Aug 2022 12:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231450AbiHaQCz (ORCPT ); Wed, 31 Aug 2022 12:02:55 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 100A980B58 for ; Wed, 31 Aug 2022 09:02:54 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id h1so7606465wmd.3 for ; Wed, 31 Aug 2022 09:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=NHckKwoRME6izHezy19QDuLVea12ybAgp0ADMPSukzw=; b=aGDdFHH2klE3q+vHfSLone/CkLw+JBcfgLz1yKi6qqutiQSAvUQTtFx5xYl/IJWKqU t3EMkbrLFqRvXJfqrAQkSHPk+I4A3Paq8SiAOi367Wpcu7OyOWdxLzTMneSuw7d/vERt pISus+haneTZpW3GW686bwgf78C9WBCejF9Duw0L4QZy48aO6HkAyJt/I4X/OeZB296h PwWcKSEJY6imWHjpymzYZkIb5yY21l8PeztL3czg72TPWC31eOLi/IrKAYHGIgloihbF wtU6d6T/UIshfUms/CBz2Mr/EpGPdZ5A4ytJvyO9vkdqZdEgVyf1CVu7EYvustRIWsZI 9eMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=NHckKwoRME6izHezy19QDuLVea12ybAgp0ADMPSukzw=; b=SGhz4kkhc23Wao9B9xF/ZQw7UuvmWFzoa844ipBWsnqwOIMaOmZjf/qaHrd08+f+q9 KiBNR/X7IjZ5CickXO9fA4IZIUreDPB3kDS6aEToOjxyiCijhzi0JsFe8S8yrtNVY3gn WFgHS+FgIghBXJ8bbKx2c8iOjKSth4v622UeBexFdGeO5HTVlWlXmltF2PDdJZDoq50n zKDPEs0aKSHQR+U+2mZJsSNBzSIxh2r7545/AsHCQzrvchjbCkHsRn2gEjg70wXP8Zqj yastRkuyG1BXbMBkoiY/LI8tj0GwWUeRCruFlfPL2VdAU0y25ejVc7Oqo/qYfgj5vyb2 gp0Q== X-Gm-Message-State: ACgBeo2DsEhIOiuQFhuWSubFKiht6YseD+aqJ7YZJ+zxpIbIfTJmTzLW +1WyzIVJP60n7ze7pHGu/AYkXvr4dHQ= X-Google-Smtp-Source: AA6agR4TMOfYyGoAqS1XM0I0QmDCVe0N6F+/ctklPxAhvWjWBUP6sieOqgYwZTAWijx6kcJm1DHhwA== X-Received: by 2002:a1c:a107:0:b0:3a6:8b06:cf19 with SMTP id k7-20020a1ca107000000b003a68b06cf19mr2435895wme.195.1661961772218; Wed, 31 Aug 2022 09:02:52 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o26-20020a05600c511a00b003a643ac2b08sm2595246wms.8.2022.08.31.09.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:02:51 -0700 (PDT) Message-Id: <8bbe913dccf91bc4e6c76cbe85c585d223fc4aef.1661961746.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Wed, 31 Aug 2022 16:02:25 +0000 Subject: [PATCH 8/8] Documentation/technical: include Scalar technical doc Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: derrickstolee@github.com, johannes.schindelin@gmx.de, gitster@pobox.com, Victoria Dye , Victoria Dye Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Victoria Dye From: Victoria Dye Include 'Documentation/technical/scalar.txt' alongside the other HTML technical docs when installing them. Now that the document is intended as a widely-accessible reference, remove the internal work-in-progress roadmap from the document. Those details should no longer be needed to guide Scalar's development and, if they were left, they could fall out-of-date and be misleading to readers. Signed-off-by: Victoria Dye --- Documentation/Makefile | 1 + Documentation/technical/scalar.txt | 61 ------------------------------ 2 files changed, 1 insertion(+), 61 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 16c9e062390..9ec53afdf18 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -116,6 +116,7 @@ TECH_DOCS += technical/parallel-checkout TECH_DOCS += technical/partial-clone TECH_DOCS += technical/racy-git TECH_DOCS += technical/reftable +TECH_DOCS += technical/scalar TECH_DOCS += technical/send-pack-pipeline TECH_DOCS += technical/shallow TECH_DOCS += technical/trivial-merge diff --git a/Documentation/technical/scalar.txt b/Documentation/technical/scalar.txt index 0600150b3ad..921cb104c3c 100644 --- a/Documentation/technical/scalar.txt +++ b/Documentation/technical/scalar.txt @@ -64,64 +64,3 @@ some "global" `git` options (e.g., `-c` and `-C`). Because `scalar` is not invoked as a Git subcommand (like `git scalar`), it is built and installed as its own executable in the `bin/` directory, alongside `git`, `git-gui`, etc. - -Roadmap -------- - -NOTE: this section will be removed once the remaining tasks outlined in this -roadmap are complete. - -Scalar is a large enough project that it is being upstreamed incrementally, -living in `contrib/` until it is feature-complete. So far, the following patch -series have been accepted: - -- `scalar-the-beginning`: The initial patch series which sets up - `contrib/scalar/` and populates it with a minimal `scalar` command that - demonstrates the fundamental ideas. - -- `scalar-c-and-C`: The `scalar` command learns about two options that can be - specified before the command, `-c =` and `-C `. - -- `scalar-diagnose`: The `scalar` command is taught the `diagnose` subcommand. - -- `scalar-generalize-diagnose`: Move the functionality of `scalar diagnose` - into `git diagnose` and `git bugreport --diagnose`. - -- 'scalar-add-fsmonitor: Enable the built-in FSMonitor in Scalar - enlistments. At the end of this series, Scalar should be feature-complete - from the perspective of a user. - -Roughly speaking (and subject to change), the following series are needed to -"finish" this initial version of Scalar: - -- Move Scalar to toplevel: Move Scalar out of `contrib/` and into the root of - `git`. This includes a variety of related updates, including: - - building & installing Scalar in the Git root-level 'make [install]'. - - builing & testing Scalar as part of CI. - - moving and expanding test coverage of Scalar (including perf tests). - - implementing 'scalar help'/'git help scalar' to display scalar - documentation. - -Finally, there are two additional patch series that exist in Microsoft's fork of -Git, but there is no current plan to upstream them. There are some interesting -ideas there, but the implementation is too specific to Azure Repos and/or VFS -for Git to be of much help in general. - -These still exist mainly because the GVFS protocol is what Azure Repos has -instead of partial clone, while Git is focused on improving partial clone: - -- `scalar-with-gvfs`: The primary purpose of this patch series is to support - existing Scalar users whose repositories are hosted in Azure Repos (which does - not support Git's partial clones, but supports its predecessor, the GVFS - protocol, which is used by Scalar to emulate the partial clone). - - Since the GVFS protocol will never be supported by core Git, this patch series - will remain in Microsoft's fork of Git. - -- `run-scalar-functional-tests`: The Scalar project developed a quite - comprehensive set of integration tests (or, "Functional Tests"). They are the - sole remaining part of the original C#-based Scalar project, and this patch - adds a GitHub workflow that runs them all. - - Since the tests partially depend on features that are only provided in the - `scalar-with-gvfs` patch series, this patch cannot be upstreamed.