Message ID | 20201111151754.31527-6-avarab@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/5] parse-remote: remove unused GIT_DIR variable | expand |
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > Completely remove the git-parse-remote shellscript library. > > Since e9460a66e0 ("parse-remote: support default reflist in > get_remote_merge_branch", 2009-06-12) when there were around 300 lines > of code here used by various core code everything in it has become > unsued, and that unused code was removed in preceding commits. Almost > all of its previous functionality has now been rewritten in C. Very pleasing to see this. I would imagine that an equally easy to understand and more compact presentation of this series would have been to - copy minimally needed code to git-submodule.sh verbatim, while dropping the dot-source from git-submodule.sh (patch 1) - just say "nobody now dot-sources this shell library" and do what this step does. Especially 1/5 confused me more than it helped me to understand the end result ;-) It does not matter in the endgame that GIT_DIR was defined there, as long as we know nobody other than git-submodule.sh dot-sources the shell library and git-submodule.sh uses its own setup. But that can only be said with perfect hindsight after seeing all your efforts in these five patches. Thanks.
diff --git a/.gitignore b/.gitignore index 6232d33924..9da275e4e8 100644 --- a/.gitignore +++ b/.gitignore @@ -114,7 +114,6 @@ /git-pack-redundant /git-pack-objects /git-pack-refs -/git-parse-remote /git-patch-id /git-prune /git-prune-packed diff --git a/Documentation/git-parse-remote.txt b/Documentation/git-parse-remote.txt deleted file mode 100644 index a45ea1ece8..0000000000 --- a/Documentation/git-parse-remote.txt +++ /dev/null @@ -1,23 +0,0 @@ -git-parse-remote(1) -=================== - -NAME ----- -git-parse-remote - Routines to help parsing remote repository access parameters - - -SYNOPSIS --------- -[verse] -'. "$(git --exec-path)/git-parse-remote"' - -DESCRIPTION ------------ -This script is included in various scripts to supply -routines to parse files under $GIT_DIR/remotes/ and -$GIT_DIR/branches/ and configuration variables that are related -to fetching, pulling and pushing. - -GIT ---- -Part of the linkgit:git[1] suite diff --git a/Makefile b/Makefile index 790a883932..c874dff9b8 100644 --- a/Makefile +++ b/Makefile @@ -613,7 +613,6 @@ SCRIPT_SH += git-submodule.sh SCRIPT_SH += git-web--browse.sh SCRIPT_LIB += git-mergetool--lib -SCRIPT_LIB += git-parse-remote SCRIPT_LIB += git-rebase--preserve-merges SCRIPT_LIB += git-sh-i18n SCRIPT_LIB += git-sh-setup @@ -2577,7 +2576,6 @@ XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --language=Perl \ --keyword=__ --keyword=N__ --keyword="__n:1,2" LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) LOCALIZED_SH = $(SCRIPT_SH) -LOCALIZED_SH += git-parse-remote.sh LOCALIZED_SH += git-rebase--preserve-merges.sh LOCALIZED_SH += git-sh-setup.sh LOCALIZED_PERL = $(SCRIPT_PERL) diff --git a/command-list.txt b/command-list.txt index 0e3204e7d1..c19c8a94fe 100644 --- a/command-list.txt +++ b/command-list.txt @@ -135,7 +135,6 @@ git-p4 foreignscminterface git-pack-objects plumbingmanipulators git-pack-redundant plumbinginterrogators git-pack-refs ancillarymanipulators -git-parse-remote synchelpers git-patch-id purehelpers git-prune ancillarymanipulators complete git-prune-packed plumbingmanipulators diff --git a/git-submodule.sh b/git-submodule.sh index a6219c34e2..e7962e1a45 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -20,7 +20,6 @@ USAGE="[--quiet] [--cached] OPTIONS_SPEC= SUBDIRECTORY_OK=Yes . git-sh-setup -. git-parse-remote require_work_tree wt_prefix=$(git rev-parse --show-prefix) cd_to_toplevel
Completely remove the git-parse-remote shellscript library. Since e9460a66e0 ("parse-remote: support default reflist in get_remote_merge_branch", 2009-06-12) when there were around 300 lines of code here used by various core code everything in it has become unsued, and that unused code was removed in preceding commits. Almost all of its previous functionality has now been rewritten in C. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- .gitignore | 1 - Documentation/git-parse-remote.txt | 23 ----------------------- Makefile | 2 -- command-list.txt | 1 - git-submodule.sh | 1 - 5 files changed, 28 deletions(-) delete mode 100644 Documentation/git-parse-remote.txt