]> git.ipfire.org Git - thirdparty/git.git/commitdiff
meson: fix overwritten `git` variable
authorPatrick Steinhardt <ps@pks.im>
Wed, 26 Feb 2025 08:22:21 +0000 (09:22 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Feb 2025 17:09:37 +0000 (09:09 -0800)
We're assigning the `git` variable in three places:

  - In "meson.build" to store the external Git executable.

  - In "meson.build" to store the compiled Git executable.

  - In "Documentation/meson.build" to store the external Git executable,
    a second time.

The last case is only needed because we overwrite the original variable
with the built version. Rename the variable used for the built Git
executable so that we don't have to resolve the external Git executable
multiple times.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/meson.build
meson.build

index 2a26fa8a5fedc0f46a82fcc31bf1d6457f6d082c..6438fa67920b67971f404e536498d54f4d146cb6 100644 (file)
@@ -283,7 +283,6 @@ elif docs_backend == 'asciidoctor'
   ]
 endif
 
-git = find_program('git', required: false)
 xmlto = find_program('xmlto')
 
 cmd_lists = [
index 5bf6a914ead1a87550dc2bca3eb90ba6211feb67..930b85a6dfecab62062efad7da76fa94c4fefaa3 100644 (file)
@@ -1608,13 +1608,13 @@ libgit_commonmain = declare_dependency(
 bin_wrappers = [ ]
 test_dependencies = [ ]
 
-git = executable('git',
+git_builtin = executable('git',
   sources: builtin_sources + 'git.c',
   dependencies: [libgit_commonmain],
   install: true,
   install_dir: get_option('libexecdir') / 'git-core',
 )
-bin_wrappers += git
+bin_wrappers += git_builtin
 
 test_dependencies += executable('git-daemon',
   sources: 'daemon.c',
@@ -1705,7 +1705,7 @@ test_dependencies += executable('git-imap-send',
 
 foreach alias : [ 'git-receive-pack', 'git-upload-archive', 'git-upload-pack' ]
   bin_wrappers += executable(alias,
-    objects: git.extract_all_objects(recursive: false),
+    objects: git_builtin.extract_all_objects(recursive: false),
     dependencies: [libgit_commonmain],
   )