HomeFreeBSD

Fix git tools when run against a worktree

Description

Fix git tools when run against a worktree

In a git worktree, the gitdir is in an entirely different location.
In arcgit, use git rev-parse --git-dir to get the correct path to it
always.

When running git from outside of the work tree, as in importgit,
the path provided by git rev-parse --git-dir can be either a
relative or absolute path depending on the work tree. Rather
than trying to deal with that, just use git -C.

Differential Revision: https://reviews.freebsd.org/D8501
Reviewed by: markj

Details

Provenance
rstoneAuthored on
Reviewer
markj
Differential Revision
D8501: Fix arcgit when run from a worktree
Parents
rS308561: Correct spelling in syslog: getttimeofday -> gettimeofday
Branches
Unknown
Tags
Unknown