From: Christian Couder <chriscool@tuxfamily.org>
To: jason@lakedaemon.net
Cc: ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [TOPIC] Metadata addendum to git commit
Date: Mon, 19 May 2014 08:34:55 +0200 (CEST) [thread overview]
Message-ID: <20140519.083455.557690327865344524.chriscool@tuxfamily.org> (raw)
In-Reply-To: <20140518221242.GV27822@titan.lakedaemon.net>
From: Jason Cooper <jason@lakedaemon.net>
> On Sun, May 18, 2014 at 09:23:15PM +0200, Christian Couder wrote:
>> From: Takashi Iwai <tiwai@suse.de>
> ...
>> > I tried a hackish way once ago: keeping simple text files named with
>> > $SHAID in a separate branch, and refers to it at git log or bisect
>> > time. There must be much elegant way, I suppose, though.
>>
>> Yeah, using "git replace" is more elegant. And there will be hopefully
>> soon the --edit option that will make it very easy to use git replace.
>
> Yikes. Sorry, but I don't like that at all. I hope that feature is
> disabled by default (git replace).
By default replace refs are not fetched and not pushed. So you only
have the replace refs you created yourself on your own repo. They are
only fetched or pushed if you use or configure a refspec like
'refs/replace/*:refs/replace/*'.
You can also use the GIT_NO_REPLACE_OBJECTS environment variable or
"alias git='git --no-replace-objects'", if/when you want to make sure that
replace refs are not used.
A hook could also check that for example each replace ref you add to
your repo replaces a commit with another commit that points to the
same tree.
You could also use 2 different repos, one where you do most of your
work and don't have any replace ref, and one where you do your
bisecting and where you have replace refs. You can create, fetch and
push replace refs in your bisecting repo.
> I guess my first question is: Does the PGP signature verification of a
> signed tag fail if there are replaced commits in the history?
First any kind of Git object can be replaced, not just commits, even
tag objects. Also I think the PGP signature verification only checks
the content of the tag for signed tags or the content of the commit
for signed commits.
So it might be a good idea to disable replace refs (for example using
the GIT_NO_REPLACE_OBJECTS environment variable or
--no-replace-objects) when you want to check signatures, and maybe Git
could warn or error out if the commit or tags that are being verified
are replaced.
But if you have replace refs and some blobs or trees are replaced, you
have to trust these replace refs. (And maybe you are very right to
trust them because for example you created them yourself and never
fetched any replace ref.)
Anyway maybe we should cc Junio and other people on this because
signing is not a part of Git that I know well.
> And if
> so, is that a cryptographic failure, or a logical failure?
I don't think there is any failure.
Some things are inherently risky. For example if you bisect kernels,
you might compile and run kernels that have known security bugs, so
you have to be careful.
Best,
Christian.
next prev parent reply other threads:[~2014-05-19 6:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 13:25 Takashi Iwai
2014-05-13 23:23 ` NeilBrown
2014-05-13 23:29 ` Jiri Kosina
2014-05-13 23:49 ` NeilBrown
2014-05-14 1:40 ` Li Zefan
2014-05-16 3:07 ` Jason Cooper
2014-05-16 5:12 ` Christian Couder
2014-05-16 9:24 ` Li Zefan
2014-05-16 9:33 ` Takashi Iwai
2014-05-18 19:23 ` Christian Couder
2014-05-18 22:12 ` Jason Cooper
2014-05-19 6:34 ` Christian Couder [this message]
2014-05-19 13:29 ` Takashi Iwai
2014-05-20 6:37 ` Christian Couder
2014-05-20 7:06 ` Takashi Iwai
2014-05-21 5:36 ` Christian Couder
2014-05-22 4:49 ` Christian Couder
2014-05-22 5:58 ` Takashi Iwai
2014-05-22 6:28 ` Johan Herland
2014-05-22 6:52 ` Christian Couder
2014-05-22 7:29 ` Johan Herland
2014-05-22 7:45 ` Takashi Iwai
2014-05-22 7:49 ` Geert Uytterhoeven
2014-05-22 8:03 ` Takashi Iwai
2014-05-22 15:51 ` Theodore Ts'o
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=20140519.083455.557690327865344524.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=jason@lakedaemon.net \
--cc=ksummit-discuss@lists.linuxfoundation.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