* Impossible to change working directory
@ 2016-09-29 19:30 Sebastian Feldmann
2016-09-29 23:24 ` Junio C Hamano
2016-10-01 15:34 ` Torsten Bögershausen
0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Feldmann @ 2016-09-29 19:30 UTC (permalink / raw)
To: git
Hi there,
I have a problem executing a pre-commit hook.
The hook script has to change the working directory to work and if I use plain
git commit
it works as expected, the script executes without errors, but if I use
git commit —only file.x file.y
the script fails because changing the current working directory fails.
If I echo the current working directory it always echoes the root repository path
Is this expected behavior?
Thanks for your feedback.
Cheers Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Impossible to change working directory
2016-09-29 19:30 Impossible to change working directory Sebastian Feldmann
@ 2016-09-29 23:24 ` Junio C Hamano
2016-10-01 15:34 ` Torsten Bögershausen
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2016-09-29 23:24 UTC (permalink / raw)
To: Sebastian Feldmann; +Cc: git
Sebastian Feldmann <sf@sebastian-feldmann.info> writes:
> the script fails because changing the current working directory fails.
> If I echo the current working directory it always echoes the root repository path
>
> Is this expected behavior?
Yes, we always go to the top before doing anything.
If you echo environment variables Git may set up for you, what do
you see? Do you see GIT_PREFIX that you can use to tell where you
came from, or something like that?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Impossible to change working directory
2016-09-29 19:30 Impossible to change working directory Sebastian Feldmann
2016-09-29 23:24 ` Junio C Hamano
@ 2016-10-01 15:34 ` Torsten Bögershausen
1 sibling, 0 replies; 3+ messages in thread
From: Torsten Bögershausen @ 2016-10-01 15:34 UTC (permalink / raw)
To: Sebastian Feldmann, git
On 29.09.16 21:30, Sebastian Feldmann wrote:
> Hi there,
>
> I have a problem executing a pre-commit hook.
> The hook script has to change the working directory to work and if I use plain
>
> git commit
>
> it works as expected, the script executes without errors, but if I use
>
> git commit —only file.x file.y
>
> the script fails because changing the current working directory fails.
> If I echo the current working directory it always echoes the root repository path
>
> Is this expected behavior?
> Thanks for your feedback.
Is there any chance to send us the content of the script ?
(Or a demo example, which doesn't work)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-01 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 19:30 Impossible to change working directory Sebastian Feldmann
2016-09-29 23:24 ` Junio C Hamano
2016-10-01 15:34 ` Torsten Bögershausen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.