summaryrefslogtreecommitdiff
path: root/builtin.h
diff options
context:
space:
mode:
authorLibravatar Johan Herland <johan@herland.net>2010-02-13 22:28:20 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-02-13 19:36:13 -0800
commitcd067d3bf4ea3f89969cd143be3e281e1c5ac58a (patch)
tree0125d61613bd0b9482cbe2e7bf6e1961c9507d23 /builtin.h
parentRefactor notes concatenation into a flexible interface for combining notes (diff)
downloadtgif-cd067d3bf4ea3f89969cd143be3e281e1c5ac58a.tar.xz
Builtin-ify git-notes
The builtin-ification includes some minor behavioural changes to the command-line interface: It is no longer allowed to mix the -m and -F arguments, and it is not allowed to use multiple -F options. As part of the builtin-ification, we add the commit_notes() function to the builtin API. This function (together with the notes.h API) can be easily used from other builtins to manipulate the notes tree. Also includes needed changes to t3301. This patch has been improved by the following contributions: - Stephen Boyd: Use die() instead of fprintf(stderr, ...) followed by exit(1) Cc: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin.h')
-rw-r--r--builtin.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index e8202f3f5e..cdf98477a6 100644
--- a/builtin.h
+++ b/builtin.h
@@ -5,6 +5,7 @@
#include "strbuf.h"
#include "cache.h"
#include "commit.h"
+#include "notes.h"
extern const char git_version_string[];
extern const char git_usage_string[];
@@ -18,6 +19,7 @@ extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
extern int commit_tree(const char *msg, unsigned char *tree,
struct commit_list *parents, unsigned char *ret,
const char *author);
+extern int commit_notes(struct notes_tree *t, const char *msg);
extern int check_pager_config(const char *cmd);
extern int cmd_add(int argc, const char **argv, const char *prefix);
@@ -78,6 +80,7 @@ extern int cmd_mktag(int argc, const char **argv, const char *prefix);
extern int cmd_mktree(int argc, const char **argv, const char *prefix);
extern int cmd_mv(int argc, const char **argv, const char *prefix);
extern int cmd_name_rev(int argc, const char **argv, const char *prefix);
+extern int cmd_notes(int argc, const char **argv, const char *prefix);
extern int cmd_pack_objects(int argc, const char **argv, const char *prefix);
extern int cmd_pack_redundant(int argc, const char **argv, const char *prefix);
extern int cmd_patch_id(int argc, const char **argv, const char *prefix);