Thread (33 messages) flat view 33 messages, 2 authors, 2016-06-15

Re: [PATCH 17/18] revert: Introduce --continue to continue the operation

From: Christian Couder <hidden>
Date: 2016-06-15 22:51:43

On Tuesday 02 August 2011 04:47:01 Christian Couder wrote:
We can simplify this loop using strchrnul() like this:

 	for (i = 1; *p; i++) {
 		struct commit *commit = parse_insn_line(p, opts);
 		if (!commit)
 			return error(_("Could not parse line %d."), i);
 		next = commit_list_append(commit, next);
 		p = strchrnul(p, '\n');
 	}
Ooops, sorry I mean like this:

	for (i = 1; *p; i++) {
		struct commit *commit = parse_insn_line(p, opts);
		if (!commit)
			return error(_("Could not parse line %d."), i);
		next = commit_list_append(commit, next);
		p = strchrnul(p, '\n');
		if (*p)
			p++;
	}

Thanks,
Christian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help