Re: notes TODOs (was: Re: [PATCH 1/4] gitweb: notes feature)
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Feb 6, 2010, 11:30 UTC
- Message-ID
- <m3aavma9gg.fsf@localhost.localdomain>
- In-Reply-To
- <cb7bb73a1002050444y55f57696gb1b3bd06ab9261ac@mail.gmail.com>
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 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