[RFC PATCH 09/35] update: add options and usage skeleton

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 builtin/update.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/builtin/update.c b/builtin/update.c
index 51e45b453d..1a69896aa8 100644
--- a/builtin/update.c
+++ b/builtin/update.c
@@ -3,9 +3,19 @@
  */
 
 #include "builtin.h"
+#include "parse-options.h"
 #include "run-command.h"
 #include "dir.h"
 
+static const char * const update_usage[] = {
+	N_("git update"),
+	NULL
+};
+
+static struct option update_options[] = {
+	OPT_END()
+};
+
 static int run_fetch(void)
 {
 	struct strvec args = STRVEC_INIT;
@@ -35,6 +45,8 @@ int cmd_update(int argc, const char **argv, const char *prefix)
 	if (!getenv("GIT_REFLOG_ACTION"))
 		setenv("GIT_REFLOG_ACTION", "update", 0);
 
+	argc = parse_options(argc, argv, prefix, update_options, update_usage, 0);
+
 	if (repo_read_index_unmerged(the_repository))
 		die_resolve_conflict("update");
 
-- 
2.32.0.36.g70aac2b1aa




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux