public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg•org>
To: greened@obbligato•org
Cc: git@vger•kernel.org
Subject: Re: Not a git repository: '.'
Date: Sat, 24 Mar 2012 19:14:31 +0100	[thread overview]
Message-ID: <4F6E0F07.6030400@kdbg.org> (raw)
In-Reply-To: <87r4wh6hce.fsf@smith.obbligato.org>

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

  reply	other threads:[~2012-03-24 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24 17:26 Not a git repository: '.' greened
2012-03-24 18:14 ` Johannes Sixt [this message]
2012-03-25 21:59   ` greened

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F6E0F07.6030400@kdbg.org \
    --to=j6t@kdbg$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=greened@obbligato$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox