Bence Ferdinandy <bence@xxxxxxxxxxxxxx> writes: [snip] > +static void report_set_head_auto(const char *remote, const char *head_name, > + struct strbuf *buf_prev) { > + struct strbuf buf_prefix = STRBUF_INIT; > + const char *prev_head = NULL; > + > + strbuf_addf(&buf_prefix, "refs/remotes/%s/", remote); > + skip_prefix(buf_prev->buf, buf_prefix.buf, &prev_head); > + > + if (prev_head && !strcmp(prev_head, head_name)) > + printf("'%s/HEAD' is unchanged and points to '%s'\n", > + remote, head_name); > + else if (prev_head) > + printf("'%s/HEAD' has changed from '%s' and now points to '%s'\n", > + remote, prev_head, head_name); > + else if (!buf_prev->len) > + printf("'%s/HEAD' is now created and points to '%s'\n", > + remote, head_name); > + else > + printf("'%s/HEAD' used to point to '%s' " > + "(which is not a remote branch), but now points to '%s'\n", > + remote, buf_prev->buf, head_name); > + strbuf_release(&buf_prefix); > +} > + Shouldn't the messages above be marked for translation too? using `_()`? > static int set_head(int argc, const char **argv, const char *prefix) > { > int i, opt_a = 0, opt_d = 0, result = 0; > - struct strbuf buf = STRBUF_INIT, buf2 = STRBUF_INIT; > + struct strbuf buf = STRBUF_INIT, buf2 = STRBUF_INIT, > + buf_prev = STRBUF_INIT; Nit: these names could definitely be better. [snip]
Attachment:
signature.asc
Description: PGP signature