Git fork

Introduce support for the Meson build system

Introduce support for the Meson build system, a "modern" meta build
system that supports many different platforms, including Linux, macOS,
Windows and BSDs. Meson supports different backends, including Ninja,
Xcode and Microsoft Visual Studio. Several common IDEs provide an
integration with it.

The biggest contender compared to Meson is probably CMake as outlined in
our "Documentation/technical/build-systems.txt" file. Based on my own
personal experience from working with both build systems extensively I
strongly favor Meson over CMake. In my opinion, it feels significantly
easier to use with a syntax that feels more like a "real" programming
language. The second big reason is that Meson supports Rust natively,
which may prove to be important given that the project may pick up Rust
as another language eventually.

Using Meson is rather straight-forward. An example:

```
# Meson uses out-of-tree builds. You can set up multiple build
# directories, how you name them is completely up to you.
$ mkdir build
$ cd build
$ meson setup .. -Dprefix=/tmp/git-installation

# Build the project. This also provides several other targets like
e.g. `install` or `test`.
$ ninja

# Meson has been wired up to support execution of our test suites.
# Both our unit tests and our integration tests are supported.
# Running `meson test` without any arguments will execute all tests,
# but the syntax supports globbing to select only some tests.
$ meson test 't-*'
# Execute single test interactively to allow for debugging.
$ meson test 't0000-*' --interactive --test-args=-ix
```

The build instructions have been successfully tested on the following
systems, tests are passing:

- Apple macOS 10.15.

- FreeBSD 14.1.

- NixOS 24.11.

- OpenBSD 7.6.

- Ubuntu 24.04.

- Windows 10 with Cygwin.

- Windows 10 with MinGW64, except for t9700, which is also broken with
our Makefile.

- Windows 10 with Visual Studio 2022 toolchain, using the Native Tools
Command Prompt with `meson setup --vsenv`. Tests pass, except for
t9700.

- Windows 10 with Visual Studio 2022 solution, using the Native Tools
Command Prompt with `meson setup --backend vs2022`. Tests pass,
except for t9700.

- Windows 10 with VS Code, using the Meson plug-in.

It is expected that there will still be rough edges in the current
version. If this patch lands the expectation is that it will coexist
with our other build systems for a while. Like this, distributions can
slowly migrate over to Meson and report any findings they have to us
such that we can continue to iterate. A potential cutoff date for other
build systems may be Git 3.0.

Some notes:

- The installed distribution is structured somewhat differently than
how it used to be the case. All of our binaries are installed into
`$libexec/git-core`, while all binaries part of `$bindir` are now
symbolic links pointing to the former. This rule is consistent in
itself and thus easier to reason about.

- We do not install dashed binaries into `$libexec/git-core` anymore,
so there won't e.g. be a symlink for git-add(1). These are not
required by modern Git and there isn't really much of a use case for
those anymore. By not installing those symlinks we thus start the
deprecation of this layout.

- We're targeting Meson 1.3.0, which has been released relatively
recently November 2023. The only feature we use from that version is
`fs.relative_to()`, which we could replace if necessary. If so, we
could start to target Meson 1.0.0 and newer, released in December
2022.

- The whole build instructions count around 3300 lines, half of which
is listing all of our code and test files. Our Makefiles are around
5000 lines, autoconf adds another 1300 lines. CMake in comparison
has only 1200 linescode, but it avoids listing individual files and
does not wire up auto-configuration as extensively as the Meson
instructions do.

- We bundle a set of subproject wrappers for curl, expat, openssl,
pcre2 and zlib. This allows developers to build Git without these
dependencies preinstalled, and Meson will fetch and build them
automatically. This is especially helpful on Windows.

Helped-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
904339ed 00ab97b1

+3880
+324
Documentation/meson.build
··· 1 + manpages = { 2 + # Category 1. 3 + 'git-add.txt' : 1, 4 + 'git-am.txt' : 1, 5 + 'git-annotate.txt' : 1, 6 + 'git-apply.txt' : 1, 7 + 'git-archimport.txt' : 1, 8 + 'git-archive.txt' : 1, 9 + 'git-bisect.txt' : 1, 10 + 'git-blame.txt' : 1, 11 + 'git-branch.txt' : 1, 12 + 'git-bugreport.txt' : 1, 13 + 'git-bundle.txt' : 1, 14 + 'git-cat-file.txt' : 1, 15 + 'git-check-attr.txt' : 1, 16 + 'git-check-ignore.txt' : 1, 17 + 'git-check-mailmap.txt' : 1, 18 + 'git-checkout-index.txt' : 1, 19 + 'git-checkout.txt' : 1, 20 + 'git-check-ref-format.txt' : 1, 21 + 'git-cherry-pick.txt' : 1, 22 + 'git-cherry.txt' : 1, 23 + 'git-citool.txt' : 1, 24 + 'git-clean.txt' : 1, 25 + 'git-clone.txt' : 1, 26 + 'git-column.txt' : 1, 27 + 'git-commit-graph.txt' : 1, 28 + 'git-commit-tree.txt' : 1, 29 + 'git-commit.txt' : 1, 30 + 'git-config.txt' : 1, 31 + 'git-count-objects.txt' : 1, 32 + 'git-credential-cache--daemon.txt' : 1, 33 + 'git-credential-cache.txt' : 1, 34 + 'git-credential-store.txt' : 1, 35 + 'git-credential.txt' : 1, 36 + 'git-cvsexportcommit.txt' : 1, 37 + 'git-cvsimport.txt' : 1, 38 + 'git-cvsserver.txt' : 1, 39 + 'git-daemon.txt' : 1, 40 + 'git-describe.txt' : 1, 41 + 'git-diagnose.txt' : 1, 42 + 'git-diff-files.txt' : 1, 43 + 'git-diff-index.txt' : 1, 44 + 'git-difftool.txt' : 1, 45 + 'git-diff-tree.txt' : 1, 46 + 'git-diff.txt' : 1, 47 + 'git-fast-export.txt' : 1, 48 + 'git-fast-import.txt' : 1, 49 + 'git-fetch-pack.txt' : 1, 50 + 'git-fetch.txt' : 1, 51 + 'git-filter-branch.txt' : 1, 52 + 'git-fmt-merge-msg.txt' : 1, 53 + 'git-for-each-ref.txt' : 1, 54 + 'git-for-each-repo.txt' : 1, 55 + 'git-format-patch.txt' : 1, 56 + 'git-fsck-objects.txt' : 1, 57 + 'git-fsck.txt' : 1, 58 + 'git-fsmonitor--daemon.txt' : 1, 59 + 'git-gc.txt' : 1, 60 + 'git-get-tar-commit-id.txt' : 1, 61 + 'git-grep.txt' : 1, 62 + 'git-gui.txt' : 1, 63 + 'git-hash-object.txt' : 1, 64 + 'git-help.txt' : 1, 65 + 'git-hook.txt' : 1, 66 + 'git-http-backend.txt' : 1, 67 + 'git-http-fetch.txt' : 1, 68 + 'git-http-push.txt' : 1, 69 + 'git-imap-send.txt' : 1, 70 + 'git-index-pack.txt' : 1, 71 + 'git-init-db.txt' : 1, 72 + 'git-init.txt' : 1, 73 + 'git-instaweb.txt' : 1, 74 + 'git-interpret-trailers.txt' : 1, 75 + 'git-log.txt' : 1, 76 + 'git-ls-files.txt' : 1, 77 + 'git-ls-remote.txt' : 1, 78 + 'git-ls-tree.txt' : 1, 79 + 'git-mailinfo.txt' : 1, 80 + 'git-mailsplit.txt' : 1, 81 + 'git-maintenance.txt' : 1, 82 + 'git-merge-base.txt' : 1, 83 + 'git-merge-file.txt' : 1, 84 + 'git-merge-index.txt' : 1, 85 + 'git-merge-one-file.txt' : 1, 86 + 'git-mergetool--lib.txt' : 1, 87 + 'git-mergetool.txt' : 1, 88 + 'git-merge-tree.txt' : 1, 89 + 'git-merge.txt' : 1, 90 + 'git-mktag.txt' : 1, 91 + 'git-mktree.txt' : 1, 92 + 'git-multi-pack-index.txt' : 1, 93 + 'git-mv.txt' : 1, 94 + 'git-name-rev.txt' : 1, 95 + 'git-notes.txt' : 1, 96 + 'git-p4.txt' : 1, 97 + 'git-pack-objects.txt' : 1, 98 + 'git-pack-redundant.txt' : 1, 99 + 'git-pack-refs.txt' : 1, 100 + 'git-patch-id.txt' : 1, 101 + 'git-prune-packed.txt' : 1, 102 + 'git-prune.txt' : 1, 103 + 'git-pull.txt' : 1, 104 + 'git-push.txt' : 1, 105 + 'git-quiltimport.txt' : 1, 106 + 'git-range-diff.txt' : 1, 107 + 'git-read-tree.txt' : 1, 108 + 'git-rebase.txt' : 1, 109 + 'git-receive-pack.txt' : 1, 110 + 'git-reflog.txt' : 1, 111 + 'git-refs.txt' : 1, 112 + 'git-remote-ext.txt' : 1, 113 + 'git-remote-fd.txt' : 1, 114 + 'git-remote.txt' : 1, 115 + 'git-repack.txt' : 1, 116 + 'git-replace.txt' : 1, 117 + 'git-replay.txt' : 1, 118 + 'git-request-pull.txt' : 1, 119 + 'git-rerere.txt' : 1, 120 + 'git-reset.txt' : 1, 121 + 'git-restore.txt' : 1, 122 + 'git-revert.txt' : 1, 123 + 'git-rev-list.txt' : 1, 124 + 'git-rev-parse.txt' : 1, 125 + 'git-rm.txt' : 1, 126 + 'git-send-email.txt' : 1, 127 + 'git-send-pack.txt' : 1, 128 + 'git-shell.txt' : 1, 129 + 'git-sh-i18n--envsubst.txt' : 1, 130 + 'git-sh-i18n.txt' : 1, 131 + 'git-shortlog.txt' : 1, 132 + 'git-show-branch.txt' : 1, 133 + 'git-show-index.txt' : 1, 134 + 'git-show-ref.txt' : 1, 135 + 'git-show.txt' : 1, 136 + 'git-sh-setup.txt' : 1, 137 + 'git-sparse-checkout.txt' : 1, 138 + 'git-stage.txt' : 1, 139 + 'git-stash.txt' : 1, 140 + 'git-status.txt' : 1, 141 + 'git-stripspace.txt' : 1, 142 + 'git-submodule.txt' : 1, 143 + 'git-svn.txt' : 1, 144 + 'git-switch.txt' : 1, 145 + 'git-symbolic-ref.txt' : 1, 146 + 'git-tag.txt' : 1, 147 + 'git-unpack-file.txt' : 1, 148 + 'git-unpack-objects.txt' : 1, 149 + 'git-update-index.txt' : 1, 150 + 'git-update-ref.txt' : 1, 151 + 'git-update-server-info.txt' : 1, 152 + 'git-upload-archive.txt' : 1, 153 + 'git-upload-pack.txt' : 1, 154 + 'git-var.txt' : 1, 155 + 'git-verify-commit.txt' : 1, 156 + 'git-verify-pack.txt' : 1, 157 + 'git-verify-tag.txt' : 1, 158 + 'git-version.txt' : 1, 159 + 'git-web--browse.txt' : 1, 160 + 'git-whatchanged.txt' : 1, 161 + 'git-worktree.txt' : 1, 162 + 'git-write-tree.txt' : 1, 163 + 'git.txt' : 1, 164 + 'gitk.txt' : 1, 165 + 'gitweb.txt' : 1, 166 + 'scalar.txt' : 1, 167 + 168 + # Category 5. 169 + 'gitattributes.txt' : 5, 170 + 'gitformat-bundle.txt' : 5, 171 + 'gitformat-chunk.txt' : 5, 172 + 'gitformat-commit-graph.txt' : 5, 173 + 'gitformat-index.txt' : 5, 174 + 'gitformat-pack.txt' : 5, 175 + 'gitformat-signature.txt' : 5, 176 + 'githooks.txt' : 5, 177 + 'gitignore.txt' : 5, 178 + 'gitmailmap.txt' : 5, 179 + 'gitmodules.txt' : 5, 180 + 'gitprotocol-capabilities.txt' : 5, 181 + 'gitprotocol-common.txt' : 5, 182 + 'gitprotocol-http.txt' : 5, 183 + 'gitprotocol-pack.txt' : 5, 184 + 'gitprotocol-v2.txt' : 5, 185 + 'gitrepository-layout.txt' : 5, 186 + 'gitweb.conf.txt' : 5, 187 + 188 + # Category 7. 189 + 'gitcli.txt' : 7, 190 + 'gitcore-tutorial.txt' : 7, 191 + 'gitcredentials.txt' : 7, 192 + 'gitcvs-migration.txt' : 7, 193 + 'gitdiffcore.txt' : 7, 194 + 'giteveryday.txt' : 7, 195 + 'gitfaq.txt' : 7, 196 + 'gitglossary.txt' : 7, 197 + 'gitpacking.txt' : 7, 198 + 'gitnamespaces.txt' : 7, 199 + 'gitremote-helpers.txt' : 7, 200 + 'gitrevisions.txt' : 7, 201 + 'gitsubmodules.txt' : 7, 202 + 'gittutorial-2.txt' : 7, 203 + 'gittutorial.txt' : 7, 204 + 'gitworkflows.txt' : 7, 205 + } 206 + 207 + asciidoc = find_program('asciidoc') 208 + git = find_program('git', required: false) 209 + xmlto = find_program('xmlto') 210 + 211 + asciidoc_conf = custom_target( 212 + command: [ 213 + shell, 214 + meson.project_source_root() / 'GIT-VERSION-GEN', 215 + meson.project_source_root(), 216 + '@INPUT@', 217 + '@OUTPUT@', 218 + ], 219 + input: meson.current_source_dir() / 'asciidoc.conf.in', 220 + output: 'asciidoc.conf', 221 + depends: [git_version_file], 222 + ) 223 + 224 + asciidoc_common_options = [ 225 + asciidoc, 226 + '--conf-file=' + asciidoc_conf.full_path(), 227 + '--attribute=build_dir=' + meson.current_build_dir(), 228 + ] 229 + 230 + cmd_lists = [ 231 + 'cmds-ancillaryinterrogators.txt', 232 + 'cmds-ancillarymanipulators.txt', 233 + 'cmds-mainporcelain.txt', 234 + 'cmds-plumbinginterrogators.txt', 235 + 'cmds-plumbingmanipulators.txt', 236 + 'cmds-synchingrepositories.txt', 237 + 'cmds-synchelpers.txt', 238 + 'cmds-guide.txt', 239 + 'cmds-developerinterfaces.txt', 240 + 'cmds-userinterfaces.txt', 241 + 'cmds-purehelpers.txt', 242 + 'cmds-foreignscminterface.txt', 243 + ] 244 + 245 + documentation_deps = [ 246 + asciidoc_conf, 247 + ] 248 + 249 + documentation_deps += custom_target( 250 + command: [ 251 + perl, 252 + meson.current_source_dir() / 'cmd-list.perl', 253 + meson.project_source_root(), 254 + meson.current_build_dir(), 255 + ] + cmd_lists, 256 + output: cmd_lists 257 + ) 258 + 259 + foreach mode : [ 'diff', 'merge' ] 260 + documentation_deps += custom_target( 261 + command: [ 262 + shell, 263 + meson.current_source_dir() / 'generate-mergetool-list.sh', 264 + '..', 265 + 'diff', 266 + '@OUTPUT@' 267 + ], 268 + env: [ 269 + 'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools', 270 + 'TOOL_MODE=' + mode, 271 + ], 272 + output: 'mergetools-' + mode + '.txt', 273 + ) 274 + endforeach 275 + 276 + foreach manpage, category : manpages 277 + if get_option('docs').contains('man') 278 + manpage_xml_target = custom_target( 279 + command: asciidoc_common_options + [ 280 + '--backend=docbook', 281 + '--doctype=manpage', 282 + '--out-file=@OUTPUT@', 283 + meson.current_source_dir() / manpage, 284 + ], 285 + depends: documentation_deps, 286 + output: fs.stem(manpage) + '.xml', 287 + ) 288 + 289 + manpage_path = fs.stem(manpage) + '.' + category.to_string() 290 + manpage_target = custom_target( 291 + command: [ 292 + xmlto, 293 + '-m', 294 + meson.current_source_dir() / 'manpage-normal.xsl', 295 + '-m', 296 + meson.current_source_dir() / 'manpage-bold-literal.xsl', 297 + '--stringparam', 298 + 'man.base.url.for.relative.links=' + get_option('prefix') / get_option('mandir'), 299 + 'man', 300 + manpage_xml_target, 301 + '-o', 302 + meson.current_build_dir(), 303 + ], 304 + output: manpage_path, 305 + install: true, 306 + install_dir: get_option('mandir') / 'man' + category.to_string(), 307 + ) 308 + endif 309 + 310 + if get_option('docs').contains('html') and category == 1 311 + custom_target( 312 + command: asciidoc_common_options + [ 313 + '--backend=xhtml11', 314 + '--doctype=manpage', 315 + '--out-file=@OUTPUT@', 316 + meson.current_source_dir() / manpage, 317 + ], 318 + depends: documentation_deps, 319 + output: fs.stem(manpage) + '.html', 320 + install: true, 321 + install_dir: get_option('datadir') / 'doc/git-doc', 322 + ) 323 + endif 324 + endforeach
+28
bin-wrappers/meson.build
··· 1 + bin_wrappers_config = configuration_data() 2 + foreach key, value : { 3 + 'BUILD_DIR': meson.project_build_root(), 4 + 'MERGE_TOOLS_DIR': meson.project_source_root() / 'mergetools', 5 + 'TEMPLATE_DIR': meson.project_build_root() / 'templates', 6 + 'GIT_TEXTDOMAINDIR': meson.project_build_root() / 'po', 7 + 'GITPERLLIB': meson.project_build_root() / 'perl/lib', 8 + } 9 + # Paths need to be Unix-style without drive prefixes as they get added to the 10 + # PATH variable. And given that drive prefixes contain a colon we'd otherwise 11 + # end up with a broken PATH if we didn't convert them. 12 + if cygpath.found() 13 + value = run_command(cygpath, value, check: true).stdout().strip() 14 + endif 15 + bin_wrappers_config.set(key, value) 16 + endforeach 17 + 18 + foreach executable : bin_wrappers 19 + executable_config = configuration_data() 20 + executable_config.merge_from(bin_wrappers_config) 21 + executable_config.set('PROG', executable.full_path()) 22 + 23 + configure_file( 24 + input: 'wrap-for-bin.sh', 25 + output: fs.stem(executable.full_path()), 26 + configuration: executable_config, 27 + ) 28 + endforeach
+16
contrib/completion/meson.build
··· 1 + foreach script : [ 2 + 'git-completion.bash', 3 + 'git-completion.tcsh', 4 + 'git-completion.zsh', 5 + 'git-prompt.sh' 6 + ] 7 + if meson.version().version_compare('>=1.3.0') 8 + test_dependencies += fs.copyfile(script) 9 + else 10 + configure_file( 11 + input: script, 12 + output: script, 13 + copy: true, 14 + ) 15 + endif 16 + endforeach
+1
contrib/meson.build
··· 1 + subdir('completion')
+89
gitweb/meson.build
··· 1 + gitweb_config = configuration_data() 2 + gitweb_config.set_quoted('PERL_PATH', perl.full_path()) 3 + gitweb_config.set_quoted('CSSMIN', '') 4 + gitweb_config.set_quoted('JSMIN', '') 5 + gitweb_config.set_quoted('GIT_BINDIR', get_option('prefix') / get_option('bindir')) 6 + gitweb_config.set_quoted('GITWEB_CONFIG', get_option('gitweb_config')) 7 + gitweb_config.set_quoted('GITWEB_CONFIG_SYSTEM', get_option('gitweb_config_system')) 8 + gitweb_config.set_quoted('GITWEB_CONFIG_COMMON', get_option('gitweb_config_common')) 9 + gitweb_config.set_quoted('GITWEB_HOME_LINK_STR', get_option('gitweb_home_link_str')) 10 + gitweb_config.set_quoted('GITWEB_SITENAME', get_option('gitweb_sitename')) 11 + gitweb_config.set_quoted('GITWEB_PROJECTROOT', get_option('gitweb_projectroot')) 12 + gitweb_config.set_quoted('GITWEB_PROJECT_MAXDEPTH', get_option('gitweb_project_maxdepth')) 13 + gitweb_config.set_quoted('GITWEB_EXPORT_OK', get_option('gitweb_export_ok')) 14 + gitweb_config.set_quoted('GITWEB_STRICT_EXPORT', get_option('gitweb_strict_export')) 15 + gitweb_config.set_quoted('GITWEB_BASE_URL', get_option('gitweb_base_url')) 16 + gitweb_config.set_quoted('GITWEB_LIST', get_option('gitweb_list')) 17 + gitweb_config.set_quoted('GITWEB_HOMETEXT', get_option('gitweb_hometext')) 18 + gitweb_config.set_quoted('GITWEB_CSS', get_option('gitweb_css')) 19 + gitweb_config.set_quoted('GITWEB_LOGO', get_option('gitweb_logo')) 20 + gitweb_config.set_quoted('GITWEB_FAVICON', get_option('gitweb_favicon')) 21 + gitweb_config.set_quoted('GITWEB_JS', get_option('gitweb_js')) 22 + gitweb_config.set_quoted('GITWEB_SITE_HTML_HEAD_STRING', get_option('gitweb_site_html_head_string')) 23 + gitweb_config.set_quoted('GITWEB_SITE_HEADER', get_option('gitweb_site_header')) 24 + gitweb_config.set_quoted('GITWEB_SITE_FOOTER', get_option('gitweb_site_footer')) 25 + gitweb_config.set_quoted('HIGHLIGHT_BIN', get_option('highlight_bin')) 26 + 27 + configure_file( 28 + input: 'GITWEB-BUILD-OPTIONS.in', 29 + output: 'GITWEB-BUILD-OPTIONS', 30 + configuration: gitweb_config, 31 + ) 32 + 33 + test_dependencies += custom_target( 34 + input: 'gitweb.perl', 35 + output: 'gitweb.cgi', 36 + command: [ 37 + shell, 38 + meson.current_source_dir() / 'generate-gitweb-cgi.sh', 39 + meson.current_build_dir() / 'GITWEB-BUILD-OPTIONS', 40 + git_version_file.full_path(), 41 + '@INPUT@', 42 + '@OUTPUT@', 43 + ], 44 + install: true, 45 + install_dir: get_option('datadir') / 'gitweb', 46 + depends: [git_version_file], 47 + ) 48 + 49 + javascript_files = [ 50 + meson.current_source_dir() / 'static/js/adjust-timezone.js', 51 + meson.current_source_dir() / 'static/js/blame_incremental.js', 52 + meson.current_source_dir() / 'static/js/javascript-detection.js', 53 + meson.current_source_dir() / 'static/js/lib/common-lib.js', 54 + meson.current_source_dir() / 'static/js/lib/cookies.js', 55 + meson.current_source_dir() / 'static/js/lib/datetime.js', 56 + ] 57 + 58 + test_dependencies += custom_target( 59 + input: javascript_files, 60 + output: 'gitweb.js', 61 + command: [ 62 + shell, 63 + meson.current_source_dir() / 'generate-gitweb-js.sh', 64 + '@OUTPUT@', 65 + ] + javascript_files, 66 + install: true, 67 + install_dir: get_option('datadir') / 'gitweb/static', 68 + ) 69 + 70 + foreach asset : [ 71 + 'static/git-favicon.png', 72 + 'static/git-logo.png', 73 + 'static/gitweb.css', 74 + ] 75 + if meson.version().version_compare('>=1.3.0') 76 + fs.copyfile(asset, 77 + install: true, 78 + install_dir: get_option('datadir') / 'gitweb' / fs.parent(asset), 79 + ) 80 + else 81 + configure_file( 82 + input: asset, 83 + output: fs.stem(asset), 84 + copy: true, 85 + install: true, 86 + install_dir: get_option('datadir') / 'gitweb' / fs.parent(asset), 87 + ) 88 + endif 89 + endforeach
+1901
meson.build
··· 1 + # Meson build system 2 + # ================== 3 + # 4 + # The Meson build system is an alternative to our Makefile that you can use to 5 + # build, test and install Git. Using Meson results in a couple of benefits: 6 + # 7 + # - Out-of-tree builds. 8 + # - Better integration into IDEs. 9 + # - Easy-to-use autoconfiguration of available features on your system. 10 + # 11 + # To use Meson from the command line you need to have both Meson and Ninja 12 + # installed. Alternatively, if you do not have Python available on your system, 13 + # you can also use Muon instead of Meson and Samurai instead of Ninja, both of 14 + # which are drop-ins replacement that only depend on C. 15 + # 16 + # Basic usage 17 + # =========== 18 + # 19 + # In the most trivial case, you can configure, build and install Git like this: 20 + # 21 + # 1. Set up the build directory. This only needs to happen once per build 22 + # directory you want to have. You can also configure multiple different 23 + # build directories with different configurations. 24 + # 25 + # $ meson setup build/ 26 + # 27 + # The build directory gets ignored by Git automatically as Meson will write 28 + # a ".gitignore" file into it. From hereon, we will assume that you execute 29 + # commands inside this build directory. 30 + # 31 + # 2. Compile Git. You can either use Meson, Ninja or Samurai to do this, so all 32 + # of the following invocations are equivalent: 33 + # 34 + # $ meson compile 35 + # $ ninja 36 + # $ samu 37 + # 38 + # The different invocations should ultimately not make much of a difference. 39 + # Using Meson also works with other generators though, like when the build 40 + # directory has been set up for use with Microsoft Visual Studio. 41 + # 42 + # Ninja and Samurai use multiple jobs by default, scaling with the number of 43 + # processor cores available. You can pass the `-jN` flag to change this. 44 + # 45 + # Meson automatically picks up ccache and sccache when these are installed 46 + # when setting up the build directory. You can override this behaviour when 47 + # setting up the build directory by setting the `CC` environment variable to 48 + # your desired compiler. 49 + # 50 + # 3. Execute tests. Again, you can either use Meson, Ninja or Samurai to do this: 51 + # 52 + # $ meson test 53 + # $ ninja test 54 + # $ samu test 55 + # 56 + # It is recommended to use Meson in this case though as it also provides you 57 + # additional features that the other build systems don't have available. 58 + # You can e.g. pass additional arguments to the test executables or run 59 + # individual tests: 60 + # 61 + # # Execute the t0000-basic integration test and t-reftable-stack unit test. 62 + # $ meson test t0000-basic t-reftable-stack 63 + # 64 + # # Execute all reftable unit tests. 65 + # $ meson test t-reftable-* 66 + # 67 + # # Execute all tests and stop with the first failure. 68 + # $ meson test --maxfail 1 69 + # 70 + # # Execute single test interactively such that features like `debug ()` work. 71 + # $ meson test -i --test-args='-ix' t1400-update-ref 72 + # 73 + # Test execution is parallelized by default and scales with the number of 74 + # processor cores available. You can change the number of processes by passing 75 + # the `-jN` flag to `meson test`. 76 + # 77 + # 4. Install the Git distribution. Again, this can be done via Meson, Ninja or 78 + # Samurai: 79 + # 80 + # $ meson install 81 + # $ ninja install 82 + # $ samu install 83 + # 84 + # The prefix into which Git shall be installed is defined when setting up 85 + # the build directory. More on that in the "Configuration" section. 86 + # 87 + # Meson supports multiple backends. The default backend generates Ninja build 88 + # instructions, but it also supports the generation of Microsoft Visual 89 + # Studio solutions as well as Xcode projects by passing the `--backend` option 90 + # to `meson setup`. IDEs like Eclipse and Visual Studio Code provide plugins to 91 + # import Meson files directly. 92 + # 93 + # Configuration 94 + # ============= 95 + # 96 + # The exact configuration of Git is determined when setting up the build 97 + # directory via `meson setup`. Unless told otherwise, Meson will automatically 98 + # detect the availability of various bits and pieces. There are two different 99 + # kinds of options that can be used to further tweak the build: 100 + # 101 + # - Built-in options provided by Meson. 102 + # 103 + # - Options defined by the project in the "meson_options.txt" file. 104 + # 105 + # Both kinds of options can be inspected by running `meson configure` in the 106 + # build directory, which will give you a list of the current value for all 107 + # options. 108 + # 109 + # Options can be configured either when setting up the build directory or can 110 + # be changed in preexisting build directories: 111 + # 112 + # # Set up a new build directory with optimized settings that will be 113 + # # installed into an alternative prefix. 114 + # $ meson setup --buildtype release --optimization 3 --strip --prefix=/home/$USER build 115 + # 116 + # # Set up a new build directory with a higher warning level. Level 2 is 117 + # # mostly equivalent to setting DEVELOPER=1, level 3 and "everything" 118 + # # will enable even more warnings. 119 + # $ meson setup -Dwarning_level=2 build 120 + # 121 + # # Set up a new build directory with 'address' and 'undefined' sanitizers 122 + # # using Clang. 123 + # $ CC=clang meson setup -Db_sanitize=address,undefined build 124 + # 125 + # # Disable tests in a preexisting build directory. 126 + # $ meson configure -Dtests=false 127 + # 128 + # # Disable features based on Python 129 + # $ meson configure -Dpython=disabled 130 + # 131 + # Options have a type like booleans, choices, strings or features. Features are 132 + # somewhat special as they can have one of three values: enabled, disabled or 133 + # auto. While the first two values are self-explanatory, "auto" will enable or 134 + # disable the feature based on the availability of prerequisites to support it. 135 + # Python-based features for example will be enabled automatically when a Python 136 + # interpreter could be found. The default value of such features can be changed 137 + # via `meson setup --auto-features={enabled,disabled,auto}`, which will set the 138 + # value of all features with a value of "auto" to the provided one by default. 139 + # 140 + # It is also possible to store a set of configuration options in machine files. 141 + # This can be useful in case you regularly want to reuse the same set of options: 142 + # 143 + # [binaries] 144 + # c = ['clang'] 145 + # ar = ['ar'] 146 + # 147 + # [project options] 148 + # gettext = 'disabled' 149 + # default_editor = 'vim' 150 + # 151 + # [built-in options] 152 + # b_lto = true 153 + # b_sanitize = 'address,undefined' 154 + # 155 + # These machine files can be passed to `meson setup` via the `--native-file` 156 + # option. 157 + # 158 + # Subproject wrappers 159 + # =================== 160 + # 161 + # Subproject wrappers are a feature provided by Meson that allows the automatic 162 + # fallback to a "wrapped" dependency in case the dependency is not provided by 163 + # the system. For example if the system is lacking curl, then Meson will use 164 + # "subprojects/curl.wrap" to set up curl as a subproject and compile and link 165 + # the dependency into Git itself. This is especially helpful on systems like 166 + # Windows, where you typically don't have such dependencies installed. 167 + # 168 + # The use of subproject wrappers can be disabled by executing `meson setup` 169 + # with the `--wrap-mode nofallback` option. 170 + 171 + project('git', 'c', 172 + meson_version: '>=0.61.0', 173 + version: 'v2.47.GIT', 174 + ) 175 + 176 + fs = import('fs') 177 + 178 + program_path = [] 179 + # Git for Windows provides all the tools we need to build Git. 180 + if host_machine.system() == 'windows' 181 + program_path += [ 'C:/Program Files/Git/bin', 'C:/Program Files/Git/usr/bin' ] 182 + endif 183 + 184 + cygpath = find_program('cygpath', dirs: program_path, required: false) 185 + diff = find_program('diff', dirs: program_path) 186 + shell = find_program('sh', dirs: program_path) 187 + tar = find_program('tar', dirs: program_path) 188 + 189 + script_environment = environment() 190 + foreach tool : ['cat', 'cut', 'grep', 'sed', 'sort', 'tr', 'uname'] 191 + program = find_program(tool, dirs: program_path) 192 + script_environment.prepend('PATH', fs.parent(program.full_path())) 193 + endforeach 194 + 195 + git = find_program('git', dirs: program_path, required: false) 196 + if git.found() 197 + script_environment.prepend('PATH', fs.parent(git.full_path())) 198 + endif 199 + 200 + if get_option('sane_tool_path') != '' 201 + script_environment.prepend('PATH', get_option('sane_tool_path')) 202 + endif 203 + 204 + compiler = meson.get_compiler('c') 205 + 206 + libgit_sources = [ 207 + 'abspath.c', 208 + 'add-interactive.c', 209 + 'add-patch.c', 210 + 'advice.c', 211 + 'alias.c', 212 + 'alloc.c', 213 + 'apply.c', 214 + 'archive-tar.c', 215 + 'archive-zip.c', 216 + 'archive.c', 217 + 'attr.c', 218 + 'base85.c', 219 + 'bisect.c', 220 + 'blame.c', 221 + 'blob.c', 222 + 'bloom.c', 223 + 'branch.c', 224 + 'bulk-checkin.c', 225 + 'bundle-uri.c', 226 + 'bundle.c', 227 + 'cache-tree.c', 228 + 'cbtree.c', 229 + 'chdir-notify.c', 230 + 'checkout.c', 231 + 'chunk-format.c', 232 + 'color.c', 233 + 'column.c', 234 + 'combine-diff.c', 235 + 'commit-graph.c', 236 + 'commit-reach.c', 237 + 'commit.c', 238 + 'compat/nonblock.c', 239 + 'compat/obstack.c', 240 + 'compat/terminal.c', 241 + 'compat/zlib-uncompress2.c', 242 + 'config.c', 243 + 'connect.c', 244 + 'connected.c', 245 + 'convert.c', 246 + 'copy.c', 247 + 'credential.c', 248 + 'csum-file.c', 249 + 'ctype.c', 250 + 'date.c', 251 + 'decorate.c', 252 + 'delta-islands.c', 253 + 'diagnose.c', 254 + 'diff-delta.c', 255 + 'diff-merges.c', 256 + 'diff-lib.c', 257 + 'diff-no-index.c', 258 + 'diff.c', 259 + 'diffcore-break.c', 260 + 'diffcore-delta.c', 261 + 'diffcore-order.c', 262 + 'diffcore-pickaxe.c', 263 + 'diffcore-rename.c', 264 + 'diffcore-rotate.c', 265 + 'dir-iterator.c', 266 + 'dir.c', 267 + 'editor.c', 268 + 'entry.c', 269 + 'environment.c', 270 + 'ewah/bitmap.c', 271 + 'ewah/ewah_bitmap.c', 272 + 'ewah/ewah_io.c', 273 + 'ewah/ewah_rlw.c', 274 + 'exec-cmd.c', 275 + 'fetch-negotiator.c', 276 + 'fetch-pack.c', 277 + 'fmt-merge-msg.c', 278 + 'fsck.c', 279 + 'fsmonitor.c', 280 + 'fsmonitor-ipc.c', 281 + 'fsmonitor-settings.c', 282 + 'gettext.c', 283 + 'git-zlib.c', 284 + 'gpg-interface.c', 285 + 'graph.c', 286 + 'grep.c', 287 + 'hash-lookup.c', 288 + 'hashmap.c', 289 + 'help.c', 290 + 'hex.c', 291 + 'hex-ll.c', 292 + 'hook.c', 293 + 'ident.c', 294 + 'json-writer.c', 295 + 'kwset.c', 296 + 'levenshtein.c', 297 + 'line-log.c', 298 + 'line-range.c', 299 + 'linear-assignment.c', 300 + 'list-objects-filter-options.c', 301 + 'list-objects-filter.c', 302 + 'list-objects.c', 303 + 'lockfile.c', 304 + 'log-tree.c', 305 + 'loose.c', 306 + 'ls-refs.c', 307 + 'mailinfo.c', 308 + 'mailmap.c', 309 + 'match-trees.c', 310 + 'mem-pool.c', 311 + 'merge-blobs.c', 312 + 'merge-ll.c', 313 + 'merge-ort.c', 314 + 'merge-ort-wrappers.c', 315 + 'merge-recursive.c', 316 + 'merge.c', 317 + 'midx.c', 318 + 'midx-write.c', 319 + 'name-hash.c', 320 + 'negotiator/default.c', 321 + 'negotiator/noop.c', 322 + 'negotiator/skipping.c', 323 + 'notes-cache.c', 324 + 'notes-merge.c', 325 + 'notes-utils.c', 326 + 'notes.c', 327 + 'object-file-convert.c', 328 + 'object-file.c', 329 + 'object-name.c', 330 + 'object.c', 331 + 'oid-array.c', 332 + 'oidmap.c', 333 + 'oidset.c', 334 + 'oidtree.c', 335 + 'pack-bitmap-write.c', 336 + 'pack-bitmap.c', 337 + 'pack-check.c', 338 + 'pack-mtimes.c', 339 + 'pack-objects.c', 340 + 'pack-revindex.c', 341 + 'pack-write.c', 342 + 'packfile.c', 343 + 'pager.c', 344 + 'parallel-checkout.c', 345 + 'parse.c', 346 + 'parse-options-cb.c', 347 + 'parse-options.c', 348 + 'patch-delta.c', 349 + 'patch-ids.c', 350 + 'path.c', 351 + 'pathspec.c', 352 + 'pkt-line.c', 353 + 'preload-index.c', 354 + 'pretty.c', 355 + 'prio-queue.c', 356 + 'progress.c', 357 + 'promisor-remote.c', 358 + 'prompt.c', 359 + 'protocol.c', 360 + 'protocol-caps.c', 361 + 'prune-packed.c', 362 + 'pseudo-merge.c', 363 + 'quote.c', 364 + 'range-diff.c', 365 + 'reachable.c', 366 + 'read-cache.c', 367 + 'rebase-interactive.c', 368 + 'rebase.c', 369 + 'ref-filter.c', 370 + 'reflog-walk.c', 371 + 'reflog.c', 372 + 'refs.c', 373 + 'refs/debug.c', 374 + 'refs/files-backend.c', 375 + 'refs/reftable-backend.c', 376 + 'refs/iterator.c', 377 + 'refs/packed-backend.c', 378 + 'refs/ref-cache.c', 379 + 'refspec.c', 380 + 'reftable/basics.c', 381 + 'reftable/error.c', 382 + 'reftable/block.c', 383 + 'reftable/blocksource.c', 384 + 'reftable/iter.c', 385 + 'reftable/merged.c', 386 + 'reftable/pq.c', 387 + 'reftable/reader.c', 388 + 'reftable/record.c', 389 + 'reftable/stack.c', 390 + 'reftable/system.c', 391 + 'reftable/tree.c', 392 + 'reftable/writer.c', 393 + 'remote.c', 394 + 'replace-object.c', 395 + 'repo-settings.c', 396 + 'repository.c', 397 + 'rerere.c', 398 + 'reset.c', 399 + 'resolve-undo.c', 400 + 'revision.c', 401 + 'run-command.c', 402 + 'send-pack.c', 403 + 'sequencer.c', 404 + 'serve.c', 405 + 'server-info.c', 406 + 'setup.c', 407 + 'shallow.c', 408 + 'sideband.c', 409 + 'sigchain.c', 410 + 'sparse-index.c', 411 + 'split-index.c', 412 + 'stable-qsort.c', 413 + 'statinfo.c', 414 + 'strbuf.c', 415 + 'streaming.c', 416 + 'string-list.c', 417 + 'strmap.c', 418 + 'strvec.c', 419 + 'sub-process.c', 420 + 'submodule-config.c', 421 + 'submodule.c', 422 + 'symlinks.c', 423 + 'tag.c', 424 + 'tempfile.c', 425 + 'thread-utils.c', 426 + 'tmp-objdir.c', 427 + 'trace.c', 428 + 'trace2.c', 429 + 'trace2/tr2_cfg.c', 430 + 'trace2/tr2_cmd_name.c', 431 + 'trace2/tr2_ctr.c', 432 + 'trace2/tr2_dst.c', 433 + 'trace2/tr2_sid.c', 434 + 'trace2/tr2_sysenv.c', 435 + 'trace2/tr2_tbuf.c', 436 + 'trace2/tr2_tgt_event.c', 437 + 'trace2/tr2_tgt_normal.c', 438 + 'trace2/tr2_tgt_perf.c', 439 + 'trace2/tr2_tls.c', 440 + 'trace2/tr2_tmr.c', 441 + 'trailer.c', 442 + 'transport-helper.c', 443 + 'transport.c', 444 + 'tree-diff.c', 445 + 'tree-walk.c', 446 + 'tree.c', 447 + 'unpack-trees.c', 448 + 'upload-pack.c', 449 + 'url.c', 450 + 'urlmatch.c', 451 + 'usage.c', 452 + 'userdiff.c', 453 + 'utf8.c', 454 + 'varint.c', 455 + 'versioncmp.c', 456 + 'walker.c', 457 + 'wildmatch.c', 458 + 'worktree.c', 459 + 'wrapper.c', 460 + 'write-or-die.c', 461 + 'ws.c', 462 + 'wt-status.c', 463 + 'xdiff-interface.c', 464 + 'xdiff/xdiffi.c', 465 + 'xdiff/xemit.c', 466 + 'xdiff/xhistogram.c', 467 + 'xdiff/xmerge.c', 468 + 'xdiff/xpatience.c', 469 + 'xdiff/xprepare.c', 470 + 'xdiff/xutils.c', 471 + ] 472 + 473 + builtin_sources = [ 474 + 'builtin/add.c', 475 + 'builtin/am.c', 476 + 'builtin/annotate.c', 477 + 'builtin/apply.c', 478 + 'builtin/archive.c', 479 + 'builtin/bisect.c', 480 + 'builtin/blame.c', 481 + 'builtin/branch.c', 482 + 'builtin/bugreport.c', 483 + 'builtin/bundle.c', 484 + 'builtin/cat-file.c', 485 + 'builtin/check-attr.c', 486 + 'builtin/check-ignore.c', 487 + 'builtin/check-mailmap.c', 488 + 'builtin/check-ref-format.c', 489 + 'builtin/checkout--worker.c', 490 + 'builtin/checkout-index.c', 491 + 'builtin/checkout.c', 492 + 'builtin/clean.c', 493 + 'builtin/clone.c', 494 + 'builtin/column.c', 495 + 'builtin/commit-graph.c', 496 + 'builtin/commit-tree.c', 497 + 'builtin/commit.c', 498 + 'builtin/config.c', 499 + 'builtin/count-objects.c', 500 + 'builtin/credential-cache--daemon.c', 501 + 'builtin/credential-cache.c', 502 + 'builtin/credential-store.c', 503 + 'builtin/credential.c', 504 + 'builtin/describe.c', 505 + 'builtin/diagnose.c', 506 + 'builtin/diff-files.c', 507 + 'builtin/diff-index.c', 508 + 'builtin/diff-tree.c', 509 + 'builtin/diff.c', 510 + 'builtin/difftool.c', 511 + 'builtin/fast-export.c', 512 + 'builtin/fast-import.c', 513 + 'builtin/fetch-pack.c', 514 + 'builtin/fetch.c', 515 + 'builtin/fmt-merge-msg.c', 516 + 'builtin/for-each-ref.c', 517 + 'builtin/for-each-repo.c', 518 + 'builtin/fsck.c', 519 + 'builtin/fsmonitor--daemon.c', 520 + 'builtin/gc.c', 521 + 'builtin/get-tar-commit-id.c', 522 + 'builtin/grep.c', 523 + 'builtin/hash-object.c', 524 + 'builtin/help.c', 525 + 'builtin/hook.c', 526 + 'builtin/index-pack.c', 527 + 'builtin/init-db.c', 528 + 'builtin/interpret-trailers.c', 529 + 'builtin/log.c', 530 + 'builtin/ls-files.c', 531 + 'builtin/ls-remote.c', 532 + 'builtin/ls-tree.c', 533 + 'builtin/mailinfo.c', 534 + 'builtin/mailsplit.c', 535 + 'builtin/merge-base.c', 536 + 'builtin/merge-file.c', 537 + 'builtin/merge-index.c', 538 + 'builtin/merge-ours.c', 539 + 'builtin/merge-recursive.c', 540 + 'builtin/merge-tree.c', 541 + 'builtin/merge.c', 542 + 'builtin/mktag.c', 543 + 'builtin/mktree.c', 544 + 'builtin/multi-pack-index.c', 545 + 'builtin/mv.c', 546 + 'builtin/name-rev.c', 547 + 'builtin/notes.c', 548 + 'builtin/pack-objects.c', 549 + 'builtin/pack-redundant.c', 550 + 'builtin/pack-refs.c', 551 + 'builtin/patch-id.c', 552 + 'builtin/prune-packed.c', 553 + 'builtin/prune.c', 554 + 'builtin/pull.c', 555 + 'builtin/push.c', 556 + 'builtin/range-diff.c', 557 + 'builtin/read-tree.c', 558 + 'builtin/rebase.c', 559 + 'builtin/receive-pack.c', 560 + 'builtin/reflog.c', 561 + 'builtin/refs.c', 562 + 'builtin/remote-ext.c', 563 + 'builtin/remote-fd.c', 564 + 'builtin/remote.c', 565 + 'builtin/repack.c', 566 + 'builtin/replace.c', 567 + 'builtin/replay.c', 568 + 'builtin/rerere.c', 569 + 'builtin/reset.c', 570 + 'builtin/rev-list.c', 571 + 'builtin/rev-parse.c', 572 + 'builtin/revert.c', 573 + 'builtin/rm.c', 574 + 'builtin/send-pack.c', 575 + 'builtin/shortlog.c', 576 + 'builtin/show-branch.c', 577 + 'builtin/show-index.c', 578 + 'builtin/show-ref.c', 579 + 'builtin/sparse-checkout.c', 580 + 'builtin/stash.c', 581 + 'builtin/stripspace.c', 582 + 'builtin/submodule--helper.c', 583 + 'builtin/symbolic-ref.c', 584 + 'builtin/tag.c', 585 + 'builtin/unpack-file.c', 586 + 'builtin/unpack-objects.c', 587 + 'builtin/update-index.c', 588 + 'builtin/update-ref.c', 589 + 'builtin/update-server-info.c', 590 + 'builtin/upload-archive.c', 591 + 'builtin/upload-pack.c', 592 + 'builtin/var.c', 593 + 'builtin/verify-commit.c', 594 + 'builtin/verify-pack.c', 595 + 'builtin/verify-tag.c', 596 + 'builtin/worktree.c', 597 + 'builtin/write-tree.c', 598 + ] 599 + 600 + libgit_sources += custom_target( 601 + input: 'command-list.txt', 602 + output: 'command-list.h', 603 + command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'], 604 + env: script_environment, 605 + ) 606 + 607 + libgit_sources += custom_target( 608 + output: 'config-list.h', 609 + command: [ 610 + shell, 611 + meson.current_source_dir() + '/generate-configlist.sh', 612 + meson.current_source_dir(), 613 + '@OUTPUT@', 614 + ], 615 + env: script_environment, 616 + ) 617 + 618 + libgit_sources += custom_target( 619 + input: 'Documentation/githooks.txt', 620 + output: 'hook-list.h', 621 + command: [ 622 + shell, 623 + meson.current_source_dir() + '/generate-hooklist.sh', 624 + meson.current_source_dir(), 625 + '@OUTPUT@', 626 + ], 627 + env: script_environment, 628 + ) 629 + 630 + # This contains the variables for GIT-BUILD-OPTIONS, which we use to propagate 631 + # build options to our tests. 632 + build_options_config = configuration_data() 633 + build_options_config.set('GIT_INTEROP_MAKE_OPTS', '') 634 + build_options_config.set('GIT_PERF_LARGE_REPO', '') 635 + build_options_config.set('GIT_PERF_MAKE_COMMAND', '') 636 + build_options_config.set('GIT_PERF_MAKE_OPTS', '') 637 + build_options_config.set('GIT_PERF_REPEAT_COUNT', '') 638 + build_options_config.set('GIT_PERF_REPO', '') 639 + build_options_config.set('GIT_TEST_CMP_USE_COPIED_CONTEXT', '') 640 + build_options_config.set('GIT_TEST_INDEX_VERSION', '') 641 + build_options_config.set('GIT_TEST_OPTS', '') 642 + build_options_config.set('GIT_TEST_PERL_FATAL_WARNINGS', '') 643 + build_options_config.set('GIT_TEST_UTF8_LOCALE', '') 644 + build_options_config.set_quoted('LOCALEDIR', fs.as_posix(get_option('prefix') / get_option('localedir'))) 645 + build_options_config.set('GITWEBDIR', fs.as_posix(get_option('prefix') / get_option('datadir') / 'gitweb')) 646 + 647 + if get_option('sane_tool_path') != '' 648 + build_options_config.set_quoted('BROKEN_PATH_FIX', 's|^\# @BROKEN_PATH_FIX@$|git_broken_path_fix "' + get_option('sane_tool_path') + '"|') 649 + else 650 + build_options_config.set_quoted('BROKEN_PATH_FIX', '/^\# @BROKEN_PATH_FIX@$/d') 651 + endif 652 + 653 + test_output_directory = get_option('test_output_directory') 654 + if test_output_directory == '' 655 + test_output_directory = meson.project_build_root() / 'test-output' 656 + endif 657 + 658 + # These variables are used for building libgit.a. 659 + libgit_c_args = [ 660 + '-DBINDIR="' + get_option('bindir') + '"', 661 + '-DDEFAULT_EDITOR="' + get_option('default_editor') + '"', 662 + '-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"', 663 + '-DDEFAULT_HELP_FORMAT="' + get_option('default_help_format') + '"', 664 + '-DDEFAULT_PAGER="' + get_option('default_pager') + '"', 665 + '-DETC_GITATTRIBUTES="' + get_option('gitattributes') + '"', 666 + '-DETC_GITCONFIG="' + get_option('gitconfig') + '"', 667 + '-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"', 668 + '-DGIT_EXEC_PATH="' + get_option('prefix') / get_option('libexecdir') / 'git-core"', 669 + '-DGIT_HOST_CPU="' + host_machine.cpu_family() + '"', 670 + '-DGIT_HTML_PATH="' + get_option('datadir') / 'doc/git-doc"', 671 + '-DGIT_INFO_PATH="' + get_option('infodir') + '"', 672 + '-DGIT_LOCALE_PATH="' + get_option('localedir') + '"', 673 + '-DGIT_MAN_PATH="' + get_option('mandir') + '"', 674 + '-DPAGER_ENV="' + get_option('pager_environment') + '"', 675 + '-DSHELL_PATH="' + fs.as_posix(shell.full_path()) + '"', 676 + ] 677 + libgit_include_directories = [ '.' ] 678 + libgit_dependencies = [ ] 679 + 680 + # Treat any warning level above 1 the same as we treat DEVELOPER=1 in our 681 + # Makefile. 682 + if get_option('warning_level') in ['2','3', 'everything'] and compiler.get_argument_syntax() == 'gcc' 683 + foreach cflag : [ 684 + '-Wdeclaration-after-statement', 685 + '-Wformat-security', 686 + '-Wold-style-definition', 687 + '-Woverflow', 688 + '-Wpointer-arith', 689 + '-Wstrict-prototypes', 690 + '-Wunused', 691 + '-Wvla', 692 + '-Wwrite-strings', 693 + '-fno-common', 694 + '-Wtautological-constant-out-of-range-compare', 695 + # If a function is public, there should be a prototype and the right 696 + # header file should be included. If not, it should be static. 697 + '-Wmissing-prototypes', 698 + # These are disabled because we have these all over the place. 699 + '-Wno-empty-body', 700 + '-Wno-missing-field-initializers', 701 + '-Wno-sign-compare', 702 + ] 703 + if compiler.has_argument(cflag) 704 + libgit_c_args += cflag 705 + endif 706 + endforeach 707 + endif 708 + 709 + if get_option('b_sanitize').contains('address') 710 + build_options_config.set('SANITIZE_ADDRESS', 'YesCompiledWithIt') 711 + else 712 + build_options_config.set('SANITIZE_ADDRESS', '') 713 + endif 714 + if get_option('b_sanitize').contains('leak') 715 + libgit_c_args += '-DSUPPRESS_ANNOTATED_LEAKS' 716 + build_options_config.set('SANITIZE_LEAK', 'YesCompiledWithIt') 717 + else 718 + build_options_config.set('SANITIZE_LEAK', '') 719 + endif 720 + if get_option('b_sanitize').contains('undefined') 721 + libgit_c_args += '-DSHA1DC_FORCE_ALIGNED_ACCESS' 722 + endif 723 + 724 + executable_suffix = '' 725 + if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' 726 + executable_suffix = '.exe' 727 + libgit_c_args += '-DSTRIP_EXTENSION="' + executable_suffix + '"' 728 + endif 729 + build_options_config.set_quoted('X', executable_suffix) 730 + 731 + python = import('python').find_installation('python3', required: get_option('python')) 732 + if python.found() 733 + build_options_config.set('NO_PYTHON', '') 734 + else 735 + libgit_c_args += '-DNO_PYTHON' 736 + build_options_config.set('NO_PYTHON', '1') 737 + endif 738 + 739 + # Perl is used for two different things: our test harness and to provide some 740 + # features. It is optional if you want to neither execute tests nor use any of 741 + # these optional features. 742 + perl_required = get_option('perl') 743 + if get_option('tests') 744 + perl_required = true 745 + endif 746 + 747 + # Note that we only set NO_PERL if the Perl features were disabled by the user. 748 + # It may not be set when we have found Perl, but only use it to run tests. 749 + perl = find_program('perl', version: '>=5.8.1', dirs: program_path, required: perl_required) 750 + perl_features_enabled = perl.found() and get_option('perl').allowed() 751 + if perl_features_enabled 752 + build_options_config.set('NO_PERL', '') 753 + 754 + if get_option('runtime_prefix') 755 + build_options_config.set('PERL_LOCALEDIR', '') 756 + else 757 + build_options_config.set_quoted('PERL_LOCALEDIR', fs.as_posix(get_option('prefix') / get_option('localedir'))) 758 + endif 759 + 760 + if get_option('perl_cpan_fallback') 761 + build_options_config.set('NO_PERL_CPAN_FALLBACKS', '') 762 + else 763 + build_options_config.set_quoted('NO_PERL_CPAN_FALLBACKS', 'YesPlease') 764 + endif 765 + else 766 + libgit_c_args += '-DNO_PERL' 767 + build_options_config.set('NO_PERL', '1') 768 + build_options_config.set('PERL_LOCALEDIR', '') 769 + build_options_config.set('NO_PERL_CPAN_FALLBACKS', '') 770 + endif 771 + 772 + zlib = dependency('zlib', default_options: ['default_library=static', 'tests=disabled']) 773 + if zlib.version().version_compare('<1.2.0') 774 + libgit_c_args += '-DNO_DEFLATE_BOUND' 775 + endif 776 + libgit_dependencies += zlib 777 + 778 + threads = dependency('threads', required: false) 779 + if threads.found() 780 + libgit_dependencies += threads 781 + build_options_config.set('NO_PTHREADS', '') 782 + else 783 + libgit_c_args += '-DNO_PTHREADS' 784 + build_options_config.set('NO_PTHREADS', '1') 785 + endif 786 + 787 + msgfmt = find_program('msgfmt', dirs: program_path, required: false) 788 + gettext_option = get_option('gettext').disable_auto_if(not msgfmt.found()) 789 + if not msgfmt.found() and gettext_option.enabled() 790 + error('Internationalization via libintl requires msgfmt') 791 + endif 792 + 793 + if gettext_option.allowed() and host_machine.system() == 'darwin' and get_option('macos_use_homebrew_gettext') 794 + if host_machine.cpu_family() == 'x86_64' 795 + libintl_prefix = '/usr/local' 796 + elif host_machine.cpu_family() == 'aarch64' 797 + libintl_prefix = '/opt/homebrew' 798 + else 799 + error('Homebrew workaround not supported on current architecture') 800 + endif 801 + 802 + intl = compiler.find_library('intl', dirs: libintl_prefix / 'lib', required: gettext_option) 803 + if intl.found() 804 + intl = declare_dependency( 805 + dependencies: intl, 806 + include_directories: libintl_prefix / 'include', 807 + ) 808 + endif 809 + else 810 + intl = dependency('intl', required: gettext_option) 811 + endif 812 + if intl.found() 813 + libgit_dependencies += intl 814 + build_options_config.set('NO_GETTEXT', '') 815 + build_options_config.set('USE_GETTEXT_SCHEME', '') 816 + 817 + # POSIX nowadays requires `nl_langinfo()`, but some systems still don't have 818 + # the function available. On such systems we instead fall back to libcharset. 819 + # On native Windows systems we use our own emulation. 820 + if host_machine.system() != 'windows' and not compiler.has_function('nl_langinfo') 821 + libcharset = compiler.find_library('charset', required: true) 822 + libgit_dependencies += libcharset 823 + libgit_c_args += '-DHAVE_LIBCHARSET_H' 824 + endif 825 + else 826 + libgit_c_args += '-DNO_GETTEXT' 827 + build_options_config.set('NO_GETTEXT', '1') 828 + build_options_config.set('USE_GETTEXT_SCHEME', 'fallthrough') 829 + endif 830 + 831 + iconv = dependency('iconv', required: get_option('iconv')) 832 + if iconv.found() 833 + libgit_dependencies += iconv 834 + build_options_config.set('NO_ICONV', '') 835 + 836 + have_old_iconv = false 837 + if not compiler.compiles(''' 838 + #include <iconv.h> 839 + 840 + extern size_t iconv(iconv_t cd, 841 + char **inbuf, size_t *inbytesleft, 842 + char **outbuf, size_t *outbytesleft); 843 + ''', name: 'old iconv interface', dependencies: [iconv]) 844 + libgit_c_args += '-DOLD_ICONV' 845 + have_old_iconv = true 846 + endif 847 + 848 + iconv_omits_bom_source = '''# 849 + #include <iconv.h> 850 + 851 + int main(int argc, const char **argv) 852 + { 853 + ''' 854 + if have_old_iconv 855 + iconv_omits_bom_source += ''' 856 + typedef const char *iconv_ibp; 857 + ''' 858 + else 859 + iconv_omits_bom_source += ''' 860 + typedef char *iconv_ibp; 861 + ''' 862 + endif 863 + iconv_omits_bom_source += ''' 864 + int v; 865 + iconv_t conv; 866 + char in[] = "a"; iconv_ibp pin = in; 867 + char out[20] = ""; char *pout = out; 868 + size_t isz = sizeof in; 869 + size_t osz = sizeof out; 870 + 871 + conv = iconv_open("UTF-16", "UTF-8"); 872 + iconv(conv, &pin, &isz, &pout, &osz); 873 + iconv_close(conv); 874 + v = (unsigned char)(out[0]) + (unsigned char)(out[1]); 875 + return v != 0xfe + 0xff; 876 + } 877 + ''' 878 + 879 + if compiler.run(iconv_omits_bom_source, 880 + dependencies: iconv, 881 + name: 'iconv omits BOM', 882 + ).returncode() != 0 883 + libgit_c_args += '-DICONV_OMITS_BOM' 884 + endif 885 + else 886 + libgit_c_args += '-DNO_ICONV' 887 + build_options_config.set('NO_ICONV', '1') 888 + endif 889 + 890 + pcre2 = dependency('libpcre2-8', required: get_option('pcre2'), default_options: ['default_library=static', 'test=false']) 891 + if pcre2.found() 892 + libgit_dependencies += pcre2 893 + libgit_c_args += '-DUSE_LIBPCRE2' 894 + build_options_config.set('USE_LIBPCRE2', '1') 895 + else 896 + build_options_config.set('USE_LIBPCRE2', '') 897 + endif 898 + 899 + curl = dependency('libcurl', version: '>=7.21.3', required: get_option('curl'), default_options: ['default_library=static', 'tests=disabled', 'tool=disabled']) 900 + use_curl_for_imap_send = false 901 + if curl.found() 902 + if curl.version().version_compare('>=7.34.0') 903 + libgit_c_args += '-DUSE_CURL_FOR_IMAP_SEND' 904 + use_curl_for_imap_send = true 905 + endif 906 + 907 + libgit_dependencies += curl 908 + libgit_c_args += '-DCURL_DISABLE_TYPECHECK' 909 + build_options_config.set('NO_CURL', '') 910 + else 911 + libgit_c_args += '-DNO_CURL' 912 + build_options_config.set('NO_CURL', '1') 913 + endif 914 + 915 + expat = dependency('expat', required: get_option('expat'), default_options: ['default_library=static', 'build_tests=false']) 916 + if expat.found() 917 + libgit_dependencies += expat 918 + 919 + if expat.version().version_compare('<=1.2') 920 + libgit_c_args += '-DEXPAT_NEEDS_XMLPARSE_H' 921 + endif 922 + build_options_config.set('NO_EXPAT', '') 923 + else 924 + libgit_c_args += '-DNO_EXPAT' 925 + build_options_config.set('NO_EXPAT', '1') 926 + endif 927 + 928 + if not compiler.has_header('sys/select.h') 929 + libgit_c_args += '-DNO_SYS_SELECT_H' 930 + endif 931 + 932 + has_poll_h = compiler.has_header('poll.h') 933 + if not has_poll_h 934 + libgit_c_args += '-DNO_POLL_H' 935 + endif 936 + 937 + has_sys_poll_h = compiler.has_header('sys/poll.h') 938 + if not has_sys_poll_h 939 + libgit_c_args += '-DNO_SYS_POLL_H' 940 + endif 941 + 942 + if not has_poll_h and not has_sys_poll_h 943 + libgit_c_args += '-DNO_POLL' 944 + libgit_sources += 'compat/poll/poll.c' 945 + libgit_include_directories += 'compat/poll' 946 + endif 947 + 948 + if not compiler.has_header('inttypes.h') 949 + libgit_c_args += '-DNO_INTTYPES_H' 950 + endif 951 + 952 + if compiler.has_header('alloca.h') 953 + libgit_c_args += '-DHAVE_ALLOCA_H' 954 + endif 955 + 956 + if compiler.has_header('sys/sysinfo.h') 957 + libgit_c_args += '-DHAVE_SYSINFO' 958 + endif 959 + 960 + # Windows has libgen.h and a basename implementation, but we still need our own 961 + # implementation to threat things like drive prefixes specially. 962 + if host_machine.system() == 'windows' or not compiler.has_header('libgen.h') 963 + libgit_c_args += '-DNO_LIBGEN_H' 964 + libgit_sources += 'compat/basename.c' 965 + endif 966 + 967 + if compiler.has_header('paths.h') 968 + libgit_c_args += '-DHAVE_PATHS_H' 969 + endif 970 + 971 + if compiler.has_header('strings.h') 972 + libgit_c_args += '-DHAVE_STRINGS_H' 973 + endif 974 + 975 + networking_dependencies = [ ] 976 + if host_machine.system() == 'windows' 977 + winsock = compiler.find_library('ws2_32', required: false) 978 + if winsock.found() 979 + networking_dependencies += winsock 980 + endif 981 + else 982 + libresolv = compiler.find_library('resolv', required: false) 983 + if libresolv.found() 984 + networking_dependencies += libresolv 985 + endif 986 + endif 987 + libgit_dependencies += networking_dependencies 988 + 989 + foreach symbol : ['inet_ntop', 'inet_pton', 'strerror'] 990 + if not compiler.has_function(symbol, dependencies: networking_dependencies) 991 + libgit_c_args += '-DNO_' + symbol.to_upper() 992 + endif 993 + endforeach 994 + 995 + has_ipv6 = compiler.has_function('getaddrinfo', dependencies: networking_dependencies) 996 + if not has_ipv6 997 + libgit_c_args += '-DNO_IPV6' 998 + endif 999 + 1000 + if not compiler.compiles(''' 1001 + #ifdef _WIN32 1002 + # include <winsock2.h> 1003 + #else 1004 + # include <sys/types.h> 1005 + # include <sys/socket.h> 1006 + #endif 1007 + 1008 + void func(void) 1009 + { 1010 + struct sockaddr_storage x; 1011 + } 1012 + ''', name: 'struct sockaddr_storage') 1013 + if has_ipv6 1014 + libgit_c_args += '-Dsockaddr_storage=sockaddr_in6' 1015 + else 1016 + libgit_c_args += '-Dsockaddr_storage=sockaddr_in' 1017 + endif 1018 + endif 1019 + 1020 + if compiler.has_function('socket', dependencies: networking_dependencies) 1021 + libgit_sources += [ 1022 + 'unix-socket.c', 1023 + 'unix-stream-server.c', 1024 + ] 1025 + build_options_config.set('NO_UNIX_SOCKETS', '') 1026 + else 1027 + libgit_c_args += '-DNO_UNIX_SOCKETS' 1028 + build_options_config.set('NO_UNIX_SOCKETS', '1') 1029 + endif 1030 + 1031 + if not compiler.has_function('pread') 1032 + libgit_c_args += '-DNO_PREAD' 1033 + libgit_sources += 'compat/pread.c' 1034 + endif 1035 + 1036 + if host_machine.system() == 'darwin' 1037 + libgit_sources += 'compat/precompose_utf8.c' 1038 + libgit_c_args += '-DPRECOMPOSE_UNICODE' 1039 + libgit_c_args += '-DPROTECT_HFS_DEFAULT' 1040 + endif 1041 + 1042 + # Configure general compatibility wrappers. 1043 + if host_machine.system() == 'cygwin' 1044 + libgit_sources += [ 1045 + 'compat/win32/path-utils.c', 1046 + ] 1047 + elif host_machine.system() == 'windows' 1048 + libgit_sources += [ 1049 + 'compat/mingw.c', 1050 + 'compat/winansi.c', 1051 + 'compat/win32/flush.c', 1052 + 'compat/win32/path-utils.c', 1053 + 'compat/win32/pthread.c', 1054 + 'compat/win32/syslog.c', 1055 + 'compat/win32/dirent.c', 1056 + 'compat/win32mmap.c', 1057 + 'compat/nedmalloc/nedmalloc.c', 1058 + ] 1059 + 1060 + libgit_c_args += [ 1061 + '-DDETECT_MSYS_TTY', 1062 + '-DENSURE_MSYSTEM_IS_SET', 1063 + '-DNATIVE_CRLF', 1064 + '-DNOGDI', 1065 + '-DNO_POSIX_GOODIES', 1066 + '-DWIN32', 1067 + '-D_CONSOLE', 1068 + '-D_CONSOLE_DETECT_MSYS_TTY', 1069 + '-D__USE_MINGW_ANSI_STDIO=0', 1070 + ] 1071 + 1072 + libgit_dependencies += compiler.find_library('ntdll') 1073 + libgit_include_directories += 'compat/win32' 1074 + if compiler.get_id() == 'msvc' 1075 + libgit_include_directories += 'compat/vcbuild/include' 1076 + endif 1077 + endif 1078 + 1079 + if host_machine.system() == 'linux' 1080 + libgit_sources += 'compat/linux/procinfo.c' 1081 + elif host_machine.system() == 'windows' 1082 + libgit_sources += 'compat/win32/trace2_win32_process_info.c' 1083 + else 1084 + libgit_sources += 'compat/stub/procinfo.c' 1085 + endif 1086 + 1087 + if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' 1088 + libgit_c_args += [ 1089 + '-DUNRELIABLE_FSTAT', 1090 + '-DMMAP_PREVENTS_DELETE', 1091 + '-DOBJECT_CREATION_MODE=1', 1092 + ] 1093 + endif 1094 + 1095 + # Configure the simple-ipc subsystem required fro the fsmonitor. 1096 + if host_machine.system() == 'windows' 1097 + libgit_sources += [ 1098 + 'compat/simple-ipc/ipc-shared.c', 1099 + 'compat/simple-ipc/ipc-win32.c', 1100 + ] 1101 + libgit_c_args += '-DSUPPORTS_SIMPLE_IPC' 1102 + else 1103 + libgit_sources += [ 1104 + 'compat/simple-ipc/ipc-shared.c', 1105 + 'compat/simple-ipc/ipc-unix-socket.c', 1106 + ] 1107 + libgit_c_args += '-DSUPPORTS_SIMPLE_IPC' 1108 + endif 1109 + 1110 + fsmonitor_backend = '' 1111 + if host_machine.system() == 'windows' 1112 + fsmonitor_backend = 'win32' 1113 + elif host_machine.system() == 'darwin' 1114 + fsmonitor_backend = 'darwin' 1115 + libgit_dependencies += dependency('CoreServices') 1116 + endif 1117 + if fsmonitor_backend != '' 1118 + libgit_c_args += '-DHAVE_FSMONITOR_DAEMON_BACKEND' 1119 + libgit_c_args += '-DHAVE_FSMONITOR_OS_SETTINGS' 1120 + 1121 + libgit_sources += [ 1122 + 'compat/fsmonitor/fsm-health-' + fsmonitor_backend + '.c', 1123 + 'compat/fsmonitor/fsm-ipc-' + fsmonitor_backend + '.c', 1124 + 'compat/fsmonitor/fsm-listen-' + fsmonitor_backend + '.c', 1125 + 'compat/fsmonitor/fsm-path-utils-' + fsmonitor_backend + '.c', 1126 + 'compat/fsmonitor/fsm-settings-' + fsmonitor_backend + '.c', 1127 + ] 1128 + endif 1129 + build_options_config.set_quoted('FSMONITOR_DAEMON_BACKEND', fsmonitor_backend) 1130 + build_options_config.set_quoted('FSMONITOR_OS_SETTINGS', fsmonitor_backend) 1131 + 1132 + if not get_option('b_sanitize').contains('address') and get_option('regex').allowed() and compiler.has_header('regex.h') and compiler.get_define('REG_STARTEND', prefix: '#include <regex.h>') != '' 1133 + build_options_config.set('NO_REGEX', '') 1134 + 1135 + if compiler.get_define('REG_ENHANCED', prefix: '#include <regex.h>') != '' 1136 + libgit_c_args += '-DUSE_ENHANCED_BASIC_REGULAR_EXPRESSIONS' 1137 + libgit_sources += 'compat/regcomp_enhanced.c' 1138 + endif 1139 + elif not get_option('regex').enabled() 1140 + libgit_c_args += [ 1141 + '-DNO_REGEX', 1142 + '-DGAWK', 1143 + '-DNO_MBSUPPORT', 1144 + ] 1145 + build_options_config.set('NO_REGEX', '1') 1146 + libgit_sources += 'compat/regex/regex.c' 1147 + libgit_include_directories += 'compat/regex' 1148 + else 1149 + error('Native regex support requested but not found') 1150 + endif 1151 + 1152 + # setitimer and friends are provided by compat/mingw.c. 1153 + if host_machine.system() != 'windows' 1154 + if not compiler.compiles(''' 1155 + #include <sys/time.h> 1156 + void func(void) 1157 + { 1158 + struct itimerval value; 1159 + } 1160 + ''', name: 'struct itimerval') 1161 + libgit_c_args += '-DNO_STRUCT_ITIMERVAL' 1162 + libgit_c_args += '-DNO_SETITIMER' 1163 + elif not compiler.has_function('setitimer') 1164 + libgit_c_args += '-DNO_SETITIMER' 1165 + endif 1166 + endif 1167 + 1168 + if compiler.has_member('struct stat', 'st_mtimespec.tv_nsec', prefix: '#include <sys/stat.h>') 1169 + libgit_c_args += '-DUSE_ST_TIMESPEC' 1170 + elif not compiler.has_member('struct stat', 'st_mtim.tv_nsec', prefix: '#include <sys/stat.h>') 1171 + libgit_c_args += '-DNO_NSEC' 1172 + endif 1173 + 1174 + if not compiler.has_member('struct stat', 'st_blocks', prefix: '#include <sys/stat.h>') 1175 + libgit_c_args += '-DNO_ST_BLOCKS_IN_STRUCT_STAT' 1176 + endif 1177 + 1178 + if not compiler.has_member('struct dirent', 'd_type', prefix: '#include <dirent.h>') 1179 + libgit_c_args += '-DNO_D_TYPE_IN_DIRENT' 1180 + endif 1181 + 1182 + if not compiler.has_member('struct passwd', 'pw_gecos', prefix: '#include <pwd.h>') 1183 + libgit_c_args += '-DNO_GECOS_IN_PWENT' 1184 + endif 1185 + 1186 + if compiler.has_function('sync_file_range') 1187 + libgit_c_args += '-DHAVE_SYNC_FILE_RANGE' 1188 + endif 1189 + 1190 + if not compiler.has_function('strcasestr') 1191 + libgit_c_args += '-DNO_STRCASESTR' 1192 + libgit_sources += 'compat/strcasestr.c' 1193 + endif 1194 + 1195 + if not compiler.has_function('memmem') 1196 + libgit_c_args += '-DNO_MEMMEM' 1197 + libgit_sources += 'compat/memmem.c' 1198 + endif 1199 + 1200 + if not compiler.has_function('strlcpy') 1201 + libgit_c_args += '-DNO_STRLCPY' 1202 + libgit_sources += 'compat/strlcpy.c' 1203 + endif 1204 + 1205 + if not compiler.has_function('strdup') 1206 + libgit_c_args += '-DOVERRIDE_STRDUP' 1207 + libgit_sources += 'compat/strdup.c' 1208 + endif 1209 + 1210 + if not compiler.has_function('strtoumax') 1211 + libgit_c_args += '-DNO_STRTOUMAX' 1212 + libgit_sources += [ 1213 + 'compat/strtoumax.c', 1214 + 'compat/strtoimax.c', 1215 + ] 1216 + endif 1217 + 1218 + if not compiler.has_function('strtoull') 1219 + libgit_c_args += '-DNO_STRTOULL' 1220 + endif 1221 + 1222 + if not compiler.has_function('setenv') 1223 + libgit_c_args += '-DNO_SETENV' 1224 + libgit_sources += 'compat/setenv.c' 1225 + endif 1226 + 1227 + if not compiler.has_function('qsort') 1228 + libgit_c_args += '-DINTERNAL_QSORT' 1229 + endif 1230 + libgit_sources += 'compat/qsort_s.c' 1231 + 1232 + # unsetenv is provided by compat/mingw.c. 1233 + if host_machine.system() != 'windows' and not compiler.has_function('unsetenv') 1234 + libgit_c_args += '-DNO_UNSETENV' 1235 + libgit_sources += 'compat/unsetenv.c' 1236 + endif 1237 + 1238 + if not compiler.has_function('mkdtemp') 1239 + libgit_c_args += '-DNO_MKDTEMP' 1240 + libgit_sources += 'compat/mkdtemp.c' 1241 + endif 1242 + 1243 + if not compiler.has_function('initgroups') 1244 + libgit_c_args += '-DNO_INITGROUPS' 1245 + endif 1246 + 1247 + if compiler.has_function('getdelim') 1248 + libgit_c_args += '-DHAVE_GETDELIM' 1249 + endif 1250 + 1251 + if host_machine.system() == 'windows' 1252 + libgit_c_args += '-DUSE_WIN32_MMAP' 1253 + elif not compiler.has_function('mmap') 1254 + libgit_c_args += '-DNO_MMAP' 1255 + libgit_sources += 'compat/mmap.c' 1256 + endif 1257 + 1258 + if compiler.has_function('clock_gettime') 1259 + libgit_c_args += '-DHAVE_CLOCK_GETTIME' 1260 + endif 1261 + 1262 + if compiler.compiles(''' 1263 + #include <time.h> 1264 + 1265 + void func(void) 1266 + { 1267 + clockid_t id = CLOCK_MONOTONIC; 1268 + } 1269 + ''', name: 'monotonic clock') 1270 + libgit_c_args += '-DHAVE_CLOCK_MONOTONIC' 1271 + endif 1272 + 1273 + if not compiler.compiles(''' 1274 + #include <inttypes.h> 1275 + 1276 + void func(void) 1277 + { 1278 + uintmax_t x = 0; 1279 + } 1280 + ''', name: 'uintmax_t') 1281 + libgit_c_args += '-DNO_UINTMAX_T' 1282 + endif 1283 + 1284 + has_bsd_sysctl = false 1285 + if compiler.has_header('sys/sysctl.h') 1286 + if compiler.compiles(''' 1287 + #include <stddef.h> 1288 + #include <sys/sysctl.h> 1289 + 1290 + void func(void) 1291 + { 1292 + int val, mib[2] = { 0 }; 1293 + size_t len = sizeof(val); 1294 + sysctl(mib, 2, &val, &len, NULL, 0); 1295 + } 1296 + ''', name: 'BSD sysctl') 1297 + libgit_c_args += '-DHAVE_BSD_SYSCTL' 1298 + has_bsd_sysctl = true 1299 + endif 1300 + endif 1301 + 1302 + if not meson.is_cross_build() and compiler.run(''' 1303 + #include <stdio.h> 1304 + 1305 + int main(int argc, const char **argv) 1306 + { 1307 + FILE *f = fopen(".", "r"); 1308 + return f ? 0 : 1; 1309 + } 1310 + ''', name: 'fread reads directories').returncode() == 0 1311 + libgit_c_args += '-DFREAD_READS_DIRECTORIES' 1312 + libgit_sources += 'compat/fopen.c' 1313 + endif 1314 + 1315 + if not meson.is_cross_build() and fs.exists('/dev/tty') 1316 + libgit_c_args += '-DHAVE_DEV_TTY' 1317 + endif 1318 + 1319 + https_backend = get_option('https_backend') 1320 + 1321 + security_framework = dependency('Security', required: https_backend == 'CommonCrypto') 1322 + core_foundation_framework = dependency('CoreFoundation', required: security_framework.found()) 1323 + if https_backend == 'auto' and security_framework.found() 1324 + https_backend = 'CommonCrypto' 1325 + endif 1326 + 1327 + openssl_required = https_backend == 'openssl' or get_option('sha1_backend') == 'openssl' or get_option('sha256_backend') == 'openssl' 1328 + openssl = dependency('openssl', required: openssl_required, default_options: ['default_library=static']) 1329 + if https_backend == 'auto' and openssl.found() 1330 + https_backend = 'openssl' 1331 + endif 1332 + 1333 + if https_backend == 'CommonCrypto' 1334 + libgit_dependencies += security_framework 1335 + libgit_dependencies += core_foundation_framework 1336 + libgit_c_args += '-DAPPLE_COMMON_CRYPTO' 1337 + elif https_backend == 'openssl' 1338 + libgit_dependencies += openssl 1339 + else 1340 + # We either couldn't find any dependencies with 'auto' or the user requested 1341 + # 'none'. Both cases are benign. 1342 + endif 1343 + 1344 + if https_backend != 'openssl' 1345 + libgit_c_args += '-DNO_OPENSSL' 1346 + endif 1347 + 1348 + sha1_backend = get_option('sha1_backend') 1349 + if sha1_backend == 'sha1dc' 1350 + libgit_c_args += '-DSHA1_DC' 1351 + libgit_c_args += '-DSHA1DC_NO_STANDARD_INCLUDES=1' 1352 + libgit_c_args += '-DSHA1DC_INIT_SAFE_HASH_DEFAULT=0' 1353 + libgit_c_args += '-DSHA1DC_CUSTOM_INCLUDE_SHA1_C="git-compat-util.h"' 1354 + libgit_c_args += '-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="git-compat-util.h"' 1355 + 1356 + libgit_sources += [ 1357 + 'sha1dc_git.c', 1358 + 'sha1dc/sha1.c', 1359 + 'sha1dc/ubc_check.c', 1360 + ] 1361 + elif sha1_backend == 'common-crypto' 1362 + libgit_c_args += '-DCOMMON_DIGEST_FOR_OPENSSL' 1363 + libgit_c_args += '-DSHA1_APPLE' 1364 + # Apple CommonCrypto requires chunking 1365 + libgit_c_args += '-DSHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' 1366 + elif sha1_backend == 'openssl' 1367 + libgit_c_args += '-DSHA1_OPENSSL' 1368 + libgit_dependencies += openssl 1369 + elif sha1_backend == 'block' 1370 + libgit_c_args += '-DSHA1_BLK' 1371 + libgit_sources += 'block-sha1/sha1.c' 1372 + else 1373 + error('Unhandled SHA1 backend ' + sha1_backend) 1374 + endif 1375 + 1376 + sha256_backend = get_option('sha256_backend') 1377 + if sha256_backend == 'openssl' 1378 + libgit_c_args += '-DSHA256_OPENSSL' 1379 + libgit_dependencies += openssl 1380 + elif sha256_backend == 'nettle' 1381 + nettle = dependency('nettle') 1382 + libgit_dependencies += nettle 1383 + libgit_c_args += '-DSHA256_NETTLE' 1384 + elif sha256_backend == 'gcrypt' 1385 + gcrypt = dependency('gcrypt') 1386 + libgit_dependencies += gcrypt 1387 + libgit_c_args += '-DSHA256_GCRYPT' 1388 + elif sha256_backend == 'block' 1389 + libgit_c_args += '-DSHA256_BLK' 1390 + libgit_sources += 'sha256/block/sha256.c' 1391 + else 1392 + error('Unhandled SHA256 backend ' + sha256_backend) 1393 + endif 1394 + 1395 + if compiler.has_header_symbol('stdlib.h', 'arc4random_buf') 1396 + libgit_c_args += '-DHAVE_ARC4RANDOM' 1397 + elif compiler.has_header_symbol('bsd/stdlib.h', 'arc4random_buf') 1398 + libgit_c_args += '-DHAVE_ARC4RANDOM_BSD' 1399 + elif compiler.has_function('getrandom', prefix: '#include <sys/random.h>') 1400 + libgit_c_args += '-DHAVE_GETRANDOM' 1401 + elif compiler.has_function('getentropy', prefix: '#include <unistd.h>') 1402 + libgit_c_args += '-DHAVE_GETENTROPY' 1403 + elif compiler.has_function('RtlGenRandom', prefix: '#include <windows.h>\n#include <ntsecapi.h>') 1404 + libgit_c_args += '-DHAVE_RTLGENRANDOM' 1405 + elif openssl.found() 1406 + libgit_c_args += '-DHAVE_OPENSSL_CSPRNG' 1407 + endif 1408 + 1409 + if get_option('runtime_prefix') 1410 + libgit_c_args += '-DRUNTIME_PREFIX' 1411 + build_options_config.set('RUNTIME_PREFIX', 'true') 1412 + 1413 + if compiler.has_header('mach-o/dyld.h') 1414 + libgit_c_args += '-DHAVE_NS_GET_EXECUTABLE_PATH' 1415 + endif 1416 + 1417 + if has_bsd_sysctl and compiler.compiles(''' 1418 + #include <sys/sysctl.h> 1419 + 1420 + void func(void) 1421 + { 1422 + KERN_PROC_PATHNAME; KERN_PROC; 1423 + } 1424 + ''', name: 'BSD KERN_PROC_PATHNAME') 1425 + libgit_c_args += '-DHAVE_NS_GET_EXECUTABLE_PATH' 1426 + endif 1427 + 1428 + if host_machine.system() == 'linux' 1429 + libgit_c_args += '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe' + '"' 1430 + elif host_machine.system() == 'openbsd' 1431 + libgit_c_args += '-DPROCFS_EXECUTABLE_PATH="' + '/proc/curproc/file' + '"' 1432 + elif host_machine.system() == 'netbsd' 1433 + libgit_c_args += '-DPROCFS_EXECUTABLE_PATH="' + '/proc/curproc/exe' + '"' 1434 + endif 1435 + 1436 + if host_machine.system() == 'windows' and compiler.compiles(''' 1437 + #include <stdlib.h> 1438 + 1439 + void func(void) 1440 + { 1441 + _wpgmptr; 1442 + } 1443 + ''', name: 'Win32 _wpgmptr') 1444 + libgit_c_args += '-DHAVE_WPGMPTR' 1445 + endif 1446 + else 1447 + build_options_config.set('RUNTIME_PREFIX', 'false') 1448 + endif 1449 + 1450 + foreach key, value : { 1451 + 'DIFF': diff.full_path(), 1452 + 'GIT_TEST_CMP': diff.full_path() + ' -u', 1453 + 'GIT_TEST_GITPERLLIB': meson.project_build_root() / 'perl', 1454 + 'GIT_TEST_MERGE_TOOLS_DIR': meson.project_source_root() / 'mergetools', 1455 + 'GIT_TEST_POPATH': meson.project_source_root() / 'po', 1456 + 'GIT_TEST_TEMPLATE_DIR': meson.project_build_root() / 'templates', 1457 + 'GIT_TEST_TEXTDOMAINDIR': meson.project_build_root() / 'po', 1458 + 'PAGER_ENV': get_option('pager_environment'), 1459 + 'PERL_PATH': perl.found() ? perl.full_path() : '', 1460 + 'PYTHON_PATH': python.found () ? python.full_path() : '', 1461 + 'SHELL_PATH': shell.full_path(), 1462 + 'TAR': tar.full_path(), 1463 + 'TEST_OUTPUT_DIRECTORY': test_output_directory, 1464 + 'TEST_SHELL_PATH': shell.full_path(), 1465 + } 1466 + if value != '' and cygpath.found() 1467 + value = run_command(cygpath, value, check: true).stdout().strip() 1468 + endif 1469 + build_options_config.set_quoted(key, value) 1470 + endforeach 1471 + 1472 + configure_file( 1473 + input: 'GIT-BUILD-OPTIONS.in', 1474 + output: 'GIT-BUILD-OPTIONS', 1475 + configuration: build_options_config, 1476 + ) 1477 + 1478 + git_version_file = custom_target( 1479 + command: [ 1480 + shell, 1481 + meson.current_source_dir() / 'GIT-VERSION-GEN', 1482 + meson.current_source_dir(), 1483 + '@INPUT@', 1484 + '@OUTPUT@', 1485 + ], 1486 + input: meson.current_source_dir() / 'GIT-VERSION-FILE.in', 1487 + output: 'GIT-VERSION-FILE', 1488 + build_always_stale: true, 1489 + ) 1490 + 1491 + version_def_h = custom_target( 1492 + command: [ 1493 + shell, 1494 + meson.current_source_dir() / 'GIT-VERSION-GEN', 1495 + meson.current_source_dir(), 1496 + '@INPUT@', 1497 + '@OUTPUT@', 1498 + ], 1499 + input: meson.current_source_dir() / 'version-def.h.in', 1500 + output: 'version-def.h', 1501 + # Depend on GIT-VERSION-FILE so that we don't always try to rebuild this 1502 + # target for the same commit. 1503 + depends: [git_version_file], 1504 + ) 1505 + 1506 + # Build a separate library for "version.c" so that we do not have to rebuild 1507 + # everything when the current Git commit changes. 1508 + libgit_version_library = static_library('git-version', 1509 + sources: [ 1510 + 'version.c', 1511 + version_def_h, 1512 + ], 1513 + c_args: libgit_c_args, 1514 + dependencies: libgit_dependencies, 1515 + include_directories: libgit_include_directories, 1516 + ) 1517 + 1518 + libgit_library = static_library('git', 1519 + sources: libgit_sources, 1520 + c_args: libgit_c_args, 1521 + link_with: libgit_version_library, 1522 + dependencies: libgit_dependencies, 1523 + include_directories: libgit_include_directories, 1524 + ) 1525 + 1526 + libgit = declare_dependency( 1527 + compile_args: libgit_c_args, 1528 + link_with: libgit_library, 1529 + dependencies: libgit_dependencies, 1530 + include_directories: libgit_include_directories, 1531 + ) 1532 + 1533 + common_main_sources = ['common-main.c'] 1534 + common_main_link_args = [ ] 1535 + if host_machine.system() == 'windows' 1536 + git_rc = custom_target( 1537 + command: [ 1538 + shell, 1539 + meson.current_source_dir() / 'GIT-VERSION-GEN', 1540 + meson.current_source_dir(), 1541 + '@INPUT@', 1542 + '@OUTPUT@', 1543 + ], 1544 + input: meson.current_source_dir() / 'git.rc.in', 1545 + output: 'git.rc', 1546 + depends: [git_version_file], 1547 + ) 1548 + 1549 + common_main_sources += import('windows').compile_resources(git_rc, 1550 + include_directories: [meson.current_source_dir()], 1551 + ) 1552 + if compiler.get_argument_syntax() == 'gcc' 1553 + common_main_link_args += [ 1554 + '-municode', 1555 + '-Wl,-nxcompat', 1556 + '-Wl,-dynamicbase', 1557 + '-Wl,-pic-executable,-e,mainCRTStartup', 1558 + ] 1559 + elif compiler.get_argument_syntax() == 'msvc' 1560 + common_main_link_args += [ 1561 + '/ENTRY:wmainCRTStartup', 1562 + 'invalidcontinue.obj', 1563 + ] 1564 + else 1565 + error('Unsupported compiler ' + compiler.get_id()) 1566 + endif 1567 + endif 1568 + common_main_library = static_library('common-main', 1569 + sources: common_main_sources, 1570 + c_args: libgit_c_args, 1571 + dependencies: libgit_dependencies, 1572 + include_directories: libgit_include_directories, 1573 + ) 1574 + common_main = declare_dependency( 1575 + link_with: common_main_library, 1576 + link_args: common_main_link_args, 1577 + ) 1578 + 1579 + bin_wrappers = [ ] 1580 + test_dependencies = [ ] 1581 + 1582 + git = executable('git', 1583 + sources: builtin_sources + 'git.c', 1584 + dependencies: [libgit, common_main], 1585 + install: true, 1586 + install_dir: get_option('libexecdir') / 'git-core', 1587 + ) 1588 + bin_wrappers += git 1589 + 1590 + test_dependencies += executable('git-daemon', 1591 + sources: 'daemon.c', 1592 + dependencies: [libgit, common_main], 1593 + install: true, 1594 + install_dir: get_option('libexecdir') / 'git-core', 1595 + ) 1596 + 1597 + test_dependencies += executable('git-sh-i18n--envsubst', 1598 + sources: 'sh-i18n--envsubst.c', 1599 + dependencies: [libgit, common_main], 1600 + install: true, 1601 + install_dir: get_option('libexecdir') / 'git-core', 1602 + ) 1603 + 1604 + bin_wrappers += executable('git-shell', 1605 + sources: 'shell.c', 1606 + dependencies: [libgit, common_main], 1607 + install: true, 1608 + install_dir: get_option('libexecdir') / 'git-core', 1609 + ) 1610 + 1611 + test_dependencies += executable('git-http-backend', 1612 + sources: 'http-backend.c', 1613 + dependencies: [libgit, common_main], 1614 + install: true, 1615 + install_dir: get_option('libexecdir') / 'git-core', 1616 + ) 1617 + 1618 + bin_wrappers += executable('scalar', 1619 + sources: 'scalar.c', 1620 + dependencies: [libgit, common_main], 1621 + install: true, 1622 + install_dir: get_option('libexecdir') / 'git-core', 1623 + ) 1624 + 1625 + if get_option('curl').enabled() 1626 + curl_sources = [ 1627 + 'http.c', 1628 + 'http-walker.c', 1629 + ] 1630 + 1631 + git_remote_http = executable('git-remote-http', 1632 + sources: curl_sources + 'remote-curl.c', 1633 + dependencies: [libgit, common_main], 1634 + install: true, 1635 + install_dir: get_option('libexecdir') / 'git-core', 1636 + ) 1637 + test_dependencies += git_remote_http 1638 + 1639 + test_dependencies += executable('git-http-fetch', 1640 + sources: curl_sources + 'http-fetch.c', 1641 + dependencies: [libgit, common_main], 1642 + install: true, 1643 + install_dir: get_option('libexecdir') / 'git-core', 1644 + ) 1645 + 1646 + if expat.found() 1647 + test_dependencies += executable('git-http-push', 1648 + sources: curl_sources + 'http-push.c', 1649 + dependencies: [libgit, common_main], 1650 + install: true, 1651 + install_dir: get_option('libexecdir') / 'git-core', 1652 + ) 1653 + endif 1654 + 1655 + foreach alias : [ 'git-remote-https', 'git-remote-ftp', 'git-remote-ftps' ] 1656 + test_dependencies += executable(alias, 1657 + objects: git_remote_http.extract_all_objects(recursive: false), 1658 + dependencies: [libgit, common_main], 1659 + ) 1660 + 1661 + install_symlink(alias + executable_suffix, 1662 + install_dir: get_option('libexecdir') / 'git-core', 1663 + pointing_to: 'git-remote-http', 1664 + ) 1665 + endforeach 1666 + endif 1667 + 1668 + imap_send_sources = ['imap-send.c'] 1669 + if use_curl_for_imap_send 1670 + imap_send_sources += curl_sources 1671 + endif 1672 + 1673 + test_dependencies += executable('git-imap-send', 1674 + sources: imap_send_sources, 1675 + dependencies: [libgit, common_main], 1676 + install: true, 1677 + install_dir: get_option('libexecdir') / 'git-core', 1678 + ) 1679 + 1680 + foreach alias : [ 'git-receive-pack', 'git-upload-archive', 'git-upload-pack' ] 1681 + bin_wrappers += executable(alias, 1682 + objects: git.extract_all_objects(recursive: false), 1683 + dependencies: [libgit, common_main], 1684 + ) 1685 + 1686 + install_symlink(alias + executable_suffix, 1687 + install_dir: get_option('libexecdir') / 'git-core', 1688 + pointing_to: 'git', 1689 + ) 1690 + endforeach 1691 + 1692 + foreach symlink : [ 1693 + 'git', 1694 + 'git-receive-pack', 1695 + 'git-shell', 1696 + 'git-upload-archive', 1697 + 'git-upload-pack', 1698 + 'scalar', 1699 + ] 1700 + if meson.version().version_compare('>=1.3.0') 1701 + pointing_to = fs.relative_to(get_option('libexecdir') / 'git-core' / symlink, get_option('bindir')) 1702 + else 1703 + pointing_to = '../libexec/git-core' / symlink 1704 + endif 1705 + 1706 + install_symlink(symlink, 1707 + install_dir: get_option('bindir'), 1708 + pointing_to: pointing_to, 1709 + ) 1710 + endforeach 1711 + 1712 + scripts_sh = [ 1713 + 'git-difftool--helper.sh', 1714 + 'git-filter-branch.sh', 1715 + 'git-merge-octopus.sh', 1716 + 'git-merge-one-file.sh', 1717 + 'git-merge-resolve.sh', 1718 + 'git-mergetool--lib.sh', 1719 + 'git-mergetool.sh', 1720 + 'git-quiltimport.sh', 1721 + 'git-request-pull.sh', 1722 + 'git-sh-i18n.sh', 1723 + 'git-sh-setup.sh', 1724 + 'git-submodule.sh', 1725 + 'git-web--browse.sh', 1726 + ] 1727 + if perl_features_enabled 1728 + scripts_sh += 'git-instaweb.sh' 1729 + endif 1730 + 1731 + foreach script : scripts_sh 1732 + test_dependencies += custom_target( 1733 + input: script, 1734 + output: fs.stem(script), 1735 + command: [ 1736 + shell, 1737 + meson.project_source_root() / 'generate-script.sh', 1738 + '@INPUT@', 1739 + '@OUTPUT@', 1740 + meson.project_build_root() / 'GIT-BUILD-OPTIONS', 1741 + ], 1742 + install: true, 1743 + install_dir: get_option('libexecdir') / 'git-core', 1744 + ) 1745 + endforeach 1746 + 1747 + if perl_features_enabled 1748 + scripts_perl = [ 1749 + 'git-archimport.perl', 1750 + 'git-cvsexportcommit.perl', 1751 + 'git-cvsimport.perl', 1752 + 'git-cvsserver.perl', 1753 + 'git-send-email.perl', 1754 + 'git-svn.perl', 1755 + ] 1756 + 1757 + pathsep = ':' 1758 + if host_machine.system() == 'windows' 1759 + pathsep = ';' 1760 + endif 1761 + 1762 + perl_header_template = 'perl/header_templates/fixed_prefix.template.pl' 1763 + if get_option('runtime_prefix') 1764 + perl_header_template = 'perl/header_templates/runtime_prefix.template.pl' 1765 + endif 1766 + 1767 + perl_header = configure_file( 1768 + input: perl_header_template, 1769 + output: 'GIT-PERL-HEADER', 1770 + configuration: { 1771 + 'GITEXECDIR_REL': get_option('libexecdir') / 'git-core', 1772 + 'PERLLIBDIR_REL': get_option('datadir') / 'perl5', 1773 + 'LOCALEDIR_REL': get_option('datadir') / 'locale', 1774 + 'INSTLIBDIR': get_option('datadir') / 'perl5', 1775 + 'PATHSEP': pathsep, 1776 + }, 1777 + ) 1778 + 1779 + generate_perl_command = [ 1780 + shell, 1781 + meson.project_source_root() / 'generate-perl.sh', 1782 + meson.project_build_root() / 'GIT-BUILD-OPTIONS', 1783 + git_version_file.full_path(), 1784 + perl_header, 1785 + '@INPUT@', 1786 + '@OUTPUT@', 1787 + ] 1788 + 1789 + foreach script : scripts_perl 1790 + generated_script = custom_target( 1791 + input: script, 1792 + output: fs.stem(script), 1793 + command: generate_perl_command, 1794 + install: true, 1795 + install_dir: get_option('libexecdir') / 'git-core', 1796 + depends: [git_version_file], 1797 + ) 1798 + test_dependencies += generated_script 1799 + 1800 + if script == 'git-cvsserver.perl' 1801 + bin_wrappers += generated_script 1802 + 1803 + if meson.version().version_compare('>=1.3.0') 1804 + pointing_to = fs.relative_to(get_option('libexecdir') / 'git-core' / fs.stem(script), get_option('bindir')) 1805 + else 1806 + pointing_to = '../libexec/git-core' / fs.stem(script) 1807 + endif 1808 + 1809 + install_symlink(fs.stem(script), 1810 + install_dir: get_option('bindir'), 1811 + pointing_to: pointing_to, 1812 + ) 1813 + endif 1814 + endforeach 1815 + 1816 + subdir('perl') 1817 + endif 1818 + 1819 + if python.found() 1820 + scripts_python = [ 1821 + 'git-p4.py' 1822 + ] 1823 + 1824 + foreach script : scripts_python 1825 + generated_python = custom_target( 1826 + input: script, 1827 + output: fs.stem(script), 1828 + command: [ 1829 + shell, 1830 + meson.project_source_root() / 'generate-python.sh', 1831 + meson.project_build_root() / 'GIT-BUILD-OPTIONS', 1832 + '@INPUT@', 1833 + '@OUTPUT@', 1834 + ], 1835 + install: true, 1836 + install_dir: get_option('libexecdir') / 'git-core', 1837 + ) 1838 + test_dependencies += generated_python 1839 + endforeach 1840 + endif 1841 + 1842 + mergetools = [ 1843 + 'mergetools/araxis', 1844 + 'mergetools/bc', 1845 + 'mergetools/codecompare', 1846 + 'mergetools/deltawalker', 1847 + 'mergetools/diffmerge', 1848 + 'mergetools/diffuse', 1849 + 'mergetools/ecmerge', 1850 + 'mergetools/emerge', 1851 + 'mergetools/examdiff', 1852 + 'mergetools/guiffy', 1853 + 'mergetools/gvimdiff', 1854 + 'mergetools/kdiff3', 1855 + 'mergetools/kompare', 1856 + 'mergetools/meld', 1857 + 'mergetools/nvimdiff', 1858 + 'mergetools/opendiff', 1859 + 'mergetools/p4merge', 1860 + 'mergetools/smerge', 1861 + 'mergetools/tkdiff', 1862 + 'mergetools/tortoisemerge', 1863 + 'mergetools/vimdiff', 1864 + 'mergetools/vscode', 1865 + 'mergetools/winmerge', 1866 + 'mergetools/xxdiff', 1867 + ] 1868 + 1869 + foreach mergetool : mergetools 1870 + install_data(mergetool, install_dir: get_option('libexecdir') / 'git-core' / 'mergetools') 1871 + endforeach 1872 + 1873 + if intl.found() 1874 + subdir('po') 1875 + endif 1876 + subdir('contrib') 1877 + subdir('gitweb') 1878 + subdir('templates') 1879 + 1880 + # Everything but the bin-wrappers need to come before this target such that we 1881 + # can properly set up test dependencies. The bin-wrappers themselves are set up 1882 + # at configuration time, so these are fine. 1883 + if get_option('tests') 1884 + subdir('t') 1885 + endif 1886 + 1887 + subdir('bin-wrappers') 1888 + if get_option('docs') != [] 1889 + subdir('Documentation') 1890 + endif 1891 + 1892 + summary({ 1893 + 'curl': curl.found(), 1894 + 'expat': expat.found(), 1895 + 'gettext': intl.found(), 1896 + 'https': https_backend, 1897 + 'iconv': iconv.found(), 1898 + 'pcre2': pcre2.found(), 1899 + 'perl': perl_features_enabled, 1900 + 'python': python.found(), 1901 + }, section: 'Auto-detected features')
+81
meson_options.txt
··· 1 + # Configuration for how Git behaves at runtime. 2 + option('default_pager', type: 'string', value: 'less', 3 + description: 'Fall-back pager.') 4 + option('default_editor', type: 'string', value: 'vi', 5 + description: 'Fall-back editor.') 6 + option('gitconfig', type: 'string', value: '/etc/gitconfig', 7 + description: 'Path to the global git configuration file.') 8 + option('gitattributes', type: 'string', value: '/etc/gitattributes', 9 + description: 'Path to the global git attributes file.') 10 + option('pager_environment', type: 'string', value: 'LESS=FRX LV=-c', 11 + description: 'Environment used when spawning the pager') 12 + option('perl_cpan_fallback', type: 'boolean', value: true, 13 + description: 'Install bundled copies of CPAN modules that serve as a fallback in case the modules are not available on the system.') 14 + option('runtime_prefix', type: 'boolean', value: false, 15 + description: 'Resolve ancillary tooling and support files relative to the location of the runtime binary instead of hard-coding them into the binary.') 16 + option('sane_tool_path', type: 'string', value: '', 17 + description: 'A colon-separated list of paths to prepend to PATH if your tools in /usr/bin are broken.') 18 + 19 + # Features supported by Git. 20 + option('curl', type: 'feature', value: 'enabled', 21 + description: 'Build helpers used to access remotes with the HTTP transport.') 22 + option('expat', type: 'feature', value: 'enabled', 23 + description: 'Build helpers used to push to remotes with the HTTP transport.') 24 + option('gettext', type: 'feature', value: 'auto', 25 + description: 'Build translation files.') 26 + option('iconv', type: 'feature', value: 'auto', 27 + description: 'Support reencoding strings with different encodings.') 28 + option('pcre2', type: 'feature', value: 'enabled', 29 + description: 'Support Perl-compatible regular expressions in e.g. git-grep(1).') 30 + option('perl', type: 'feature', value: 'auto', 31 + description: 'Build tools written in Perl.') 32 + option('python', type: 'feature', value: 'auto', 33 + description: 'Build tools written in Python.') 34 + option('regex', type: 'feature', value: 'auto', 35 + description: 'Use the system-provided regex library instead of the bundled one.') 36 + 37 + # Backends. 38 + option('https_backend', type: 'combo', value: 'auto', choices: ['auto', 'openssl', 'CommonCrypto', 'none'], 39 + description: 'The HTTPS backend to use when connecting to remotes.') 40 + option('sha1_backend', type: 'combo', choices: ['openssl', 'block', 'sha1dc', 'common-crypto'], value: 'sha1dc', 41 + description: 'The backend used for hashing objects with the SHA1 object format') 42 + option('sha256_backend', type: 'combo', choices: ['openssl', 'nettle', 'gcrypt', 'block'], value: 'block', 43 + description: 'The backend used for hashing objects with the SHA256 object format') 44 + 45 + # Build tweaks. 46 + option('macos_use_homebrew_gettext', type: 'boolean', value: true, 47 + description: 'Use gettext from Homebrew instead of the slightly-broken system-provided one.') 48 + 49 + # gitweb configuration. 50 + option('gitweb_config', type: 'string', value: 'gitweb_config.perl') 51 + option('gitweb_config_system', type: 'string', value: '/etc/gitweb.conf') 52 + option('gitweb_config_common', type: 'string', value: '/etc/gitweb-common.conf') 53 + option('gitweb_home_link_str', type: 'string', value: 'projects') 54 + option('gitweb_sitename', type: 'string', value: '') 55 + option('gitweb_projectroot', type: 'string', value: '/pub/git') 56 + option('gitweb_project_maxdepth', type: 'string', value: '2007') 57 + option('gitweb_export_ok', type: 'string', value: '') 58 + option('gitweb_strict_export', type: 'string', value: '') 59 + option('gitweb_base_url', type: 'string', value: '') 60 + option('gitweb_list', type: 'string', value: '') 61 + option('gitweb_hometext', type: 'string', value: 'indextext.html') 62 + option('gitweb_css', type: 'string', value: 'static/gitweb.css') 63 + option('gitweb_logo', type: 'string', value: 'static/git-logo.png') 64 + option('gitweb_favicon', type: 'string', value: 'static/git-favicon.png') 65 + option('gitweb_js', type: 'string', value: 'static/gitweb.js') 66 + option('gitweb_site_html_head_string', type: 'string', value: '') 67 + option('gitweb_site_header', type: 'string', value: '') 68 + option('gitweb_site_footer', type: 'string', value: '') 69 + option('highlight_bin', type: 'string', value: 'highlight') 70 + 71 + # Documentation. 72 + option('docs', type: 'array', choices: ['man', 'html'], value: [], 73 + description: 'Which documenattion formats to build and install.') 74 + option('default_help_format', type: 'combo', choices: ['man', 'html'], value: 'man', 75 + description: 'Default format used when executing git-help(1).') 76 + 77 + # Testing. 78 + option('tests', type: 'boolean', value: true, 79 + description: 'Enable building tests. This requires Perl, but is separate from the "perl" option such that you can build tests without Perl features enabled.') 80 + option('test_output_directory', type: 'string', 81 + description: 'Path to the directory used to store test outputs')
+7
perl/FromCPAN/Mail/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Address.pm', 3 + output: 'Address.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/FromCPAN/Mail', 7 + )
+9
perl/FromCPAN/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Error.pm', 3 + output: 'Error.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/FromCPAN', 7 + ) 8 + 9 + subdir('Mail')
+7
perl/Git/LoadCPAN/Mail/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Address.pm', 3 + output: 'Address.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN/Mail', 7 + )
+9
perl/Git/LoadCPAN/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Error.pm', 3 + output: 'Error.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN', 7 + ) 8 + 9 + subdir('Mail')
+7
perl/Git/SVN/Memoize/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'YAML.pm', 3 + output: 'YAML.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/Git/SVN', 7 + )
+20
perl/Git/SVN/meson.build
··· 1 + foreach source : [ 2 + 'Editor.pm', 3 + 'Fetcher.pm', 4 + 'GlobSpec.pm', 5 + 'Log.pm', 6 + 'Migration.pm', 7 + 'Prompt.pm', 8 + 'Ra.pm', 9 + 'Utils.pm', 10 + ] 11 + test_dependencies += custom_target( 12 + input: source, 13 + output: source, 14 + command: generate_perl_command, 15 + install: true, 16 + install_dir: get_option('datadir') / 'perl5/Git/SVN', 17 + ) 18 + endforeach 19 + 20 + subdir('Memoize')
+18
perl/Git/meson.build
··· 1 + foreach source : [ 2 + 'I18N.pm', 3 + 'IndexInfo.pm', 4 + 'LoadCPAN.pm', 5 + 'Packet.pm', 6 + 'SVN.pm', 7 + ] 8 + test_dependencies += custom_target( 9 + input: source, 10 + output: source, 11 + command: generate_perl_command, 12 + install: true, 13 + install_dir: get_option('datadir') / 'perl5/Git', 14 + ) 15 + endforeach 16 + 17 + subdir('LoadCPAN') 18 + subdir('SVN')
+12
perl/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Git.pm', 3 + output: 'Git.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5', 7 + ) 8 + 9 + subdir('Git') 10 + if get_option('perl_cpan_fallback') 11 + subdir('FromCPAN') 12 + endif
+27
po/meson.build
··· 1 + i18n = import('i18n') 2 + 3 + translations = i18n.gettext('git', 4 + languages: [ 5 + 'bg', 6 + 'ca', 7 + 'de', 8 + 'el', 9 + 'es', 10 + 'fr', 11 + 'id', 12 + 'is', 13 + 'it', 14 + 'ko', 15 + 'pl', 16 + 'pt_PT', 17 + 'ru', 18 + 'sv', 19 + 'tr', 20 + 'uk', 21 + 'vi', 22 + 'zh_CN', 23 + 'zh_TW', 24 + ], 25 + install: true, 26 + ) 27 + test_dependencies += translations[0]
+1
subprojects/.gitignore
··· 1 + /*/
+13
subprojects/curl.wrap
··· 1 + [wrap-file] 2 + directory = curl-8.10.1 3 + source_url = https://github.com/curl/curl/releases/download/curl-8_10_1/curl-8.10.1.tar.xz 4 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.10.1-1/curl-8.10.1.tar.xz 5 + source_filename = curl-8.10.1.tar.xz 6 + source_hash = 73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee 7 + patch_filename = curl_8.10.1-1_patch.zip 8 + patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.10.1-1/get_patch 9 + patch_hash = 707c28f35fc9b0e8d68c0c2800712007612f922a31da9637ce706a2159f3ddd8 10 + wrapdb_version = 8.10.1-1 11 + 12 + [provide] 13 + dependency_names = libcurl
+13
subprojects/expat.wrap
··· 1 + [wrap-file] 2 + directory = expat-2.6.3 3 + source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz 4 + source_filename = expat-2.6.3.tar.bz2 5 + source_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc 6 + patch_filename = expat_2.6.3-1_patch.zip 7 + patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.3-1/get_patch 8 + patch_hash = cf017fbe105e31428b2768360bd9be39094df4e948a1e8d1c54b6f7c76460cb1 9 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.3-1/expat-2.6.3.tar.bz2 10 + wrapdb_version = 2.6.3-1 11 + 12 + [provide] 13 + expat = expat_dep
+15
subprojects/openssl.wrap
··· 1 + [wrap-file] 2 + directory = openssl-3.0.8 3 + source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz 4 + source_filename = openssl-3.0.8.tar.gz 5 + source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e 6 + patch_filename = openssl_3.0.8-3_patch.zip 7 + patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-3/get_patch 8 + patch_hash = 300da189e106942347d61a4a4295aa2edbcf06184f8d13b4cee0bed9fb936963 9 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-3/openssl-3.0.8.tar.gz 10 + wrapdb_version = 3.0.8-3 11 + 12 + [provide] 13 + libcrypto = libcrypto_dep 14 + libssl = libssl_dep 15 + openssl = openssl_dep
+16
subprojects/pcre2.wrap
··· 1 + [wrap-file] 2 + directory = pcre2-10.44 3 + source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2 4 + source_filename = pcre2-10.44.tar.bz2 5 + source_hash = d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96 6 + patch_filename = pcre2_10.44-2_patch.zip 7 + patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.44-2/get_patch 8 + patch_hash = 4336d422ee9043847e5e10dbbbd01940d4c9e5027f31ccdc33a7898a1ca94009 9 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.44-2/pcre2-10.44.tar.bz2 10 + wrapdb_version = 10.44-2 11 + 12 + [provide] 13 + libpcre2-8 = libpcre2_8 14 + libpcre2-16 = libpcre2_16 15 + libpcre2-32 = libpcre2_32 16 + libpcre2-posix = libpcre2_posix
+13
subprojects/zlib.wrap
··· 1 + [wrap-file] 2 + directory = zlib-1.3.1 3 + source_url = http://zlib.net/fossils/zlib-1.3.1.tar.gz 4 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.1-1/zlib-1.3.1.tar.gz 5 + source_filename = zlib-1.3.1.tar.gz 6 + source_hash = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 7 + patch_filename = zlib_1.3.1-1_patch.zip 8 + patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch 9 + patch_hash = e79b98eb24a75392009cec6f99ca5cdca9881ff20bfa174e8b8926d5c7a47095 10 + wrapdb_version = 1.3.1-1 11 + 12 + [provide] 13 + zlib = zlib_dep
+91
t/helper/meson.build
··· 1 + test_tool_sources = [ 2 + '../unit-tests/test-lib.c', 3 + 'test-advise.c', 4 + 'test-bitmap.c', 5 + 'test-bloom.c', 6 + 'test-bundle-uri.c', 7 + 'test-cache-tree.c', 8 + 'test-chmtime.c', 9 + 'test-config.c', 10 + 'test-crontab.c', 11 + 'test-csprng.c', 12 + 'test-date.c', 13 + 'test-delete-gpgsig.c', 14 + 'test-delta.c', 15 + 'test-dir-iterator.c', 16 + 'test-drop-caches.c', 17 + 'test-dump-cache-tree.c', 18 + 'test-dump-fsmonitor.c', 19 + 'test-dump-split-index.c', 20 + 'test-dump-untracked-cache.c', 21 + 'test-env-helper.c', 22 + 'test-example-tap.c', 23 + 'test-find-pack.c', 24 + 'test-fsmonitor-client.c', 25 + 'test-genrandom.c', 26 + 'test-genzeros.c', 27 + 'test-getcwd.c', 28 + 'test-hash-speed.c', 29 + 'test-hash.c', 30 + 'test-hashmap.c', 31 + 'test-hexdump.c', 32 + 'test-json-writer.c', 33 + 'test-lazy-init-name-hash.c', 34 + 'test-match-trees.c', 35 + 'test-mergesort.c', 36 + 'test-mktemp.c', 37 + 'test-online-cpus.c', 38 + 'test-pack-mtimes.c', 39 + 'test-parse-options.c', 40 + 'test-parse-pathspec-file.c', 41 + 'test-partial-clone.c', 42 + 'test-path-utils.c', 43 + 'test-pcre2-config.c', 44 + 'test-pkt-line.c', 45 + 'test-proc-receive.c', 46 + 'test-progress.c', 47 + 'test-reach.c', 48 + 'test-read-cache.c', 49 + 'test-read-graph.c', 50 + 'test-read-midx.c', 51 + 'test-ref-store.c', 52 + 'test-reftable.c', 53 + 'test-regex.c', 54 + 'test-repository.c', 55 + 'test-revision-walking.c', 56 + 'test-rot13-filter.c', 57 + 'test-run-command.c', 58 + 'test-scrap-cache-tree.c', 59 + 'test-serve-v2.c', 60 + 'test-sha1.c', 61 + 'test-sha256.c', 62 + 'test-sigchain.c', 63 + 'test-simple-ipc.c', 64 + 'test-string-list.c', 65 + 'test-submodule-config.c', 66 + 'test-submodule-nested-repo-config.c', 67 + 'test-submodule.c', 68 + 'test-subprocess.c', 69 + 'test-tool.c', 70 + 'test-trace2.c', 71 + 'test-truncate.c', 72 + 'test-userdiff.c', 73 + 'test-wildmatch.c', 74 + 'test-windows-named-pipe.c', 75 + 'test-write-cache.c', 76 + 'test-xml-encode.c', 77 + ] 78 + 79 + test_tool = executable('test-tool', 80 + sources: test_tool_sources, 81 + dependencies: [libgit, common_main], 82 + ) 83 + bin_wrappers += test_tool 84 + test_dependencies += test_tool 85 + 86 + test_fake_ssh = executable('test-fake-ssh', 87 + sources: 'test-fake-ssh.c', 88 + dependencies: [libgit, common_main], 89 + ) 90 + bin_wrappers += test_fake_ssh 91 + test_dependencies += test_fake_ssh
+1114
t/meson.build
··· 1 + clar_test_suites = [ 2 + 'unit-tests/ctype.c', 3 + 'unit-tests/strvec.c', 4 + ] 5 + 6 + clar_sources = [ 7 + 'unit-tests/clar/clar.c', 8 + 'unit-tests/unit-test.c', 9 + ] 10 + 11 + clar_decls_h = custom_target( 12 + input: clar_test_suites, 13 + output: 'clar-decls.h', 14 + command : [ 15 + shell, 16 + meson.current_source_dir() + '/unit-tests/generate-clar-decls.sh', 17 + '@OUTPUT@', 18 + '@INPUT@', 19 + ], 20 + env: script_environment, 21 + ) 22 + clar_sources += clar_decls_h 23 + 24 + clar_sources += custom_target( 25 + input: clar_decls_h, 26 + output: 'clar.suite', 27 + command : [ 28 + shell, 29 + meson.current_source_dir() + '/unit-tests/generate-clar-suites.sh', 30 + '@INPUT@', 31 + '@OUTPUT@', 32 + ], 33 + env: script_environment, 34 + ) 35 + 36 + clar_unit_tests = executable('unit-tests', 37 + sources: clar_sources + clar_test_suites, 38 + dependencies: [libgit, common_main], 39 + ) 40 + test('unit-tests', clar_unit_tests) 41 + 42 + unit_test_programs = [ 43 + 'unit-tests/t-example-decorate.c', 44 + 'unit-tests/t-hash.c', 45 + 'unit-tests/t-hashmap.c', 46 + 'unit-tests/t-mem-pool.c', 47 + 'unit-tests/t-oid-array.c', 48 + 'unit-tests/t-oidmap.c', 49 + 'unit-tests/t-oidtree.c', 50 + 'unit-tests/t-prio-queue.c', 51 + 'unit-tests/t-reftable-basics.c', 52 + 'unit-tests/t-reftable-block.c', 53 + 'unit-tests/t-reftable-merged.c', 54 + 'unit-tests/t-reftable-pq.c', 55 + 'unit-tests/t-reftable-reader.c', 56 + 'unit-tests/t-reftable-readwrite.c', 57 + 'unit-tests/t-reftable-record.c', 58 + 'unit-tests/t-reftable-stack.c', 59 + 'unit-tests/t-reftable-tree.c', 60 + 'unit-tests/t-strbuf.c', 61 + 'unit-tests/t-strcmp-offset.c', 62 + 'unit-tests/t-trailer.c', 63 + 'unit-tests/t-urlmatch-normalization.c', 64 + ] 65 + 66 + foreach unit_test_program : unit_test_programs 67 + unit_test_name = fs.stem(unit_test_program) 68 + unit_test = executable(unit_test_name, 69 + sources: [ 70 + 'unit-tests/test-lib.c', 71 + 'unit-tests/lib-oid.c', 72 + 'unit-tests/lib-reftable.c', 73 + unit_test_program, 74 + ], 75 + dependencies: [libgit, common_main], 76 + ) 77 + test(unit_test_name, unit_test, 78 + workdir: meson.current_source_dir(), 79 + timeout: 0, 80 + ) 81 + endforeach 82 + 83 + subdir('helper') 84 + 85 + integration_tests = [ 86 + 't0000-basic.sh', 87 + 't0001-init.sh', 88 + 't0002-gitfile.sh', 89 + 't0003-attributes.sh', 90 + 't0004-unwritable.sh', 91 + 't0005-signals.sh', 92 + 't0006-date.sh', 93 + 't0007-git-var.sh', 94 + 't0008-ignores.sh', 95 + 't0010-racy-git.sh', 96 + 't0012-help.sh', 97 + 't0013-sha1dc.sh', 98 + 't0014-alias.sh', 99 + 't0017-env-helper.sh', 100 + 't0018-advice.sh', 101 + 't0019-json-writer.sh', 102 + 't0020-crlf.sh', 103 + 't0021-conversion.sh', 104 + 't0022-crlf-rename.sh', 105 + 't0023-crlf-am.sh', 106 + 't0024-crlf-archive.sh', 107 + 't0025-crlf-renormalize.sh', 108 + 't0026-eol-config.sh', 109 + 't0027-auto-crlf.sh', 110 + 't0028-working-tree-encoding.sh', 111 + 't0029-core-unsetenvvars.sh', 112 + 't0030-stripspace.sh', 113 + 't0033-safe-directory.sh', 114 + 't0034-root-safe-directory.sh', 115 + 't0035-safe-bare-repository.sh', 116 + 't0040-parse-options.sh', 117 + 't0041-usage.sh', 118 + 't0050-filesystem.sh', 119 + 't0051-windows-named-pipe.sh', 120 + 't0052-simple-ipc.sh', 121 + 't0055-beyond-symlinks.sh', 122 + 't0056-git-C.sh', 123 + 't0060-path-utils.sh', 124 + 't0061-run-command.sh', 125 + 't0062-revision-walking.sh', 126 + 't0063-string-list.sh', 127 + 't0066-dir-iterator.sh', 128 + 't0067-parse_pathspec_file.sh', 129 + 't0068-for-each-repo.sh', 130 + 't0070-fundamental.sh', 131 + 't0071-sort.sh', 132 + 't0080-unit-test-output.sh', 133 + 't0081-find-pack.sh', 134 + 't0090-cache-tree.sh', 135 + 't0091-bugreport.sh', 136 + 't0092-diagnose.sh', 137 + 't0095-bloom.sh', 138 + 't0100-previous.sh', 139 + 't0101-at-syntax.sh', 140 + 't0200-gettext-basic.sh', 141 + 't0201-gettext-fallbacks.sh', 142 + 't0202-gettext-perl.sh', 143 + 't0203-gettext-setlocale-sanity.sh', 144 + 't0204-gettext-reencode-sanity.sh', 145 + 't0210-trace2-normal.sh', 146 + 't0211-trace2-perf.sh', 147 + 't0212-trace2-event.sh', 148 + 't0300-credentials.sh', 149 + 't0301-credential-cache.sh', 150 + 't0302-credential-store.sh', 151 + 't0303-credential-external.sh', 152 + 't0410-partial-clone.sh', 153 + 't0411-clone-from-partial.sh', 154 + 't0450-txt-doc-vs-help.sh', 155 + 't0500-progress-display.sh', 156 + 't0600-reffiles-backend.sh', 157 + 't0601-reffiles-pack-refs.sh', 158 + 't0602-reffiles-fsck.sh', 159 + 't0610-reftable-basics.sh', 160 + 't0611-reftable-httpd.sh', 161 + 't0612-reftable-jgit-compatibility.sh', 162 + 't0613-reftable-write-options.sh', 163 + 't1000-read-tree-m-3way.sh', 164 + 't1001-read-tree-m-2way.sh', 165 + 't1002-read-tree-m-u-2way.sh', 166 + 't1003-read-tree-prefix.sh', 167 + 't1004-read-tree-m-u-wf.sh', 168 + 't1005-read-tree-reset.sh', 169 + 't1006-cat-file.sh', 170 + 't1007-hash-object.sh', 171 + 't1008-read-tree-overlay.sh', 172 + 't1009-read-tree-new-index.sh', 173 + 't1010-mktree.sh', 174 + 't1011-read-tree-sparse-checkout.sh', 175 + 't1012-read-tree-df.sh', 176 + 't1013-read-tree-submodule.sh', 177 + 't1014-read-tree-confusing.sh', 178 + 't1015-read-index-unmerged.sh', 179 + 't1016-compatObjectFormat.sh', 180 + 't1020-subdirectory.sh', 181 + 't1021-rerere-in-workdir.sh', 182 + 't1022-read-tree-partial-clone.sh', 183 + 't1050-large.sh', 184 + 't1051-large-conversion.sh', 185 + 't1060-object-corruption.sh', 186 + 't1090-sparse-checkout-scope.sh', 187 + 't1091-sparse-checkout-builtin.sh', 188 + 't1092-sparse-checkout-compatibility.sh', 189 + 't1100-commit-tree-options.sh', 190 + 't1300-config.sh', 191 + 't1301-shared-repo.sh', 192 + 't1302-repo-version.sh', 193 + 't1303-wacky-config.sh', 194 + 't1304-default-acl.sh', 195 + 't1305-config-include.sh', 196 + 't1306-xdg-files.sh', 197 + 't1307-config-blob.sh', 198 + 't1308-config-set.sh', 199 + 't1309-early-config.sh', 200 + 't1310-config-default.sh', 201 + 't1350-config-hooks-path.sh', 202 + 't1400-update-ref.sh', 203 + 't1401-symbolic-ref.sh', 204 + 't1402-check-ref-format.sh', 205 + 't1403-show-ref.sh', 206 + 't1404-update-ref-errors.sh', 207 + 't1405-main-ref-store.sh', 208 + 't1406-submodule-ref-store.sh', 209 + 't1407-worktree-ref-store.sh', 210 + 't1408-packed-refs.sh', 211 + 't1409-avoid-packing-refs.sh', 212 + 't1410-reflog.sh', 213 + 't1411-reflog-show.sh', 214 + 't1412-reflog-loop.sh', 215 + 't1413-reflog-detach.sh', 216 + 't1414-reflog-walk.sh', 217 + 't1415-worktree-refs.sh', 218 + 't1416-ref-transaction-hooks.sh', 219 + 't1417-reflog-updateref.sh', 220 + 't1418-reflog-exists.sh', 221 + 't1419-exclude-refs.sh', 222 + 't1420-lost-found.sh', 223 + 't1430-bad-ref-name.sh', 224 + 't1450-fsck.sh', 225 + 't1451-fsck-buffer.sh', 226 + 't1460-refs-migrate.sh', 227 + 't1500-rev-parse.sh', 228 + 't1501-work-tree.sh', 229 + 't1502-rev-parse-parseopt.sh', 230 + 't1503-rev-parse-verify.sh', 231 + 't1504-ceiling-dirs.sh', 232 + 't1505-rev-parse-last.sh', 233 + 't1506-rev-parse-diagnosis.sh', 234 + 't1507-rev-parse-upstream.sh', 235 + 't1508-at-combinations.sh', 236 + 't1509-root-work-tree.sh', 237 + 't1510-repo-setup.sh', 238 + 't1511-rev-parse-caret.sh', 239 + 't1512-rev-parse-disambiguation.sh', 240 + 't1513-rev-parse-prefix.sh', 241 + 't1514-rev-parse-push.sh', 242 + 't1515-rev-parse-outside-repo.sh', 243 + 't1517-outside-repo.sh', 244 + 't1600-index.sh', 245 + 't1601-index-bogus.sh', 246 + 't1700-split-index.sh', 247 + 't1701-racy-split-index.sh', 248 + 't1800-hook.sh', 249 + 't2000-conflict-when-checking-files-out.sh', 250 + 't2002-checkout-cache-u.sh', 251 + 't2003-checkout-cache-mkdir.sh', 252 + 't2004-checkout-cache-temp.sh', 253 + 't2005-checkout-index-symlinks.sh', 254 + 't2006-checkout-index-basic.sh', 255 + 't2007-checkout-symlink.sh', 256 + 't2008-checkout-subdir.sh', 257 + 't2009-checkout-statinfo.sh', 258 + 't2010-checkout-ambiguous.sh', 259 + 't2011-checkout-invalid-head.sh', 260 + 't2012-checkout-last.sh', 261 + 't2013-checkout-submodule.sh', 262 + 't2014-checkout-switch.sh', 263 + 't2015-checkout-unborn.sh', 264 + 't2016-checkout-patch.sh', 265 + 't2017-checkout-orphan.sh', 266 + 't2018-checkout-branch.sh', 267 + 't2019-checkout-ambiguous-ref.sh', 268 + 't2020-checkout-detach.sh', 269 + 't2021-checkout-overwrite.sh', 270 + 't2022-checkout-paths.sh', 271 + 't2023-checkout-m.sh', 272 + 't2024-checkout-dwim.sh', 273 + 't2025-checkout-no-overlay.sh', 274 + 't2026-checkout-pathspec-file.sh', 275 + 't2027-checkout-track.sh', 276 + 't2030-unresolve-info.sh', 277 + 't2050-git-dir-relative.sh', 278 + 't2060-switch.sh', 279 + 't2070-restore.sh', 280 + 't2071-restore-patch.sh', 281 + 't2072-restore-pathspec-file.sh', 282 + 't2080-parallel-checkout-basics.sh', 283 + 't2081-parallel-checkout-collisions.sh', 284 + 't2082-parallel-checkout-attributes.sh', 285 + 't2100-update-cache-badpath.sh', 286 + 't2101-update-index-reupdate.sh', 287 + 't2102-update-index-symlinks.sh', 288 + 't2103-update-index-ignore-missing.sh', 289 + 't2104-update-index-skip-worktree.sh', 290 + 't2105-update-index-gitfile.sh', 291 + 't2106-update-index-assume-unchanged.sh', 292 + 't2107-update-index-basic.sh', 293 + 't2108-update-index-refresh-racy.sh', 294 + 't2200-add-update.sh', 295 + 't2201-add-update-typechange.sh', 296 + 't2202-add-addremove.sh', 297 + 't2203-add-intent.sh', 298 + 't2204-add-ignored.sh', 299 + 't2205-add-worktree-config.sh', 300 + 't2300-cd-to-toplevel.sh', 301 + 't2400-worktree-add.sh', 302 + 't2401-worktree-prune.sh', 303 + 't2402-worktree-list.sh', 304 + 't2403-worktree-move.sh', 305 + 't2404-worktree-config.sh', 306 + 't2405-worktree-submodule.sh', 307 + 't2406-worktree-repair.sh', 308 + 't2407-worktree-heads.sh', 309 + 't2500-untracked-overwriting.sh', 310 + 't2501-cwd-empty.sh', 311 + 't3000-ls-files-others.sh', 312 + 't3001-ls-files-others-exclude.sh', 313 + 't3002-ls-files-dashpath.sh', 314 + 't3003-ls-files-exclude.sh', 315 + 't3004-ls-files-basic.sh', 316 + 't3005-ls-files-relative.sh', 317 + 't3006-ls-files-long.sh', 318 + 't3007-ls-files-recurse-submodules.sh', 319 + 't3008-ls-files-lazy-init-name-hash.sh', 320 + 't3009-ls-files-others-nonsubmodule.sh', 321 + 't3010-ls-files-killed-modified.sh', 322 + 't3011-common-prefixes-and-directory-traversal.sh', 323 + 't3012-ls-files-dedup.sh', 324 + 't3013-ls-files-format.sh', 325 + 't3020-ls-files-error-unmatch.sh', 326 + 't3040-subprojects-basic.sh', 327 + 't3050-subprojects-fetch.sh', 328 + 't3060-ls-files-with-tree.sh', 329 + 't3070-wildmatch.sh', 330 + 't3100-ls-tree-restrict.sh', 331 + 't3101-ls-tree-dirname.sh', 332 + 't3102-ls-tree-wildcards.sh', 333 + 't3103-ls-tree-misc.sh', 334 + 't3104-ls-tree-format.sh', 335 + 't3105-ls-tree-output.sh', 336 + 't3200-branch.sh', 337 + 't3201-branch-contains.sh', 338 + 't3202-show-branch.sh', 339 + 't3203-branch-output.sh', 340 + 't3204-branch-name-interpretation.sh', 341 + 't3205-branch-color.sh', 342 + 't3206-range-diff.sh', 343 + 't3207-branch-submodule.sh', 344 + 't3211-peel-ref.sh', 345 + 't3300-funny-names.sh', 346 + 't3301-notes.sh', 347 + 't3302-notes-index-expensive.sh', 348 + 't3303-notes-subtrees.sh', 349 + 't3304-notes-mixed.sh', 350 + 't3305-notes-fanout.sh', 351 + 't3306-notes-prune.sh', 352 + 't3307-notes-man.sh', 353 + 't3308-notes-merge.sh', 354 + 't3309-notes-merge-auto-resolve.sh', 355 + 't3310-notes-merge-manual-resolve.sh', 356 + 't3311-notes-merge-fanout.sh', 357 + 't3320-notes-merge-worktrees.sh', 358 + 't3321-notes-stripspace.sh', 359 + 't3400-rebase.sh', 360 + 't3401-rebase-and-am-rename.sh', 361 + 't3402-rebase-merge.sh', 362 + 't3403-rebase-skip.sh', 363 + 't3404-rebase-interactive.sh', 364 + 't3405-rebase-malformed.sh', 365 + 't3406-rebase-message.sh', 366 + 't3407-rebase-abort.sh', 367 + 't3408-rebase-multi-line.sh', 368 + 't3409-rebase-environ.sh', 369 + 't3412-rebase-root.sh', 370 + 't3413-rebase-hook.sh', 371 + 't3415-rebase-autosquash.sh', 372 + 't3416-rebase-onto-threedots.sh', 373 + 't3417-rebase-whitespace-fix.sh', 374 + 't3418-rebase-continue.sh', 375 + 't3419-rebase-patch-id.sh', 376 + 't3420-rebase-autostash.sh', 377 + 't3421-rebase-topology-linear.sh', 378 + 't3422-rebase-incompatible-options.sh', 379 + 't3423-rebase-reword.sh', 380 + 't3424-rebase-empty.sh', 381 + 't3425-rebase-topology-merges.sh', 382 + 't3426-rebase-submodule.sh', 383 + 't3427-rebase-subtree.sh', 384 + 't3428-rebase-signoff.sh', 385 + 't3429-rebase-edit-todo.sh', 386 + 't3430-rebase-merges.sh', 387 + 't3431-rebase-fork-point.sh', 388 + 't3432-rebase-fast-forward.sh', 389 + 't3433-rebase-across-mode-change.sh', 390 + 't3434-rebase-i18n.sh', 391 + 't3435-rebase-gpg-sign.sh', 392 + 't3436-rebase-more-options.sh', 393 + 't3437-rebase-fixup-options.sh', 394 + 't3438-rebase-broken-files.sh', 395 + 't3500-cherry.sh', 396 + 't3501-revert-cherry-pick.sh', 397 + 't3502-cherry-pick-merge.sh', 398 + 't3503-cherry-pick-root.sh', 399 + 't3504-cherry-pick-rerere.sh', 400 + 't3505-cherry-pick-empty.sh', 401 + 't3506-cherry-pick-ff.sh', 402 + 't3507-cherry-pick-conflict.sh', 403 + 't3508-cherry-pick-many-commits.sh', 404 + 't3509-cherry-pick-merge-df.sh', 405 + 't3510-cherry-pick-sequence.sh', 406 + 't3511-cherry-pick-x.sh', 407 + 't3512-cherry-pick-submodule.sh', 408 + 't3513-revert-submodule.sh', 409 + 't3514-cherry-pick-revert-gpg.sh', 410 + 't3600-rm.sh', 411 + 't3601-rm-pathspec-file.sh', 412 + 't3602-rm-sparse-checkout.sh', 413 + 't3650-replay-basics.sh', 414 + 't3700-add.sh', 415 + 't3701-add-interactive.sh', 416 + 't3702-add-edit.sh', 417 + 't3703-add-magic-pathspec.sh', 418 + 't3704-add-pathspec-file.sh', 419 + 't3705-add-sparse-checkout.sh', 420 + 't3800-mktag.sh', 421 + 't3900-i18n-commit.sh', 422 + 't3901-i18n-patch.sh', 423 + 't3902-quoted.sh', 424 + 't3903-stash.sh', 425 + 't3904-stash-patch.sh', 426 + 't3905-stash-include-untracked.sh', 427 + 't3906-stash-submodule.sh', 428 + 't3907-stash-show-config.sh', 429 + 't3908-stash-in-worktree.sh', 430 + 't3909-stash-pathspec-file.sh', 431 + 't3910-mac-os-precompose.sh', 432 + 't3920-crlf-messages.sh', 433 + 't4000-diff-format.sh', 434 + 't4001-diff-rename.sh', 435 + 't4002-diff-basic.sh', 436 + 't4003-diff-rename-1.sh', 437 + 't4004-diff-rename-symlink.sh', 438 + 't4005-diff-rename-2.sh', 439 + 't4006-diff-mode.sh', 440 + 't4007-rename-3.sh', 441 + 't4008-diff-break-rewrite.sh', 442 + 't4009-diff-rename-4.sh', 443 + 't4010-diff-pathspec.sh', 444 + 't4011-diff-symlink.sh', 445 + 't4012-diff-binary.sh', 446 + 't4013-diff-various.sh', 447 + 't4014-format-patch.sh', 448 + 't4015-diff-whitespace.sh', 449 + 't4016-diff-quote.sh', 450 + 't4017-diff-retval.sh', 451 + 't4018-diff-funcname.sh', 452 + 't4019-diff-wserror.sh', 453 + 't4020-diff-external.sh', 454 + 't4021-format-patch-numbered.sh', 455 + 't4022-diff-rewrite.sh', 456 + 't4023-diff-rename-typechange.sh', 457 + 't4024-diff-optimize-common.sh', 458 + 't4025-hunk-header.sh', 459 + 't4026-color.sh', 460 + 't4027-diff-submodule.sh', 461 + 't4028-format-patch-mime-headers.sh', 462 + 't4029-diff-trailing-space.sh', 463 + 't4030-diff-textconv.sh', 464 + 't4031-diff-rewrite-binary.sh', 465 + 't4032-diff-inter-hunk-context.sh', 466 + 't4033-diff-patience.sh', 467 + 't4034-diff-words.sh', 468 + 't4035-diff-quiet.sh', 469 + 't4036-format-patch-signer-mime.sh', 470 + 't4037-diff-r-t-dirs.sh', 471 + 't4038-diff-combined.sh', 472 + 't4039-diff-assume-unchanged.sh', 473 + 't4040-whitespace-status.sh', 474 + 't4041-diff-submodule-option.sh', 475 + 't4042-diff-textconv-caching.sh', 476 + 't4043-diff-rename-binary.sh', 477 + 't4044-diff-index-unique-abbrev.sh', 478 + 't4045-diff-relative.sh', 479 + 't4046-diff-unmerged.sh', 480 + 't4047-diff-dirstat.sh', 481 + 't4048-diff-combined-binary.sh', 482 + 't4049-diff-stat-count.sh', 483 + 't4050-diff-histogram.sh', 484 + 't4051-diff-function-context.sh', 485 + 't4052-stat-output.sh', 486 + 't4053-diff-no-index.sh', 487 + 't4054-diff-bogus-tree.sh', 488 + 't4055-diff-context.sh', 489 + 't4056-diff-order.sh', 490 + 't4057-diff-combined-paths.sh', 491 + 't4058-diff-duplicates.sh', 492 + 't4059-diff-submodule-not-initialized.sh', 493 + 't4060-diff-submodule-option-diff-format.sh', 494 + 't4061-diff-indent.sh', 495 + 't4062-diff-pickaxe.sh', 496 + 't4063-diff-blobs.sh', 497 + 't4064-diff-oidfind.sh', 498 + 't4065-diff-anchored.sh', 499 + 't4066-diff-emit-delay.sh', 500 + 't4067-diff-partial-clone.sh', 501 + 't4068-diff-symmetric-merge-base.sh', 502 + 't4069-remerge-diff.sh', 503 + 't4100-apply-stat.sh', 504 + 't4101-apply-nonl.sh', 505 + 't4102-apply-rename.sh', 506 + 't4103-apply-binary.sh', 507 + 't4104-apply-boundary.sh', 508 + 't4105-apply-fuzz.sh', 509 + 't4106-apply-stdin.sh', 510 + 't4107-apply-ignore-whitespace.sh', 511 + 't4108-apply-threeway.sh', 512 + 't4109-apply-multifrag.sh', 513 + 't4110-apply-scan.sh', 514 + 't4111-apply-subdir.sh', 515 + 't4112-apply-renames.sh', 516 + 't4113-apply-ending.sh', 517 + 't4114-apply-typechange.sh', 518 + 't4115-apply-symlink.sh', 519 + 't4116-apply-reverse.sh', 520 + 't4117-apply-reject.sh', 521 + 't4118-apply-empty-context.sh', 522 + 't4119-apply-config.sh', 523 + 't4120-apply-popt.sh', 524 + 't4121-apply-diffs.sh', 525 + 't4122-apply-symlink-inside.sh', 526 + 't4123-apply-shrink.sh', 527 + 't4124-apply-ws-rule.sh', 528 + 't4125-apply-ws-fuzz.sh', 529 + 't4126-apply-empty.sh', 530 + 't4127-apply-same-fn.sh', 531 + 't4128-apply-root.sh', 532 + 't4129-apply-samemode.sh', 533 + 't4130-apply-criss-cross-rename.sh', 534 + 't4131-apply-fake-ancestor.sh', 535 + 't4132-apply-removal.sh', 536 + 't4133-apply-filenames.sh', 537 + 't4134-apply-submodule.sh', 538 + 't4135-apply-weird-filenames.sh', 539 + 't4136-apply-check.sh', 540 + 't4137-apply-submodule.sh', 541 + 't4138-apply-ws-expansion.sh', 542 + 't4139-apply-escape.sh', 543 + 't4140-apply-ita.sh', 544 + 't4141-apply-too-large.sh', 545 + 't4150-am.sh', 546 + 't4151-am-abort.sh', 547 + 't4152-am-subjects.sh', 548 + 't4153-am-resume-override-opts.sh', 549 + 't4200-rerere.sh', 550 + 't4201-shortlog.sh', 551 + 't4202-log.sh', 552 + 't4203-mailmap.sh', 553 + 't4204-patch-id.sh', 554 + 't4205-log-pretty-formats.sh', 555 + 't4206-log-follow-harder-copies.sh', 556 + 't4207-log-decoration-colors.sh', 557 + 't4208-log-magic-pathspec.sh', 558 + 't4209-log-pickaxe.sh', 559 + 't4210-log-i18n.sh', 560 + 't4211-line-log.sh', 561 + 't4212-log-corrupt.sh', 562 + 't4213-log-tabexpand.sh', 563 + 't4214-log-graph-octopus.sh', 564 + 't4215-log-skewed-merges.sh', 565 + 't4216-log-bloom.sh', 566 + 't4217-log-limit.sh', 567 + 't4252-am-options.sh', 568 + 't4253-am-keep-cr-dos.sh', 569 + 't4254-am-corrupt.sh', 570 + 't4255-am-submodule.sh', 571 + 't4256-am-format-flowed.sh', 572 + 't4257-am-interactive.sh', 573 + 't4258-am-quoted-cr.sh', 574 + 't4300-merge-tree.sh', 575 + 't4301-merge-tree-write-tree.sh', 576 + 't5000-tar-tree.sh', 577 + 't5001-archive-attr.sh', 578 + 't5002-archive-attr-pattern.sh', 579 + 't5003-archive-zip.sh', 580 + 't5004-archive-corner-cases.sh', 581 + 't5100-mailinfo.sh', 582 + 't5150-request-pull.sh', 583 + 't5200-update-server-info.sh', 584 + 't5300-pack-object.sh', 585 + 't5301-sliding-window.sh', 586 + 't5302-pack-index.sh', 587 + 't5303-pack-corruption-resilience.sh', 588 + 't5304-prune.sh', 589 + 't5305-include-tag.sh', 590 + 't5306-pack-nobase.sh', 591 + 't5307-pack-missing-commit.sh', 592 + 't5308-pack-detect-duplicates.sh', 593 + 't5309-pack-delta-cycles.sh', 594 + 't5310-pack-bitmaps.sh', 595 + 't5311-pack-bitmaps-shallow.sh', 596 + 't5312-prune-corruption.sh', 597 + 't5313-pack-bounds-checks.sh', 598 + 't5314-pack-cycle-detection.sh', 599 + 't5315-pack-objects-compression.sh', 600 + 't5316-pack-delta-depth.sh', 601 + 't5317-pack-objects-filter-objects.sh', 602 + 't5318-commit-graph.sh', 603 + 't5319-multi-pack-index.sh', 604 + 't5320-delta-islands.sh', 605 + 't5321-pack-large-objects.sh', 606 + 't5322-pack-objects-sparse.sh', 607 + 't5323-pack-redundant.sh', 608 + 't5324-split-commit-graph.sh', 609 + 't5325-reverse-index.sh', 610 + 't5326-multi-pack-bitmaps.sh', 611 + 't5327-multi-pack-bitmaps-rev.sh', 612 + 't5328-commit-graph-64bit-time.sh', 613 + 't5329-pack-objects-cruft.sh', 614 + 't5330-no-lazy-fetch-with-commit-graph.sh', 615 + 't5331-pack-objects-stdin.sh', 616 + 't5332-multi-pack-reuse.sh', 617 + 't5333-pseudo-merge-bitmaps.sh', 618 + 't5334-incremental-multi-pack-index.sh', 619 + 't5351-unpack-large-objects.sh', 620 + 't5400-send-pack.sh', 621 + 't5401-update-hooks.sh', 622 + 't5402-post-merge-hook.sh', 623 + 't5403-post-checkout-hook.sh', 624 + 't5404-tracking-branches.sh', 625 + 't5405-send-pack-rewind.sh', 626 + 't5406-remote-rejects.sh', 627 + 't5407-post-rewrite-hook.sh', 628 + 't5408-send-pack-stdin.sh', 629 + 't5409-colorize-remote-messages.sh', 630 + 't5410-receive-pack-alternates.sh', 631 + 't5411-proc-receive-hook.sh', 632 + 't5500-fetch-pack.sh', 633 + 't5501-fetch-push-alternates.sh', 634 + 't5502-quickfetch.sh', 635 + 't5503-tagfollow.sh', 636 + 't5504-fetch-receive-strict.sh', 637 + 't5505-remote.sh', 638 + 't5506-remote-groups.sh', 639 + 't5507-remote-environment.sh', 640 + 't5509-fetch-push-namespaces.sh', 641 + 't5510-fetch.sh', 642 + 't5511-refspec.sh', 643 + 't5512-ls-remote.sh', 644 + 't5513-fetch-track.sh', 645 + 't5514-fetch-multiple.sh', 646 + 't5515-fetch-merge-logic.sh', 647 + 't5516-fetch-push.sh', 648 + 't5517-push-mirror.sh', 649 + 't5518-fetch-exit-status.sh', 650 + 't5519-push-alternates.sh', 651 + 't5520-pull.sh', 652 + 't5521-pull-options.sh', 653 + 't5522-pull-symlink.sh', 654 + 't5523-push-upstream.sh', 655 + 't5524-pull-msg.sh', 656 + 't5525-fetch-tagopt.sh', 657 + 't5526-fetch-submodules.sh', 658 + 't5527-fetch-odd-refs.sh', 659 + 't5528-push-default.sh', 660 + 't5529-push-errors.sh', 661 + 't5530-upload-pack-error.sh', 662 + 't5531-deep-submodule-push.sh', 663 + 't5532-fetch-proxy.sh', 664 + 't5533-push-cas.sh', 665 + 't5534-push-signed.sh', 666 + 't5535-fetch-push-symref.sh', 667 + 't5536-fetch-conflicts.sh', 668 + 't5537-fetch-shallow.sh', 669 + 't5538-push-shallow.sh', 670 + 't5539-fetch-http-shallow.sh', 671 + 't5540-http-push-webdav.sh', 672 + 't5541-http-push-smart.sh', 673 + 't5542-push-http-shallow.sh', 674 + 't5543-atomic-push.sh', 675 + 't5544-pack-objects-hook.sh', 676 + 't5545-push-options.sh', 677 + 't5546-receive-limits.sh', 678 + 't5547-push-quarantine.sh', 679 + 't5548-push-porcelain.sh', 680 + 't5549-fetch-push-http.sh', 681 + 't5550-http-fetch-dumb.sh', 682 + 't5551-http-fetch-smart.sh', 683 + 't5552-skipping-fetch-negotiator.sh', 684 + 't5553-set-upstream.sh', 685 + 't5554-noop-fetch-negotiator.sh', 686 + 't5555-http-smart-common.sh', 687 + 't5557-http-get.sh', 688 + 't5558-clone-bundle-uri.sh', 689 + 't5559-http-fetch-smart-http2.sh', 690 + 't5560-http-backend-noserver.sh', 691 + 't5561-http-backend.sh', 692 + 't5562-http-backend-content-length.sh', 693 + 't5563-simple-http-auth.sh', 694 + 't5564-http-proxy.sh', 695 + 't5570-git-daemon.sh', 696 + 't5571-pre-push-hook.sh', 697 + 't5572-pull-submodule.sh', 698 + 't5573-pull-verify-signatures.sh', 699 + 't5574-fetch-output.sh', 700 + 't5580-unc-paths.sh', 701 + 't5581-http-curl-verbose.sh', 702 + 't5582-fetch-negative-refspec.sh', 703 + 't5583-push-branches.sh', 704 + 't5600-clone-fail-cleanup.sh', 705 + 't5601-clone.sh', 706 + 't5602-clone-remote-exec.sh', 707 + 't5603-clone-dirname.sh', 708 + 't5604-clone-reference.sh', 709 + 't5605-clone-local.sh', 710 + 't5606-clone-options.sh', 711 + 't5607-clone-bundle.sh', 712 + 't5608-clone-2gb.sh', 713 + 't5609-clone-branch.sh', 714 + 't5610-clone-detached.sh', 715 + 't5611-clone-config.sh', 716 + 't5612-clone-refspec.sh', 717 + 't5613-info-alternate.sh', 718 + 't5614-clone-submodules-shallow.sh', 719 + 't5615-alternate-env.sh', 720 + 't5616-partial-clone.sh', 721 + 't5617-clone-submodules-remote.sh', 722 + 't5618-alternate-refs.sh', 723 + 't5619-clone-local-ambiguous-transport.sh', 724 + 't5700-protocol-v1.sh', 725 + 't5701-git-serve.sh', 726 + 't5702-protocol-v2.sh', 727 + 't5703-upload-pack-ref-in-want.sh', 728 + 't5704-protocol-violations.sh', 729 + 't5705-session-id-in-capabilities.sh', 730 + 't5730-protocol-v2-bundle-uri-file.sh', 731 + 't5731-protocol-v2-bundle-uri-git.sh', 732 + 't5732-protocol-v2-bundle-uri-http.sh', 733 + 't5750-bundle-uri-parse.sh', 734 + 't5801-remote-helpers.sh', 735 + 't5802-connect-helper.sh', 736 + 't5810-proto-disable-local.sh', 737 + 't5811-proto-disable-git.sh', 738 + 't5812-proto-disable-http.sh', 739 + 't5813-proto-disable-ssh.sh', 740 + 't5814-proto-disable-ext.sh', 741 + 't5815-submodule-protos.sh', 742 + 't5900-repo-selection.sh', 743 + 't6000-rev-list-misc.sh', 744 + 't6001-rev-list-graft.sh', 745 + 't6002-rev-list-bisect.sh', 746 + 't6003-rev-list-topo-order.sh', 747 + 't6004-rev-list-path-optim.sh', 748 + 't6005-rev-list-count.sh', 749 + 't6006-rev-list-format.sh', 750 + 't6007-rev-list-cherry-pick-file.sh', 751 + 't6008-rev-list-submodule.sh', 752 + 't6009-rev-list-parent.sh', 753 + 't6010-merge-base.sh', 754 + 't6011-rev-list-with-bad-commit.sh', 755 + 't6012-rev-list-simplify.sh', 756 + 't6013-rev-list-reverse-parents.sh', 757 + 't6014-rev-list-all.sh', 758 + 't6016-rev-list-graph-simplify-history.sh', 759 + 't6017-rev-list-stdin.sh', 760 + 't6018-rev-list-glob.sh', 761 + 't6019-rev-list-ancestry-path.sh', 762 + 't6020-bundle-misc.sh', 763 + 't6021-rev-list-exclude-hidden.sh', 764 + 't6022-rev-list-missing.sh', 765 + 't6030-bisect-porcelain.sh', 766 + 't6040-tracking-info.sh', 767 + 't6041-bisect-submodule.sh', 768 + 't6050-replace.sh', 769 + 't6060-merge-index.sh', 770 + 't6100-rev-list-in-order.sh', 771 + 't6101-rev-parse-parents.sh', 772 + 't6102-rev-list-unexpected-objects.sh', 773 + 't6110-rev-list-sparse.sh', 774 + 't6111-rev-list-treesame.sh', 775 + 't6112-rev-list-filters-objects.sh', 776 + 't6113-rev-list-bitmap-filters.sh', 777 + 't6114-keep-packs.sh', 778 + 't6115-rev-list-du.sh', 779 + 't6120-describe.sh', 780 + 't6130-pathspec-noglob.sh', 781 + 't6131-pathspec-icase.sh', 782 + 't6132-pathspec-exclude.sh', 783 + 't6133-pathspec-rev-dwim.sh', 784 + 't6134-pathspec-in-submodule.sh', 785 + 't6135-pathspec-with-attrs.sh', 786 + 't6136-pathspec-in-bare.sh', 787 + 't6200-fmt-merge-msg.sh', 788 + 't6300-for-each-ref.sh', 789 + 't6301-for-each-ref-errors.sh', 790 + 't6302-for-each-ref-filter.sh', 791 + 't6400-merge-df.sh', 792 + 't6401-merge-criss-cross.sh', 793 + 't6402-merge-rename.sh', 794 + 't6403-merge-file.sh', 795 + 't6404-recursive-merge.sh', 796 + 't6405-merge-symlinks.sh', 797 + 't6406-merge-attr.sh', 798 + 't6407-merge-binary.sh', 799 + 't6408-merge-up-to-date.sh', 800 + 't6409-merge-subtree.sh', 801 + 't6411-merge-filemode.sh', 802 + 't6412-merge-large-rename.sh', 803 + 't6413-merge-crlf.sh', 804 + 't6414-merge-rename-nocruft.sh', 805 + 't6415-merge-dir-to-symlink.sh', 806 + 't6416-recursive-corner-cases.sh', 807 + 't6417-merge-ours-theirs.sh', 808 + 't6418-merge-text-auto.sh', 809 + 't6419-merge-ignorecase.sh', 810 + 't6421-merge-partial-clone.sh', 811 + 't6422-merge-rename-corner-cases.sh', 812 + 't6423-merge-rename-directories.sh', 813 + 't6424-merge-unrelated-index-changes.sh', 814 + 't6425-merge-rename-delete.sh', 815 + 't6426-merge-skip-unneeded-updates.sh', 816 + 't6427-diff3-conflict-markers.sh', 817 + 't6428-merge-conflicts-sparse.sh', 818 + 't6429-merge-sequence-rename-caching.sh', 819 + 't6430-merge-recursive.sh', 820 + 't6431-merge-criscross.sh', 821 + 't6432-merge-recursive-space-options.sh', 822 + 't6433-merge-toplevel.sh', 823 + 't6434-merge-recursive-rename-options.sh', 824 + 't6435-merge-sparse.sh', 825 + 't6436-merge-overwrite.sh', 826 + 't6437-submodule-merge.sh', 827 + 't6438-submodule-directory-file-conflicts.sh', 828 + 't6439-merge-co-error-msgs.sh', 829 + 't6500-gc.sh', 830 + 't6501-freshen-objects.sh', 831 + 't6600-test-reach.sh', 832 + 't6700-tree-depth.sh', 833 + 't7001-mv.sh', 834 + 't7002-mv-sparse-checkout.sh', 835 + 't7003-filter-branch.sh', 836 + 't7004-tag.sh', 837 + 't7005-editor.sh', 838 + 't7006-pager.sh', 839 + 't7007-show.sh', 840 + 't7008-filter-branch-null-sha1.sh', 841 + 't7010-setup.sh', 842 + 't7011-skip-worktree-reading.sh', 843 + 't7012-skip-worktree-writing.sh', 844 + 't7030-verify-tag.sh', 845 + 't7031-verify-tag-signed-ssh.sh', 846 + 't7060-wtstatus.sh', 847 + 't7061-wtstatus-ignore.sh', 848 + 't7062-wtstatus-ignorecase.sh', 849 + 't7063-status-untracked-cache.sh', 850 + 't7064-wtstatus-pv2.sh', 851 + 't7101-reset-empty-subdirs.sh', 852 + 't7102-reset.sh', 853 + 't7103-reset-bare.sh', 854 + 't7104-reset-hard.sh', 855 + 't7105-reset-patch.sh', 856 + 't7106-reset-unborn-branch.sh', 857 + 't7107-reset-pathspec-file.sh', 858 + 't7110-reset-merge.sh', 859 + 't7111-reset-table.sh', 860 + 't7112-reset-submodule.sh', 861 + 't7113-post-index-change-hook.sh', 862 + 't7201-co.sh', 863 + 't7300-clean.sh', 864 + 't7301-clean-interactive.sh', 865 + 't7400-submodule-basic.sh', 866 + 't7401-submodule-summary.sh', 867 + 't7402-submodule-rebase.sh', 868 + 't7403-submodule-sync.sh', 869 + 't7406-submodule-update.sh', 870 + 't7407-submodule-foreach.sh', 871 + 't7408-submodule-reference.sh', 872 + 't7409-submodule-detached-work-tree.sh', 873 + 't7411-submodule-config.sh', 874 + 't7412-submodule-absorbgitdirs.sh', 875 + 't7413-submodule-is-active.sh', 876 + 't7414-submodule-mistakes.sh', 877 + 't7416-submodule-dash-url.sh', 878 + 't7417-submodule-path-url.sh', 879 + 't7418-submodule-sparse-gitmodules.sh', 880 + 't7419-submodule-set-branch.sh', 881 + 't7420-submodule-set-url.sh', 882 + 't7421-submodule-summary-add.sh', 883 + 't7422-submodule-output.sh', 884 + 't7423-submodule-symlinks.sh', 885 + 't7424-submodule-mixed-ref-formats.sh', 886 + 't7450-bad-git-dotfiles.sh', 887 + 't7500-commit-template-squash-signoff.sh', 888 + 't7501-commit-basic-functionality.sh', 889 + 't7502-commit-porcelain.sh', 890 + 't7503-pre-commit-and-pre-merge-commit-hooks.sh', 891 + 't7504-commit-msg-hook.sh', 892 + 't7505-prepare-commit-msg-hook.sh', 893 + 't7506-status-submodule.sh', 894 + 't7507-commit-verbose.sh', 895 + 't7508-status.sh', 896 + 't7509-commit-authorship.sh', 897 + 't7510-signed-commit.sh', 898 + 't7511-status-index.sh', 899 + 't7512-status-help.sh', 900 + 't7513-interpret-trailers.sh', 901 + 't7514-commit-patch.sh', 902 + 't7515-status-symlinks.sh', 903 + 't7516-commit-races.sh', 904 + 't7517-per-repo-email.sh', 905 + 't7518-ident-corner-cases.sh', 906 + 't7519-status-fsmonitor.sh', 907 + 't7520-ignored-hook-warning.sh', 908 + 't7521-ignored-mode.sh', 909 + 't7524-commit-summary.sh', 910 + 't7525-status-rename.sh', 911 + 't7526-commit-pathspec-file.sh', 912 + 't7527-builtin-fsmonitor.sh', 913 + 't7528-signed-commit-ssh.sh', 914 + 't7600-merge.sh', 915 + 't7601-merge-pull-config.sh', 916 + 't7602-merge-octopus-many.sh', 917 + 't7603-merge-reduce-heads.sh', 918 + 't7604-merge-custom-message.sh', 919 + 't7605-merge-resolve.sh', 920 + 't7606-merge-custom.sh', 921 + 't7607-merge-state.sh', 922 + 't7608-merge-messages.sh', 923 + 't7609-mergetool--lib.sh', 924 + 't7610-mergetool.sh', 925 + 't7611-merge-abort.sh', 926 + 't7612-merge-verify-signatures.sh', 927 + 't7614-merge-signoff.sh', 928 + 't7615-diff-algo-with-mergy-operations.sh', 929 + 't7700-repack.sh', 930 + 't7701-repack-unpack-unreachable.sh', 931 + 't7702-repack-cyclic-alternate.sh', 932 + 't7703-repack-geometric.sh', 933 + 't7704-repack-cruft.sh', 934 + 't7800-difftool.sh', 935 + 't7810-grep.sh', 936 + 't7811-grep-open.sh', 937 + 't7812-grep-icase-non-ascii.sh', 938 + 't7813-grep-icase-iso.sh', 939 + 't7814-grep-recurse-submodules.sh', 940 + 't7815-grep-binary.sh', 941 + 't7816-grep-binary-pattern.sh', 942 + 't7817-grep-sparse-checkout.sh', 943 + 't7900-maintenance.sh', 944 + 't8001-annotate.sh', 945 + 't8002-blame.sh', 946 + 't8003-blame-corner-cases.sh', 947 + 't8004-blame-with-conflicts.sh', 948 + 't8005-blame-i18n.sh', 949 + 't8006-blame-textconv.sh', 950 + 't8007-cat-file-textconv.sh', 951 + 't8008-blame-formats.sh', 952 + 't8009-blame-vs-topicbranches.sh', 953 + 't8010-cat-file-filters.sh', 954 + 't8011-blame-split-file.sh', 955 + 't8012-blame-colors.sh', 956 + 't8013-blame-ignore-revs.sh', 957 + 't8014-blame-ignore-fuzzy.sh', 958 + 't9001-send-email.sh', 959 + 't9002-column.sh', 960 + 't9003-help-autocorrect.sh', 961 + 't9100-git-svn-basic.sh', 962 + 't9101-git-svn-props.sh', 963 + 't9102-git-svn-deep-rmdir.sh', 964 + 't9103-git-svn-tracked-directory-removed.sh', 965 + 't9104-git-svn-follow-parent.sh', 966 + 't9105-git-svn-commit-diff.sh', 967 + 't9106-git-svn-commit-diff-clobber.sh', 968 + 't9107-git-svn-migrate.sh', 969 + 't9108-git-svn-glob.sh', 970 + 't9109-git-svn-multi-glob.sh', 971 + 't9110-git-svn-use-svm-props.sh', 972 + 't9111-git-svn-use-svnsync-props.sh', 973 + 't9112-git-svn-md5less-file.sh', 974 + 't9113-git-svn-dcommit-new-file.sh', 975 + 't9114-git-svn-dcommit-merge.sh', 976 + 't9115-git-svn-dcommit-funky-renames.sh', 977 + 't9116-git-svn-log.sh', 978 + 't9117-git-svn-init-clone.sh', 979 + 't9118-git-svn-funky-branch-names.sh', 980 + 't9119-git-svn-info.sh', 981 + 't9120-git-svn-clone-with-percent-escapes.sh', 982 + 't9121-git-svn-fetch-renamed-dir.sh', 983 + 't9122-git-svn-author.sh', 984 + 't9123-git-svn-rebuild-with-rewriteroot.sh', 985 + 't9124-git-svn-dcommit-auto-props.sh', 986 + 't9125-git-svn-multi-glob-branch-names.sh', 987 + 't9126-git-svn-follow-deleted-readded-directory.sh', 988 + 't9127-git-svn-partial-rebuild.sh', 989 + 't9128-git-svn-cmd-branch.sh', 990 + 't9129-git-svn-i18n-commitencoding.sh', 991 + 't9130-git-svn-authors-file.sh', 992 + 't9131-git-svn-empty-symlink.sh', 993 + 't9132-git-svn-broken-symlink.sh', 994 + 't9133-git-svn-nested-git-repo.sh', 995 + 't9134-git-svn-ignore-paths.sh', 996 + 't9135-git-svn-moved-branch-empty-file.sh', 997 + 't9136-git-svn-recreated-branch-empty-file.sh', 998 + 't9137-git-svn-dcommit-clobber-series.sh', 999 + 't9138-git-svn-authors-prog.sh', 1000 + 't9139-git-svn-non-utf8-commitencoding.sh', 1001 + 't9140-git-svn-reset.sh', 1002 + 't9141-git-svn-multiple-branches.sh', 1003 + 't9142-git-svn-shallow-clone.sh', 1004 + 't9143-git-svn-gc.sh', 1005 + 't9144-git-svn-old-rev_map.sh', 1006 + 't9145-git-svn-master-branch.sh', 1007 + 't9146-git-svn-empty-dirs.sh', 1008 + 't9147-git-svn-include-paths.sh', 1009 + 't9148-git-svn-propset.sh', 1010 + 't9150-svk-mergetickets.sh', 1011 + 't9151-svn-mergeinfo.sh', 1012 + 't9152-svn-empty-dirs-after-gc.sh', 1013 + 't9153-git-svn-rewrite-uuid.sh', 1014 + 't9154-git-svn-fancy-glob.sh', 1015 + 't9155-git-svn-fetch-deleted-tag.sh', 1016 + 't9156-git-svn-fetch-deleted-tag-2.sh', 1017 + 't9157-git-svn-fetch-merge.sh', 1018 + 't9158-git-svn-mergeinfo.sh', 1019 + 't9159-git-svn-no-parent-mergeinfo.sh', 1020 + 't9160-git-svn-preserve-empty-dirs.sh', 1021 + 't9161-git-svn-mergeinfo-push.sh', 1022 + 't9162-git-svn-dcommit-interactive.sh', 1023 + 't9163-git-svn-reset-clears-caches.sh', 1024 + 't9164-git-svn-dcommit-concurrent.sh', 1025 + 't9165-git-svn-fetch-merge-branch-of-branch.sh', 1026 + 't9166-git-svn-fetch-merge-branch-of-branch2.sh', 1027 + 't9167-git-svn-cmd-branch-subproject.sh', 1028 + 't9168-git-svn-partially-globbed-names.sh', 1029 + 't9169-git-svn-dcommit-crlf.sh', 1030 + 't9200-git-cvsexportcommit.sh', 1031 + 't9210-scalar.sh', 1032 + 't9211-scalar-clone.sh', 1033 + 't9300-fast-import.sh', 1034 + 't9301-fast-import-notes.sh', 1035 + 't9302-fast-import-unpack-limit.sh', 1036 + 't9303-fast-import-compression.sh', 1037 + 't9304-fast-import-marks.sh', 1038 + 't9350-fast-export.sh', 1039 + 't9351-fast-export-anonymize.sh', 1040 + 't9400-git-cvsserver-server.sh', 1041 + 't9401-git-cvsserver-crlf.sh', 1042 + 't9402-git-cvsserver-refs.sh', 1043 + 't9500-gitweb-standalone-no-errors.sh', 1044 + 't9501-gitweb-standalone-http-status.sh', 1045 + 't9502-gitweb-standalone-parse-output.sh', 1046 + 't9600-cvsimport.sh', 1047 + 't9601-cvsimport-vendor-branch.sh', 1048 + 't9602-cvsimport-branches-tags.sh', 1049 + 't9603-cvsimport-patchsets.sh', 1050 + 't9604-cvsimport-timestamps.sh', 1051 + 't9700-perl-git.sh', 1052 + 't9800-git-p4-basic.sh', 1053 + 't9801-git-p4-branch.sh', 1054 + 't9802-git-p4-filetype.sh', 1055 + 't9803-git-p4-shell-metachars.sh', 1056 + 't9804-git-p4-label.sh', 1057 + 't9805-git-p4-skip-submit-edit.sh', 1058 + 't9806-git-p4-options.sh', 1059 + 't9807-git-p4-submit.sh', 1060 + 't9808-git-p4-chdir.sh', 1061 + 't9809-git-p4-client-view.sh', 1062 + 't9810-git-p4-rcs.sh', 1063 + 't9811-git-p4-label-import.sh', 1064 + 't9812-git-p4-wildcards.sh', 1065 + 't9813-git-p4-preserve-users.sh', 1066 + 't9814-git-p4-rename.sh', 1067 + 't9815-git-p4-submit-fail.sh', 1068 + 't9816-git-p4-locked.sh', 1069 + 't9817-git-p4-exclude.sh', 1070 + 't9818-git-p4-block.sh', 1071 + 't9819-git-p4-case-folding.sh', 1072 + 't9820-git-p4-editor-handling.sh', 1073 + 't9821-git-p4-path-variations.sh', 1074 + 't9822-git-p4-path-encoding.sh', 1075 + 't9823-git-p4-mock-lfs.sh', 1076 + 't9824-git-p4-git-lfs.sh', 1077 + 't9825-git-p4-handle-utf16-without-bom.sh', 1078 + 't9826-git-p4-keep-empty-commits.sh', 1079 + 't9827-git-p4-change-filetype.sh', 1080 + 't9828-git-p4-map-user.sh', 1081 + 't9829-git-p4-jobs.sh', 1082 + 't9830-git-p4-symlink-dir.sh', 1083 + 't9831-git-p4-triggers.sh', 1084 + 't9832-unshelve.sh', 1085 + 't9833-errors.sh', 1086 + 't9834-git-p4-file-dir-bug.sh', 1087 + 't9835-git-p4-metadata-encoding-python2.sh', 1088 + 't9836-git-p4-metadata-encoding-python3.sh', 1089 + 't9850-shell.sh', 1090 + 't9901-git-web--browse.sh', 1091 + 't9902-completion.sh', 1092 + 't9903-bash-prompt.sh', 1093 + ] 1094 + 1095 + # GIT_BUILD_DIR needs to be Unix-style without drive prefixes as it get added 1096 + # to the PATH variable. And given that drive prefixes contain a colon we'd 1097 + # otherwise end up with a broken PATH if we didn't convert it. 1098 + git_build_dir = meson.project_build_root() 1099 + if cygpath.found() 1100 + git_build_dir = run_command(cygpath, git_build_dir, check: true).stdout().strip() 1101 + endif 1102 + 1103 + test_environment = script_environment 1104 + test_environment.set('GIT_BUILD_DIR', git_build_dir) 1105 + 1106 + foreach integration_test : integration_tests 1107 + test(fs.stem(integration_test), shell, 1108 + args: [ integration_test ], 1109 + workdir: meson.current_source_dir(), 1110 + env: test_environment, 1111 + depends: test_dependencies + bin_wrappers, 1112 + timeout: 0, 1113 + ) 1114 + endforeach
+26
templates/hooks/meson.build
··· 1 + hooks = [ 2 + 'applypatch-msg.sample', 3 + 'commit-msg.sample', 4 + 'fsmonitor-watchman.sample', 5 + 'post-update.sample', 6 + 'pre-applypatch.sample', 7 + 'pre-commit.sample', 8 + 'pre-merge-commit.sample', 9 + 'prepare-commit-msg.sample', 10 + 'pre-push.sample', 11 + 'pre-rebase.sample', 12 + 'pre-receive.sample', 13 + 'push-to-checkout.sample', 14 + 'sendemail-validate.sample', 15 + 'update.sample', 16 + ] 17 + 18 + foreach hook : hooks 19 + configure_file( 20 + input: hook, 21 + output: hook, 22 + configuration: template_config, 23 + install: true, 24 + install_dir: get_option('datadir') / 'git-core/templates/hooks', 25 + ) 26 + endforeach
+7
templates/info/meson.build
··· 1 + configure_file( 2 + input: 'exclude', 3 + output: 'exclude', 4 + configuration: template_config, 5 + install: true, 6 + install_dir: get_option('datadir') / 'git-core/templates/info', 7 + )
+15
templates/meson.build
··· 1 + template_config = configuration_data() 2 + template_config.set('PERL_PATH', perl.found() ? fs.as_posix(perl.full_path()) : '') 3 + template_config.set('SHELL_PATH', fs.as_posix(shell.full_path())) 4 + template_config.set('GITWEBDIR', fs.as_posix(get_option('prefix') / get_option('datadir') / 'gitweb')) 5 + 6 + configure_file( 7 + input: 'description', 8 + output: 'description', 9 + configuration: template_config, 10 + install: true, 11 + install_dir: get_option('datadir') / 'git-core/templates', 12 + ) 13 + 14 + subdir('hooks') 15 + subdir('info')