Absolute Worktree.directory
commit1005bd9033b3bab67e954c672710a78573aa2674
authorPeter Grayson <pete@jpgrayson.net>
Fri, 23 Apr 2021 21:16:34 +0000 (23 17:16 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Fri, 23 Apr 2021 22:26:01 +0000 (23 18:26 -0400)
tree9945453dc162f3a8836870757447904a2d2beff3
parent1719c9c60daf445f7da8f5f1874f493ae300eb9f
Absolute Worktree.directory

Instead of Worktree.directory being the relative cdup path to the root of
the worktree, it is now the absolute path to the root of the worktree.

This allows Worktree to just have a regular env() method obviates the
env_in_cwd() method; i.e. because GIT_WORK_TREE is now always the absolute
path.

IndexAndWorktree is further simplified by removing the cwd property. The
only user of iw.cwd, get_hook(), now references Worktree.directory instead.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
stgit/lib/git/iw.py
stgit/utils.py