[PATCH 13/19] ui-snapshot: use a struct strbuf instead of fixed-size buffers
Jason A. Donenfeld
Jason at zx2c4.com
Sun Apr 7 15:25:36 CEST 2013
On Sun, Apr 7, 2013 at 11:30 AM, John Keeping <john at keeping.me.uk> wrote:
> + if (prefixcmp(snapshot.buf, reponame) == 0) {
> + const char *new_start = snapshot.buf;
> + new_start += strlen(reponame);
> + while (new_start && (*new_start == '-' || *new_start == '_'))
> + new_start++;
> + strbuf_splice(&snapshot, 0, new_start - snapshot.buf, "", 0);
> }
Something funky is happening here.
More information about the CGit
mailing list