From: kenneth johansson <ken@kenjo.org>
To: git@vger.kernel.org
Subject: Re: git archive
Date: Wed, 22 Oct 2008 18:45:30 +0000 (UTC) [thread overview]
Message-ID: <gdnsca$92r$2@ger.gmane.org> (raw)
In-Reply-To: 20081022130829.GC2015@riemann.deskinm.fdns.net
On Wed, 22 Oct 2008 09:08:29 -0400, Deskin Miller wrote:
> On Wed, Oct 22, 2008 at 08:42:01AM +0000, kenneth johansson wrote:
>> I was going to make a tar of the latest stable linux kernel. Done it
>> before but now I got a strange problem.
>>
>> >git archive --format=tar v2.6.27.2
>> fatal: Not a valid object name
>
> I had the same thing happen to me, while trying to make an archive of
> Git. Were you perchance working in a bare repository, as I was? I spent
> some time looking at it and I think git archive sets up the environment
> in the wrong order, though of course I never finished a patch so I'm
> going from memory:
Yes it was a bare repository.
>
> After looking at the code again, I think the issue is that git_config is
> called in builtin-archive.c:cmd_archive before setup_git_directory is
> called in archive.c:write_archive. The former ends up setting GIT_DIR
> to be '.git' even if you're in a bare repository. My coding skills
> weren't up to fixing it easily; moving setup_git_directory before
> git_config in builtin-archive caused last test of t5000 to fail:
> GIT_DIR=some/nonexistent/path git archive --list should still display
> the archive formats.
if I do
GIT_DIR=. git archive --format=tar v2.6.27.2
it does work so it looks like you are on the right track.
next prev parent reply other threads:[~2008-10-22 18:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 8:42 git archive kenneth johansson
2008-10-22 13:08 ` Deskin Miller
2008-10-22 18:45 ` kenneth johansson [this message]
2008-10-22 20:37 ` [RFC PATCH] archive: fix setup to work in bare repositories Deskin Miller
2008-10-22 20:46 ` Jeff King
2008-10-22 21:09 ` Charles Bailey
2008-10-22 21:47 ` [PATCH] Fixed git archive for bare repos Charles Bailey
2008-10-23 1:37 ` Deskin Miller
2008-10-24 22:19 ` René Scharfe
2008-10-25 15:38 ` [PATCH v2] " Deskin Miller
2008-10-25 19:15 ` Junio C Hamano
2008-10-23 15:33 ` git archive Nguyen Thai Ngoc Duy
2008-10-23 18:21 ` Deskin Miller
2008-10-24 3:58 ` Nguyen Thai Ngoc Duy
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='gdnsca$92r$2@ger.gmane.org' \
--to=ken@kenjo.org \
--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).