From: Avery Pennarun <apenwarr@gmail.com>
To: Gavin Beatty <gavinbeatty@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Problem creating commits/trees with commit-tree/mktree
Date: Mon, 11 Jan 2010 13:38:02 -0500 [thread overview]
Message-ID: <32541b131001111038m3dacaf72sc12f24aba8c60e@mail.gmail.com> (raw)
In-Reply-To: <f6d77fed1001111014g73a06923na05cd14d37968b04@mail.gmail.com>
On Mon, Jan 11, 2010 at 1:14 PM, Gavin Beatty <gavinbeatty@gmail.com> wrote:
> I can create new blobs and trees but can't figure out how to commit a
> new tree/blob _with_ the old tree.
[...]
> I get a commit with treefileisin/file.txt. I haven't included the
> other trees/files so they are gone in this commit. How do I include
> them? Is commit-tree the wrong tool?
When I'm doing similar things, I often prefer just using a temporary
git index file to keep track of my intermediate trees. Just set
GIT_INDEX_FILE to point at a temporary file; then you can use
git-read-tree to read in an old tree, and git-update-index
(particularly with the --stdin flag) to update it. Then you can use
git-write-tree to convert the temporary index into a real tree object.
Have fun,
Avery
next prev parent reply other threads:[~2010-01-11 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 18:14 Problem creating commits/trees with commit-tree/mktree Gavin Beatty
2010-01-11 18:17 ` Shawn O. Pearce
2010-01-11 18:38 ` Avery Pennarun [this message]
2010-01-14 23:18 ` Gavin Beatty
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=32541b131001111038m3dacaf72sc12f24aba8c60e@mail.gmail.com \
--to=apenwarr@gmail.com \
--cc=gavinbeatty@gmail.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).