Re: Weird output of git status in pre-commit hook when providing a pathspec on commit

2015-02-04 Thread Michaël Fortin
Interesting! Thanks for the info; unsetting git environment variables as you suggested fixes my issue on OS X (and Linux I suppose). I’m going to try this on Windows soon. Would that work as-is on Windows, or would I need to unset the vars using some other Windows-specific syntax? Yes, I looke

Re: Weird output of git status in pre-commit hook when providing a pathspec on commit

2015-02-03 Thread Jeff King
On Tue, Feb 03, 2015 at 08:14:06AM -0500, Michaël Fortin wrote: > Repo1 has the following pre-commit hook: > > #!/bin/bash > git -C "../Repo2" status --porcelain > > I then commit in Repo1 using the following (this is actually ran by a > GUI, I have no control over the commands themselves): > >

Weird output of git status in pre-commit hook when providing a pathspec on commit

2015-02-03 Thread Michaël Fortin
Hi all, I'm seeing behavior that I *think* might be a bug in git (I'm running 2.2.2). At least I couldn't find anything about this anywhere, so here goes: I'm trying to run git commands outside of the current working copy (e.g. inside another repo) from a pre-commit hook. However I'm encounteri