* Help requested - trying to build a tool doing whole-tree commits
@ 2012-11-09 18:20 Unknown, Eric S. Raymond
2012-11-09 21:50 ` Andreas Schwab
2012-11-10 16:57 ` Junio C Hamano
0 siblings, 2 replies; 6+ messages in thread
From: Unknown, Eric S. Raymond @ 2012-11-09 18:20 UTC (permalink / raw)
To: git
(Apologies if this arrives twice. I'm on the road, with somewhat flaky email.)
Because of my work on reposurgeon, I am sometimes asked to produce git
repositories for very old projects that not only are still using CVS
but have ancient releases not in the CVS repository, preserved only
as tarballs. I have such a request currently pending from the
robotfindskitten project.
To automate this process, I am trying to write a tool that will take a
sequence of file trees and synthetic change comments in one end and
emit a git repository composing them into a DAG out the other. The
working name for this tool is 'gitpacker'.
I've already written the unpacking operation (git repo to tree
sequence plus log). This morning I discovered that git-commit
won't do quite what I need for the packing operation.
I'm requesting help.
I need a command or command sequence that will commit an entire file
tree to a repository...
(a) Allowing me to specify committer and author metadata, and
(b) deleting paths not present in the previous commit on the current
branch, and
(c) allowing me to specify merge links from other previous commits.
git commit -a passes (a) and (b) but not (c).
Advice on how to accomplish this is requested
Advice on a better name for the tool is also requested, as I'm
not happy with the way my use of 'pack' collides with existing
git use of the same verb.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
.. a government and its agents are under no general duty to
provide public services, such as police protection, to any
particular individual citizen...
-- Warren v. District of Columbia, 444 A.2d 1 (D.C. App.181)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Help requested - trying to build a tool doing whole-tree commits
2012-11-09 18:20 Help requested - trying to build a tool doing whole-tree commits Unknown, Eric S. Raymond
@ 2012-11-09 21:50 ` Andreas Schwab
2012-11-10 19:24 ` Felipe Contreras
2012-11-10 16:57 ` Junio C Hamano
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2012-11-09 21:50 UTC (permalink / raw)
To: Unknown; +Cc: git
Unknown <unknown@unknown.invalid> writes:
> I need a command or command sequence that will commit an entire file
> tree to a repository...
>
> (a) Allowing me to specify committer and author metadata, and
>
> (b) deleting paths not present in the previous commit on the current
> branch, and
>
> (c) allowing me to specify merge links from other previous commits.
>
> git commit -a passes (a) and (b) but not (c).
git commit -a won't add new files, so you probably want to use git add
-A && git commit. I'm not quite sure what you mean with "merge links",
but if you want to create merge commits the you'll need to resort to
plumbing: git add -A && git write-tree && git commit-tree && git
update-ref.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Help requested - trying to build a tool doing whole-tree commits
2012-11-09 21:50 ` Andreas Schwab
@ 2012-11-10 19:24 ` Felipe Contreras
0 siblings, 0 replies; 6+ messages in thread
From: Felipe Contreras @ 2012-11-10 19:24 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Eric S. Raymond, git
On Fri, Nov 9, 2012 at 10:50 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Unknown <unknown@unknown.invalid> writes:
Unknown Invalid? Please don't change the original email, makes it
harder for other people to reply.
>> I need a command or command sequence that will commit an entire file
>> tree to a repository...
>>
>> (a) Allowing me to specify committer and author metadata, and
>>
>> (b) deleting paths not present in the previous commit on the current
>> branch, and
>>
>> (c) allowing me to specify merge links from other previous commits.
>>
>> git commit -a passes (a) and (b) but not (c).
>
> git commit -a won't add new files, so you probably want to use git add
> -A && git commit. I'm not quite sure what you mean with "merge links",
> but if you want to create merge commits the you'll need to resort to
> plumbing: git add -A && git write-tree && git commit-tree && git
> update-ref.
I've done something similar, except that I used git hash-object
instead of git commit-tree so that I can specify every single detail
about the commit object.
Cheers.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Help requested - trying to build a tool doing whole-tree commits
2012-11-09 18:20 Help requested - trying to build a tool doing whole-tree commits Unknown, Eric S. Raymond
2012-11-09 21:50 ` Andreas Schwab
@ 2012-11-10 16:57 ` Junio C Hamano
2012-11-11 14:47 ` Eric S. Raymond
1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2012-11-10 16:57 UTC (permalink / raw)
To: Eric S. Raymond; +Cc: git
Unknown <unknown@unknown.invalid> writes:
> (Apologies if this arrives twice. I'm on the road, with somewhat flaky email.)
>
> Because of my work on reposurgeon, I am sometimes asked to produce git
> repositories for very old projects that not only are still using CVS
> but have ancient releases not in the CVS repository, preserved only
> as tarballs.
Perhaps not exactly what you are looking for, but don't we have
import-tar somewhere in contrib/fast-import hierarchy (sorry, not on
a machine yet, and I cannot give more details).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Help requested - trying to build a tool doing whole-tree commits
2012-11-10 16:57 ` Junio C Hamano
@ 2012-11-11 14:47 ` Eric S. Raymond
0 siblings, 0 replies; 6+ messages in thread
From: Eric S. Raymond @ 2012-11-11 14:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano <gitster@pobox.com>:
> Perhaps not exactly what you are looking for, but don't we have
> import-tar somewhere in contrib/fast-import hierarchy (sorry, not on
> a machine yet, and I cannot give more details).
If I recall correctly, that can only be used for original import.
I think Andreas Schwab's suggestion (git add -A && git write-tree &&
git commit-tree && git update-ref) is probably the right thing. I'm
going to try that.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <931951238.74665890.1352725212354.JavaMail.root@zimbra39-e7.priv.proxad.net>]
* Re: Help requested - trying to build a tool doing whole-tree commits
[not found] <931951238.74665890.1352725212354.JavaMail.root@zimbra39-e7.priv.proxad.net>
@ 2012-11-12 13:11 ` ydirson
0 siblings, 0 replies; 6+ messages in thread
From: ydirson @ 2012-11-12 13:11 UTC (permalink / raw)
To: Eric S. Raymond; +Cc: git
esr:
>Junio C Hamano <gitster <at> pobox.com>:
>> Perhaps not exactly what you are looking for, but don't we have
>> import-tar somewhere in contrib/fast-import hierarchy (sorry, not on
>> a machine yet, and I cannot give more details).
>
>If I recall correctly, that can only be used for original import.
You may find my (old) ag-import-patch tool useful. Although the name does not
imply it, it allows to import a series of releases that can be available either as
tarballs or as patches.
http://ydirson.free.fr/soft/git/argit.git/
There's not much doc in there, and not so much I can remember myself from the short
help string. IIRC you can specify which base revision a patch applies to (ie. it
may apply to an older revision, not necessarily to the current HEAD).
It has also quite some bitrot (git-* direct invocation, use of cg-tag, surely more).
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-12 13:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-09 18:20 Help requested - trying to build a tool doing whole-tree commits Unknown, Eric S. Raymond
2012-11-09 21:50 ` Andreas Schwab
2012-11-10 19:24 ` Felipe Contreras
2012-11-10 16:57 ` Junio C Hamano
2012-11-11 14:47 ` Eric S. Raymond
[not found] <931951238.74665890.1352725212354.JavaMail.root@zimbra39-e7.priv.proxad.net>
2012-11-12 13:11 ` ydirson
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).