Re: [PATCH 0/4] git --paginate: do not commit pager choice too early
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 28, 2010, 10:13 UTC
- Message-ID
- <20100628101335.GA5007@burratino>
- In-Reply-To
- <20100628094033.GA18629@coredump.intra.peff.net>
Jeff King wrote:
> But reading the message for patch 4/4, I can't help but wonder if the > right way forward is for the git wrapper to _always_ find the repository > as the very first thing.
[...]
> the worst case should be a little bit of > wasted effort.
This is a very useful thought. Git without the chdir() to toplevel would be pleasanter, I think. (Yes, I realize you weren’t necessarily suggesting suppressing a chdir_to_toplevel() in place of setup_git_repository() and friends.)
Regarding the repository search: automounters can cause pain if DISCOVERY_ACROSS_FILESYSTEM is set and GIT_CEILING_DIRECTORIES is not set appropriately. An important script that does
tmpdir=$(mktemp -d) cd "$tmpdir" ...
git diff --no-index a b ...
could hang indefinitely if some nut has created a named pipe at /tmp/.git. I haven’t come up with any non far-fetched reason to mind the repository search, though.
Will think about this.