git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] branch: trivial style fix
@ 2018-10-05  9:52 Tao Qingyun
  2018-10-05 16:21 ` Jeff King
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tao Qingyun @ 2018-10-05  9:52 UTC (permalink / raw)
  To: git; +Cc: sbeller, gitster, Tao Qingyun

---
 builtin/branch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/branch.c b/builtin/branch.c
index c396c41533..52aad0f602 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -222,10 +222,11 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
 		if (!head_rev)
 			die(_("Couldn't look up commit object for HEAD"));
 	}
-	for (i = 0; i < argc; i++, strbuf_reset(&bname)) {
+	for (i = 0; i < argc; i++) {
 		char *target = NULL;
 		int flags = 0;
 
+		strbuf_reset(&bname);
 		strbuf_branchname(&bname, argv[i], allowed_interpret);
 		free(name);
 		name = mkpathdup(fmt, bname.buf);
@@ -716,8 +717,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 		print_columns(&output, colopts, NULL);
 		string_list_clear(&output, 0);
 		return 0;
-	}
-	else if (edit_description) {
+	} else if (edit_description) {
 		const char *branch_name;
 		struct strbuf branch_ref = STRBUF_INIT;
 
-- 
2.19.0




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-16 15:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-05  9:52 [PATCH] branch: trivial style fix Tao Qingyun
2018-10-05 16:21 ` Jeff King
2018-10-05 16:47 ` Junio C Hamano
     [not found]   ` <87bm87x5z2.fsf@ls-a.me>
2018-10-15 19:35     ` Jeff King
2018-10-16 14:14       ` Tao Qingyun
2018-10-16 14:27         ` Ævar Arnfjörð Bjarmason
2018-10-16 15:32           ` Jeff King
2018-10-16 14:19 ` [PATCH v2] " Tao Qingyun
2018-10-16 15:33   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).