From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Nguyen Thai Ngoc Duy <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] notes: do not accept non-blobs as new notes
Date: Wed, 9 May 2012 14:43:55 -0400 [thread overview]
Message-ID: <20120509184355.GA13012@sigill.intra.peff.net> (raw)
In-Reply-To: <7v4nrptf5z.fsf@alter.siamese.dyndns.org>
On Wed, May 09, 2012 at 10:52:56AM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > Hmm. I was thinking that we supported arbitrary sha1s as note values via
> > the command-line interface. But we don't; that is only the internal C
> > API, and it is quite difficult to do anything useful with non-blob notes
> > via the command-line interface. As you noticed, you can trick it into
> > doing so with "-C", but even "-c" has disastrous results (unless you
> > like dumping the binary tree object into your editor).
>
> It is fair to restrict anything that involves an editor or end user
> interaction with the terminal output for sanity, and raw tree object data
> is on the other side of the border line that defines what is sane, so I
> wouldn't have much problem with a new restriction on the command line
> interface, except for "-C". Advertising that we store arbitrary binary
> out of an existing blob as-is and then starting to refuse taking it sounds
> like a non-starter.
Fair enough. I was willing to accept the "-C $tree" case as collateral
damage under the assumption that nobody is using it. But you're right,
the real issue is restricting the "-c" case, as well as the "show" case
when reading notes. The right patch would restrict those and leave "-C"
alone.
-Peff
next prev parent reply other threads:[~2012-05-09 18:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 13:11 [PATCH] notes: do not accept non-blobs as new notes Nguyễn Thái Ngọc Duy
2012-05-08 16:03 ` Jeff King
2012-05-08 16:26 ` Junio C Hamano
2012-05-09 8:19 ` Nguyen Thai Ngoc Duy
2012-05-09 17:37 ` Jeff King
2012-05-09 17:52 ` Junio C Hamano
2012-05-09 18:43 ` Jeff King [this message]
2012-05-10 14:04 ` [PATCH 0/4] git-notes ui fixes regarding non-blobs notes Nguyễn Thái Ngọc Duy
2012-05-10 14:04 ` [PATCH 1/4] notes: preserve object type given by "add -C" Nguyễn Thái Ngọc Duy
2012-05-10 14:04 ` [PATCH 2/4] notes: "add -c" refuses to open an editor with non-blobs Nguyễn Thái Ngọc Duy
2012-05-10 15:26 ` Johannes Sixt
2012-05-11 1:11 ` Nguyen Thai Ngoc Duy
2012-05-10 14:05 ` [PATCH 3/4] notes: refuse to edit non-blobs Nguyễn Thái Ngọc Duy
2012-05-10 14:05 ` [PATCH 4/4] notes: refuse to append to non-blob notes Nguyễn Thái Ngọc Duy
2012-05-10 14:43 ` [PATCH 4/4] notes: only append a blob to a blob Nguyễn Thái Ngọc Duy
2012-05-10 15:19 ` Jeff King
2012-05-10 15:31 ` Nguyen Thai Ngoc Duy
2012-05-10 15:45 ` Jeff King
2012-05-11 3:57 ` Junio C Hamano
2012-05-10 14:29 ` [PATCH 0/4] git-notes ui fixes regarding non-blobs notes Jeff King
2012-05-11 1:25 ` [PATCH v2 0/4] non-blob notes fixes Nguyễn Thái Ngọc Duy
2012-05-11 1:25 ` [PATCH v2 1/4] notes: preserve object type given by "add -C" Nguyễn Thái Ngọc Duy
2012-05-11 21:16 ` Junio C Hamano
2012-05-12 5:20 ` Nguyen Thai Ngoc Duy
2012-05-12 6:12 ` Junio C Hamano
2012-05-12 6:58 ` Nguyen Thai Ngoc Duy
2012-05-11 1:25 ` [PATCH v2 2/4] notes: "add -c" refuses to open an editor with non-blobs Nguyễn Thái Ngọc Duy
2012-05-11 1:25 ` [PATCH v2 3/4] notes: refuse to edit non-blobs Nguyễn Thái Ngọc Duy
2012-05-11 1:25 ` [PATCH v2 4/4] notes: only allow to append a blob to a blob Nguyễn Thái Ngọc Duy
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=20120509184355.GA13012@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/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).