Re: [PATCH 1/3] After chdir to run grep, return to old directory
- From
David Turner <dturner@twopensource.com>
- Date
- May 7, 2014, 00:06 UTC
- Message-ID
- <1399421211.11843.53.camel@stross>
- In-Reply-To
- <xmqqtx92czqv.fsf@gitster.dls.corp.google.com>
On Tue, 2014-05-06 at 15:24 -0700, Junio C Hamano wrote:
Show 7 quoted lines
> dturner@twopensource.com writes: > > > From: David Turner <dturner@twitter.com> > > > > Signed-off-by: David Turner <dturner@twitter.com> > > Ehh, why?
Briefly, because otherwise ./t7811-grep-open.sh fails when run under watchman.
This is actually something that I think I'm doing wrong, but I can't see what the sensible way to do it is. When we go to write the fs_cache (in an atexit hook), we use get_fs_cache_file() from environment.c. This is a relative path, because all of the other similar paths are. So if we have chdired, then we fail.