git-commit-vandalism/builtin
Johan Herland 84a7e35eea Make "git notes add" more user-friendly when there are existing notes
Currently, "notes add" (without -f/--force) will abort when the given object
already has existing notes. This makes sense for the modes of "git notes add"
that would necessarily overwrite the old message (when using the -m/-F/-C/-c
options). However, when no options are given (meaning the notes are created
from scratch in the editor) it is not very user-friendly to abort on existing
notes, and forcing the user to run "git notes edit".

Instead, it is better to simply "redirect" to "git notes edit" automatically,
i.e. open the existing notes in the editor and let the user edit them.
This patch does just that.

This changes the behavior of "git notes add" without options when notes
already exist for the given object, but I doubt that many users really depend
on the previous failure from "git notes add" in this case.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30 13:13:52 -07:00
..
add.c Merge branch 'maint' 2011-03-16 16:59:30 -07:00
annotate.c
apply.c Merge branch 'jc/maint-apply-report-offset' 2011-03-15 14:22:02 -07:00
archive.c
bisect--helper.c
blame.c standardize brace placement in struct definitions 2011-03-16 12:49:02 -07:00
branch.c branch: split off function that writes tracking info and commit subject 2011-03-16 12:52:15 -07:00
bundle.c
cat-file.c
check-attr.c
check-ref-format.c
checkout-index.c Merge branch 'jn/git-cmd-h-bypass-setup' 2010-12-12 21:49:50 -08:00
checkout.c checkout: tweak detached-orphan warning format 2011-03-20 13:32:47 -07:00
clean.c
clone.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
commit-tree.c
commit.c Merge branch 'jc/index-update-if-able' 2011-03-26 20:13:16 -07:00
config.c config: drop support for GIT_CONFIG_NOGLOBAL 2011-03-15 12:23:30 -07:00
count-objects.c
describe.c Merge branch 'lt/default-abbrev' 2011-03-23 14:55:40 -07:00
diff-files.c Convert struct diff_options to use struct pathspec 2011-02-03 12:28:15 -08:00
diff-index.c
diff-tree.c
diff.c Merge branch 'jc/index-update-if-able' 2011-03-26 20:13:16 -07:00
fast-export.c Merge branch 'mg/placeholders-are-lowercase' 2011-02-27 21:58:30 -08:00
fetch-pack.c Merge branch 'jc/fetch-progressive-stride' 2011-03-29 14:09:08 -07:00
fetch.c Merge branch 'jk/trace-sifter' 2011-03-19 23:24:12 -07:00
fmt-merge-msg.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
for-each-ref.c
fsck.c Remove unused variables 2011-03-22 11:43:27 -07:00
gc.c Merge branch 'jn/git-cmd-h-bypass-setup' 2010-12-12 21:49:50 -08:00
grep.c Merge branch 'maint' 2011-03-28 14:17:17 -07:00
hash-object.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
help.c
index-pack.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
init-db.c Name make_*_path functions more accurately 2011-03-17 16:08:30 -07:00
log.c Merge branch 'mg/rev-list-n-parents' 2011-03-26 20:13:17 -07:00
ls-files.c Merge branch 'jn/git-cmd-h-bypass-setup' 2010-12-12 21:49:50 -08:00
ls-remote.c get_remote_url(): use the same data source as ls-remote to get remote urls 2011-03-02 12:26:53 -08:00
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
merge-ours.c
merge-recursive.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
merge-tree.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
merge.c Merge branch 'jk/merge-rename-ux' 2011-03-19 23:23:56 -07:00
mktag.c Merge branch 'jn/maint-c99-format' 2011-03-23 14:55:46 -07:00
mktree.c
mv.c
name-rev.c
notes.c Make "git notes add" more user-friendly when there are existing notes 2011-03-30 13:13:52 -07:00
pack-objects.c thread-utils.h: simplify the inclusion 2010-12-10 12:58:06 -08:00
pack-redundant.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
pack-refs.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
patch-id.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
prune-packed.c
prune.c
push.c Merge branch 'jk/trace-sifter' 2011-03-19 23:24:12 -07:00
read-tree.c Make <identifier> lowercase as per CodingGuidelines 2011-02-15 11:53:10 -08:00
receive-pack.c Merge branch 'jc/maint-fetch-alt' 2011-03-22 21:37:53 -07:00
reflog.c
remote-ext.c Remove unused variables 2011-03-22 11:43:27 -07:00
remote-fd.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
remote.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
replace.c
rerere.c rerere forget: deprecate invocation without pathspec 2011-03-02 12:26:18 -08:00
reset.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
rev-list.c revision.c: introduce --min-parents and --max-parents options 2011-03-23 10:16:44 -07:00
rev-parse.c revision.c: introduce --min-parents and --max-parents options 2011-03-23 10:16:44 -07:00
revert.c Merge branch 'js/cherry-pick-usability' 2011-03-09 15:56:17 -08:00
rm.c builtin/rm.c: Use ALLOC_GROW instead of alloc_nr and xrealloc. 2010-12-19 10:44:06 -08:00
send-pack.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
shortlog.c parse-options: Don't call parse_options_check() so much 2010-12-06 16:51:36 -08:00
show-branch.c
show-ref.c
stripspace.c
symbolic-ref.c
tag.c Make <identifier> lowercase as per CodingGuidelines 2011-02-15 11:53:10 -08:00
tar-tree.c
unpack-file.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
unpack-objects.c
update-index.c Convert ce_path_match() to use struct pathspec 2011-02-03 14:08:30 -08:00
update-ref.c
update-server-info.c
upload-archive.c
var.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
verify-pack.c
verify-tag.c Merge branch 'mg/maint-tag-rfc1991' 2010-12-08 11:24:13 -08:00
write-tree.c