git/list[1] front-page[2] threads[3] people[4] search[5] about
 

--exec-path not always honored

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 17, 2009, 09:11 UTC
Message-ID
<49BF692B.9020002@viscovery.net>
I noticed this failure if I run git from the build directory:
$ ./git --exec-path=. gc
usage: git pack-objects [{ -q | --progress | --all-progress }]
        [--max-pack-size=N] [--local] [--incremental]
        [--window=N] [--window-memory=N] [--depth=N]
        [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]
        [--threads=N] [--non-empty] [--revs [--unpacked | --all]*] [--reflog]
        [--include-tag] [--keep-unreachable | --unpack-unreachable]
        --stdout | base-name < ref-or-object-list
error: failed to run repack

The reason is that the version of pack-objects that I have installed in $prefix does not know the option --kept-pack-only, which ./git-repack passes along. It doesn't matter whether I have $prefix in PATH or not.

But on the other hand:

$ ./git --exec-path=. repack -a -d Counting objects: 104070, done. Delta compression using 2 threads. Compressing objects: 100% (26161/26161), done. Writing objects: 100% (104070/104070), done. Total 104070 (delta 76376), reused 104070 (delta 76376)

works just fine whereas without --exec-path it fails like git-gc above.

git-gc is a builtin. Should git setenv("GIT_EXEC_PATH") before it runs other git commands?

-- Hannes
Next: Johannes Schindelin
Message 1 of 5 in “--exec-path not always honored”
  1. Johannes SixtMar 17, 2009
  2. Johannes SchindelinMar 17, 2009
  3. Johannes SixtMar 17, 2009
  4. Junio C HamanoMar 18, 2009
  5. Johannes SixtMar 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.