Subject: Re: notes TODOs (was: Re: [PATCH 1/4] gitweb: notes feature)

From: Jakub Narebski <[email-masked]>
Date: Sat, 06 Feb 2010 03:30:45 -0800 (PST)

Giuseppe Bilotta <[email-masked]> writes:

> If I may be allowed to add a suggestion to put in the list, [...]

What I would like to see (besides --notes-ref or --notes option,
either as an option to git wrapper, or as an option to git-show,
git-format-patch, git-log and git-rev-list (I think that's all)),
is for git-notes to have a subcommand to move notes from one object
to the other:

  'git notes' move [-f] <oldobject> <newobject>

Both source and target should be required, as I am not sure if more
common would be moving note from some object to HEAD, or from HEAD to
some object.  The '-f'/'--force' option is in the case when note for
<newobject> exists (although it might be better to concatenate notes
in the future), and when <oldobject> and <newobject> are of different
types (unless we want som DWIM type coercion).

It could be used to make notes move to amended commit, for example:

  $ git commit --amend
  $ git notes move ORIG_HEAD HEAD # or HEAD@{1} HEAD

-- 
Jakub Narebski
Poland
ShadeHawk on #git