public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* Not a git repository: '.'
@ 2012-03-24 17:26 greened
  2012-03-24 18:14 ` Johannes Sixt
  0 siblings, 1 reply; 3+ messages in thread
From: greened @ 2012-03-24 17:26 UTC (permalink / raw)
  To: git

I have a post-receive hook set up that does the following when something
is pushed to a repository.

- Change directory to another non-bare repository
- Do 'git status'

I get this error from the original git push:

remote: fatal: Not a git repository: '.'

Debug output tells me I am in the correct directory when attempting the
status check.  This directory is a full git workarea (i.e. not a bare
repository).

Any idea what git is complaining about?  I can log on to the server and
do 'git status' in the target directory and everything is fine.

                            -Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Not a git repository: '.'
  2012-03-24 17:26 Not a git repository: '.' greened
@ 2012-03-24 18:14 ` Johannes Sixt
  2012-03-25 21:59   ` greened
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2012-03-24 18:14 UTC (permalink / raw)
  To: greened; +Cc: git

Am 24.03.2012 18:26, schrieb greened@obbligato•org:
> I have a post-receive hook set up that does the following when something
> is pushed to a repository.
> 
> - Change directory to another non-bare repository
> - Do 'git status'
> 
> I get this error from the original git push:
> 
> remote: fatal: Not a git repository: '.'
> 
> Debug output tells me I am in the correct directory when attempting the
> status check.  This directory is a full git workarea (i.e. not a bare
> repository).
> 
> Any idea what git is complaining about?  I can log on to the server and
> do 'git status' in the target directory and everything is fine.

Most likely, GIT_DIR=. is set when the hook is entered. Does unset
GIT_DIR help?

-- Hannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Not a git repository: '.'
  2012-03-24 18:14 ` Johannes Sixt
@ 2012-03-25 21:59   ` greened
  0 siblings, 0 replies; 3+ messages in thread
From: greened @ 2012-03-25 21:59 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git

Johannes Sixt <j6t@kdbg•org> writes:

> Most likely, GIT_DIR=. is set when the hook is entered. Does unset
> GIT_DIR help?

That was indeed the problem.  Thank you!

                        -Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-25 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24 17:26 Not a git repository: '.' greened
2012-03-24 18:14 ` Johannes Sixt
2012-03-25 21:59   ` greened

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox