Thread (1 message) 1 message, 1 author, 2020-05-08

Re: [PATCH v5] submodule: port subcommand 'set-url' from shell to C

From: Junio C Hamano <hidden>
Date: 2020-05-08 16:17:27

Denton Liu [off-list ref] writes:
quoted
+	if (argc != 2 || !path || !newurl) {
+		usage_with_options(usage, options);
+		return 1;
It is embarrassing that nobody noticed that usage_with_options() is
NORETURN; return 1 has no effect here.
quoted
+	}
+
+	config_name = xstrfmt("submodule.%s.url", path);
+
+	config_set_in_gitmodules_file_gently(config_name, newurl);
+	sync_submodule(path, prefix, quiet ? OPT_QUIET : 0);
+
+	free(config_name);
+
+	return 0;
+}
+
 #define SUPPORT_SUPER_PREFIX (1<<0)
 
 struct cmd_struct {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help