--exec-path not always honored

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux