aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/notes.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/notes.c')
-rw-r--r--builtin/notes.c44
1 files changed, 29 insertions, 15 deletions
diff --git a/builtin/notes.c b/builtin/notes.c
index 8c26e45526..d051abf6df 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -32,9 +32,9 @@
static const char *separator = "\n";
static const char * const git_notes_usage[] = {
N_("git notes [--ref <notes-ref>] [list [<object>]]"),
- N_("git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+ N_("git notes [--ref <notes-ref>] add [-f] [--allow-empty] [--[no-]separator|--separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>] [-e]"),
N_("git notes [--ref <notes-ref>] copy [-f] <from-object> <to-object>"),
- N_("git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+ N_("git notes [--ref <notes-ref>] append [--allow-empty] [--[no-]separator|--separator=<paragraph-break>] [--[no-]stripspace] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>] [-e]"),
N_("git notes [--ref <notes-ref>] edit [--allow-empty] [<object>]"),
N_("git notes [--ref <notes-ref>] show [<object>]"),
N_("git notes [--ref <notes-ref>] merge [-v | -q] [-s <strategy>] <notes-ref>"),
@@ -431,7 +431,8 @@ static struct notes_tree *init_notes_check(const char *subcommand,
return t;
}
-static int list(int argc, const char **argv, const char *prefix)
+static int list(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
struct notes_tree *t;
struct object_id object;
@@ -468,9 +469,11 @@ static int list(int argc, const char **argv, const char *prefix)
return retval;
}
-static int append_edit(int argc, const char **argv, const char *prefix);
+static int append_edit(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED);
-static int add(int argc, const char **argv, const char *prefix)
+static int add(int argc, const char **argv, const char *prefix,
+ struct repository *repo)
{
int force = 0, allow_empty = 0;
const char *object_ref;
@@ -489,6 +492,8 @@ static int add(int argc, const char **argv, const char *prefix)
OPT_CALLBACK_F('c', "reedit-message", &d, N_("object"),
N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
parse_reedit_arg),
+ OPT_BOOL('e', "edit", &d.use_editor,
+ N_("edit note message in editor")),
OPT_CALLBACK_F('C', "reuse-message", &d, N_("object"),
N_("reuse specified note object"), PARSE_OPT_NONEG,
parse_reuse_arg),
@@ -541,7 +546,7 @@ static int add(int argc, const char **argv, const char *prefix)
* argv[0-1].
*/
argv[0] = "edit";
- return append_edit(argc, argv, prefix);
+ return append_edit(argc, argv, prefix, repo);
}
fprintf(stderr, _("Overwriting existing notes for object %s\n"),
oid_to_hex(&object));
@@ -567,7 +572,8 @@ static int add(int argc, const char **argv, const char *prefix)
return 0;
}
-static int copy(int argc, const char **argv, const char *prefix)
+static int copy(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int retval = 0, force = 0, from_stdin = 0;
const struct object_id *from_note, *note;
@@ -644,7 +650,8 @@ out:
return retval;
}
-static int append_edit(int argc, const char **argv, const char *prefix)
+static int append_edit(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int allow_empty = 0;
const char *object_ref;
@@ -667,6 +674,8 @@ static int append_edit(int argc, const char **argv, const char *prefix)
OPT_CALLBACK_F('C', "reuse-message", &d, N_("object"),
N_("reuse specified note object"), PARSE_OPT_NONEG,
parse_reuse_arg),
+ OPT_BOOL('e', "edit", &d.use_editor,
+ N_("edit note message in editor")),
OPT_BOOL(0, "allow-empty", &allow_empty,
N_("allow storing empty note")),
OPT_CALLBACK_F(0, "separator", &separator,
@@ -745,7 +754,8 @@ static int append_edit(int argc, const char **argv, const char *prefix)
return 0;
}
-static int show(int argc, const char **argv, const char *prefix)
+static int show(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
const char *object_ref;
struct notes_tree *t;
@@ -871,7 +881,8 @@ static int git_config_get_notes_strategy(const char *key,
return 0;
}
-static int merge(int argc, const char **argv, const char *prefix)
+static int merge(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
struct strbuf remote_ref = STRBUF_INIT, msg = STRBUF_INIT;
struct object_id result_oid;
@@ -1012,7 +1023,8 @@ static int remove_one_note(struct notes_tree *t, const char *name, unsigned flag
return (flag & IGNORE_MISSING) ? 0 : status;
}
-static int remove_cmd(int argc, const char **argv, const char *prefix)
+static int remove_cmd(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
unsigned flag = 0;
int from_stdin = 0;
@@ -1055,7 +1067,8 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
return retval;
}
-static int prune(int argc, const char **argv, const char *prefix)
+static int prune(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
struct notes_tree *t;
int show_only = 0, verbose = 0;
@@ -1084,7 +1097,8 @@ static int prune(int argc, const char **argv, const char *prefix)
return 0;
}
-static int get_ref(int argc, const char **argv, const char *prefix)
+static int get_ref(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
struct option options[] = { OPT_END() };
char *notes_ref;
@@ -1105,7 +1119,7 @@ static int get_ref(int argc, const char **argv, const char *prefix)
int cmd_notes(int argc,
const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
const char *override_notes_ref = NULL;
parse_opt_subcommand_fn *fn = NULL;
@@ -1144,5 +1158,5 @@ int cmd_notes(int argc,
strbuf_release(&sb);
}
- return !!fn(argc, argv, prefix);
+ return !!fn(argc, argv, prefix, repo);
}
5' class='logmsg'> 2002-04-07[PATCH] disable high mem on pio, ideJens Axboe1-1/+1 ide-dma incorrectly only clears high memory support if the verbose dma disabling is called, it should clear it for the non-verbose too. 2002-04-07[PATCH] ACPI compile fixAndy Grover1-0/+2 Hi Linus, Oops, SMP non-ACPI doesn't compile with the previous ACPI update. This fixes that. 2002-04-05[PATCH] ->setattr() locking changesAlexander Viro13-74/+82 Take ->i_sem in all callers of notify_change(). 2002-04-05[PATCH] IEEE-1394 UpdatesBen Collins26-1094/+3962 ieee1394 updates: - New drivers: eth1394, admtp - nodemgr cleanup - Fixes for ohci - fixed for node probes - small misc performance fixes - New /proc interface for subsystem, node listing, and dv1394 2002-04-05[PATCH] ->setattr() locking changesAndrew Morton1-0/+3 ext3 was missed - the removal of the BKL in notify_change means that the filesytem fails quite quickly on SMP in -pre2. Sorry, I should have spotted that when the patch floated past. 2002-04-05Update for new notify_change semanticsLinus Torvalds1-2/+0 2002-04-05MADT parsing improvements (Paul D & Richard Schaal)Andy Grover4-131/+298 ACPI PCI IRQ improvements (Dominik Brodowski and Paul D) Wakeup fix (Pavel Machek) 2002-04-05ACPI driver updatesAndy Grover19-919/+1828 Better IRQ routing ACPI 2.0-enumerated processor perf state support ACPI poweroff via magic sysrq 2002-04-05ACPI interpreter update.Andy Grover70-1028/+1610 add support for GPE fields to be in any address space, not just IO. comment and debug print cleanups 2002-04-05[PATCH] loop deadlock fixAndrew Morton1-1/+1 This chunk is present in 2.4, missing in 2.5. It stops the loop thread from waiting on its owm buffers. 2002-04-05Cset exclude: davej@suse.de|ChangeSet|20020404222348|23820Linus Torvalds1-1/+2 2002-04-04Clean up do_truncate due notify_change() locking changev2.5.8-pre2Linus Torvalds1-4/+1 2002-04-04Force some semblance of workingness onto qla1280 driverLinus Torvalds1-12/+12 2002-04-04Oops, remove remnants of old attribute lockLinus Torvalds1-1/+0 2002-04-05Make legacy drivers who use "virt_to_bus()" and friends work on x86.Linus Torvalds1-4/+4 It's up to other architectures to worry about portability for now. 2002-04-04[PATCH] shift BKL out of notify_changeDave Hansen17-63/+132 Moved i_sem down into notify_change() and out of the UMSDOS function. Moved BKL down from notify_change into filesystems. 2002-04-04[PATCH] PATCH 4a or 4 : knfs : typo...Neil Brown1-1/+1 typo in that last patch, sorry. 2002-04-04[PATCH] PATCH 4 of 4 : knfsd : Increase the max block size for NFS replies.Neil Brown2-3/+3 This increases the max read/write size for nfsd from 8K to 32K. This requires making NFSv2 return the right number in statfs requests. NFSv3 already does that. 2002-04-04[PATCH] PATCH 3 of 4 : knfsd : Store the fsid in the returned attributes ↵Neil Brown4-22/+46 instead of the device number When a filesystem is exported with fsid= we should use that fsid instead of the i_dev number when returning NFS attributes, so that there is no chance of clients that depend on the filesys id in the attributes getting confused by device numbers changing. We only do this if the reference filehandle uses fsid to identify the filesystem, so that a server can be converted from non-fsid= to using fsid= without confusing active clients. 2002-04-04[PATCH] PATCH 2 of 4 : knfsd : Allow exporting of deviceless filesystems if ↵Neil Brown1-3/+15 fsid= given Previously we could only export FS_REQUIRES_DEV filesystems as we need a devno to put in the filehandle. Now that we have fsid= (NFSEXP_FSID) we don't need a devno to put in the filehandle so we can relax this requirement. 2002-04-04[PATCH] PATCH 1 of 4 : knfsd : Use symbols for size calculation for response ↵Neil Brown2-37/+49 sizes. Use symbolic names for some common size components in the response size calculation for the NFSD. This makes it easier to get the numbers right and to review them. This patch also fixes a few number for nfsv3 that were wrong. 2002-04-04[PATCH] elevator 'buglet'Jens Axboe1-6/+0 Lets just kill this check -- it usually only catches drivers queueing something in front of a started request on their own (such as shoving a request sense in front of a failed packet command, for instance). So it's either working around this detection in some drivers, or killing it. I vote for the latter, patch attached against 2.5.8-pre1 :-) 2002-04-04USBGreg Kroah-Hartman2-39/+38 moved the USB_STORAGE Config.help items into the drivers/usb/storage directory.