From: Timur Tabi <timur@freescale.com>
To: <git@vger.kernel.org>
Subject: git-fetch does not work from .git subdirectory
Date: Tue, 20 Nov 2012 16:24:22 -0600 [thread overview]
Message-ID: <50AC0316.7090002@freescale.com> (raw)
I was under the impression that git commands which affect repository (as
opposed to the local file system) work from any subdirectory inside the
repository. For example:
[b04825@efes linux.cq-test]$ git log -1
commit f35d179fde24be5e1675b1df9f7a49b8d95561b2
Author: Timur Tabi <timur@freescale.com>
Date: Wed Oct 31 15:56:20 2012 +0200
...
[b04825@efes linux.cq-test]$ cd .git
[b04825@efes .git]$ git log -1
commit f35d179fde24be5e1675b1df9f7a49b8d95561b2
Author: Timur Tabi <timur@freescale.com>
Date: Wed Oct 31 15:56:20 2012 +0200
...
It appears, however, that git-fetch does not work this way:
[b04825@efes linux.cq-test]$ git fetch upstream master
From ../linux-2.6
* branch master -> FETCH_HEAD
[b04825@efes linux.cq-test]$ cd .git
[b04825@efes .git]$ git fetch upstream master
fatal: '../linux-2.6.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
This makes it complicated because git hooks run from the .git directory on
normal repositories, but they run from the top-level directory on bare
repositories. Apparently, you need to be in the top-level directory for
git-fetch to run in any kind of repository.
--
Timur Tabi
Linux kernel developer at Freescale
next reply other threads:[~2012-11-20 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 22:24 Timur Tabi [this message]
2012-11-22 0:55 ` git-fetch does not work from .git subdirectory Patrik Gornicz
2012-11-26 16:09 ` Timur Tabi
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=50AC0316.7090002@freescale.com \
--to=timur@freescale.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).