From: Joachim Breitner <mail@joachim-breitner.de>
To: git@vger.kernel.org
Cc: "Bernhard R . Link" <brlink@debian.org>
Subject: Storing commits in trees
Date: Thu, 15 Apr 2010 22:32:12 +0200 [thread overview]
Message-ID: <1271363532.18164.47.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
[Please CC me on reply, as I’m not subscribed. Thanks!]
Hi,
for a variation of the workflow implemented by git-dpm[1], a tool to
manage the development of Debian packages in git, I wanted to refer to a
specific commit P from a regular commit D on my master branch, without P
being a parent of D, as I don’t want it to show up in the history.
I found out that I can store commit objects in a tree object, using git
$ git update-index --add --cacheinfo 160000 0ac1855f1681c05d195f219c3003a05dc8d3ac20 stored-commits/some-commit
and refer to it via HEAD:stored-commits/some-commit. I was happy, until
I noticed that git prune will happily delete the stored commit as soon
as it is not referred somewhere else, and git push/pull won’t transfer
the stored commit along the tree it is contained in.
I then found out that storing commit objects in the tree is implemented
for git-submodules, where you in fact do not want to store the commit in
the main repo.
Now I’m wondering if it would be feasible to offer this feature: A
proper “commit” object within a tree that is walked by fsck_walk_tree
and the other tree walkers?
Or is there yet another way of telling git that commit D “depends on”
commit P?
Thanks,
Joachim
[1] http://git-dpm.alioth.debian.org/
--
Joachim "nomeata" Breitner
mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/
Debian Developer: nomeata@debian.org
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2010-04-15 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-15 20:32 Joachim Breitner [this message]
2010-04-18 17:48 ` Storing commits in trees Peter Collingbourne
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=1271363532.18164.47.camel@localhost \
--to=mail@joachim-breitner.de \
--cc=brlink@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.