struct strbuf remainder;
};
-static int parse_num(char **cp_p, int *num_p)
-{
- char *cp = *cp_p;
- int num = 0;
-
- while ('0' <= *cp && *cp <= '9')
- num = num * 10 + *cp++ - '0';
- if (!(cp - *cp_p))
- return -1;
- *cp_p = cp;
- *num_p = num;
- return 0;
-}
-
-int parse_hunk_header(char *line, int len,
- int *ob, int *on,
- int *nb, int *nn)
-{
- char *cp;
- cp = line + 4;
- if (parse_num(&cp, ob)) {
- bad_line:
- return error("malformed diff output: %s", line);
- }
- if (*cp == ',') {
- cp++;
- if (parse_num(&cp, on))
- goto bad_line;
- }
- else
- *on = 1;
- if (*cp++ != ' ' || *cp++ != '+')
- goto bad_line;
- if (parse_num(&cp, nb))
- goto bad_line;
- if (*cp == ',') {
- cp++;
- if (parse_num(&cp, nn))
- goto bad_line;
- }
- else
- *nn = 1;
- return -!!memcmp(cp, " @@", 3);
-}
-
static int xdiff_out_hunk(void *priv_,
long old_begin, long old_nr,
long new_begin, long new_nr,
unsigned long size;
enum object_type type;
- if (!oidcmp(oid, &null_oid)) {
+ if (oideq(oid, &null_oid)) {
ptr->ptr = xstrdup("");
ptr->size = 0;
return;
git_xmerge_style = XDL_MERGE_DIFF3;
else if (!strcmp(value, "merge"))
git_xmerge_style = 0;
+ /*
+ * Please update _git_checkout() in
+ * git-completion.bash when you add new merge config
+ */
else
die("unknown style '%s' given for '%s'",
value, var);