git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Dmitry Ivankov <divanorama@gmail.com>
Cc: Git List <git@vger.kernel.org>, David Barr <davidbarr@google.com>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	Thomas Rast <trast@student.ethz.ch>,
	Johan Herland <johan@herland.net>,
	Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: [RFC] fast-import: note deletion command
Date: Sun, 18 Sep 2011 15:35:06 -0500	[thread overview]
Message-ID: <20110918203506.GG2308@elie> (raw)
In-Reply-To: <CA+gfSn9sdTzQghqQp6hcO-9kN9mPx2JLRig79Rgx2FqGWXXp=A@mail.gmail.com>

(+cc: Sverre for fast-import, Johan for notes, Thomas as a user of
 the note import feature, snipping less for their benefit)

Dmitry Ivankov wrote:

> Hi,
>
> fast-import is able to write notes provided a command
> N <note_content_data_specification> <commit_specification>
>
> There is no documented command to delete a note. It can't be
> easily replaced with Delete command on notes tree because
> of notes fanout.
>
> But fast-import interprets 0{40} data_specification as a note
> deletion command. It is consistent with fast-import internals
> where null_sha1 is used for absent/unknown object. But is
> not consistent with file Modify command nor looks like a common
> convention in git ui.

Right.

> So the questions are:
> - should 0{40} not be treated as deletion toggle? Downside is that
> it is used as one in t/t9301-fast-import-notes.sh.
> - how should a documented way to delete notes look like?
> ND commit_sha1 # One may think there are also NC, NR, NM
> N delete commit_sha1
> # Only :mark, full-40-byte-sha1 and 'inline' are allowed currently.
> # So no clashes arise, but then one may also want M 'delete' path
> # command to work too.

If I were doing it:

 - advertise "N 0{40} <commit>" as the historical way to delete a
   note, and make sure it keeps working

 - introduce 'ND' or 'notedelete <commit>' as a human-friendly
   synonym, keeping in mind that NC and NR could be introduced in the
   future if there is demand for them.

 - don't add any new magic "N <magic keyword> <commit>" commands,
   since it's hard to know when they will clash with some VCS's
   convention for object names.

I imagine there are plenty of other acceptable ways to accomplish
these things, though. :)  Thanks for looking into it.

  reply	other threads:[~2011-09-18 20:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-18 20:07 [RFC] fast-import: note deletion command Dmitry Ivankov
2011-09-18 20:35 ` Jonathan Nieder [this message]
2011-09-18 20:39   ` Sverre Rabbelier
2011-09-18 20:59     ` Dmitry Ivankov
2011-09-18 21:03       ` fast-import wishlist (Re: [RFC] fast-import: note deletion command) Jonathan Nieder
2011-09-18 21:18     ` Branch deletion " Jonathan Nieder
2011-09-18 21:38       ` Sverre Rabbelier
2011-09-18 21:49         ` Jonathan Nieder
2011-09-18 21:54           ` Dmitry Ivankov
2011-09-18 21:55           ` Sverre Rabbelier

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=20110918203506.GG2308@elie \
    --to=jrnieder@gmail.com \
    --cc=davidbarr@google.com \
    --cc=divanorama@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=spearce@spearce.org \
    --cc=srabbelier@gmail.com \
    --cc=trast@student.ethz.ch \
    /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).