Skip to content

Commit 3ee3a6e

Browse files
pks-tgitster
authored andcommitted
meson: fix overwritten git variable
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 16c89dc commit 3ee3a6e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Documentation/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ elif docs_backend == 'asciidoctor'
283283
]
284284
endif
285285

286-
git = find_program('git', required: false)
287286
xmlto = find_program('xmlto')
288287

289288
cmd_lists = [

meson.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,13 +1608,13 @@ libgit_commonmain = declare_dependency(
16081608
bin_wrappers = [ ]
16091609
test_dependencies = [ ]
16101610

1611-
git = executable('git',
1611+
git_builtin = executable('git',
16121612
sources: builtin_sources + 'git.c',
16131613
dependencies: [libgit_commonmain],
16141614
install: true,
16151615
install_dir: get_option('libexecdir') / 'git-core',
16161616
)
1617-
bin_wrappers += git
1617+
bin_wrappers += git_builtin
16181618

16191619
test_dependencies += executable('git-daemon',
16201620
sources: 'daemon.c',
@@ -1705,7 +1705,7 @@ test_dependencies += executable('git-imap-send',
17051705

17061706
foreach alias : [ 'git-receive-pack', 'git-upload-archive', 'git-upload-pack' ]
17071707
bin_wrappers += executable(alias,
1708-
objects: git.extract_all_objects(recursive: false),
1708+
objects: git_builtin.extract_all_objects(recursive: false),
17091709
dependencies: [libgit_commonmain],
17101710
)
17111711

0 commit comments

Comments
 (0)