From: Stephen Bash <bash@genarts.com>
To: git discussion list <git@vger.kernel.org>
Subject: Passing commit IDs to git-archive
Date: Fri, 09 Mar 2012 17:14:05 -0500 (EST) [thread overview]
Message-ID: <8fb14091-99dc-4383-9cab-5bf508e0a554@mail> (raw)
In-Reply-To: <8c6d921d-9e8e-4caf-bc04-b1d2cfdd294f@mail>
Hi all-
For an upcoming release, I'm attempting to update our build scripts to suck down some content from a remote Git repository and include it en masse in our installer. My first inclination was to use submodules, but similar to this question on Stack Overflow
http://stackoverflow.com/questions/6553743/
the content used to be in our development repository and has recently been migrated out, so jumping between branches/back and forth in history is causing problems (unlike the question, I'm not willing to rewrite history to make the submodule approach work). So after googling around I came to git-archive using the --remote argument, which actually seems nice for my situation because the content is basically support material for the end user that the devs don't manage/edit.
Unfortunately I just attempted
warp:bar bash$ git archive --remote=file:///Users/bash/Development/foo \
--output=test.tgz 3b9e49b \
path/to/subdir
remote: fatal: no such ref: 3b9e49b
remote: git upload-archive: archiver died with error
fatal: sent error to the client: git upload-archive: archiver died with error
warp:bar bash$ git archive --remote=file:///Users/bash/Development/foo \
--output=test.tgz 3b9e49b:path/to/subdir
remote: fatal: no such ref: 3b9e49b
remote: git upload-archive: archiver died with error
fatal: sent error to the client: git upload-archive: archiver died with error
warp:bar bash$ cd /Users/bash/Development/foo
warp:foo bash$ git rev-parse --short master
3b9e49b
warp:foo bash$
warp:foo bash$ git --version
git version 1.7.9.2
warp:foo bash$
on Mac OS 10.6.8 (obviously this is local testing, the goal is to use ssh remotely). After parsing the error "no such ref" I attempted the same operation using master as the tree-ish and archive worked as expected (either specifying the path separately or using the colon syntax to reference the tree directly). Is there a reason git-archive requires a named ref rather than just a commit (or tree) ID? If not, would it be difficult to patch git-upload-archive to use the IDs? I could use tags for the ref, but in my case would result in almost every commit being a tag which seems wasteful.
Thoughts? Thanks in advance!
Stephen
next parent reply other threads:[~2012-03-09 22:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8c6d921d-9e8e-4caf-bc04-b1d2cfdd294f@mail>
2012-03-09 22:14 ` Stephen Bash [this message]
2012-03-09 22:34 ` Passing commit IDs to git-archive Junio C Hamano
2012-03-10 6:40 ` René Scharfe
2012-03-12 11:47 ` Jeff King
2012-03-12 13:24 ` Stephen Bash
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=8fb14091-99dc-4383-9cab-5bf508e0a554@mail \
--to=bash@genarts.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