Skip to content
  • Johannes Schindelin's avatar
    rev-parse: respect core.hooksPath in --git-path · 9445b492
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The idea of the --git-path option is not only to avoid having to
    prefix paths with the output of --git-dir all the time, but also to
    respect overrides for specific common paths inside the .git directory
    (e.g. `git rev-parse --git-path objects` will report the value of the
    environment variable GIT_OBJECT_DIRECTORY, if set).
    
    When introducing the core.hooksPath setting, we forgot to adjust
    git_path() accordingly. This patch fixes that.
    
    While at it, revert the special-casing of core.hooksPath in
    run-command.c, as it is now no longer needed.
    
    Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9445b492