Merge branch 'master' into next

* master:
  add: introduce add.ignoreerrors synonym for add.ignore-errors
  commit.c: Remove backward goto in read_craft_line()
  bash: Match lightweight tags in prompt
  git-commit.txt: (synopsis): move -i and -o before "--"

Conflicts:
	Documentation/git-commit.txt
This commit is contained in:
Junio C Hamano
2010-12-01 16:42:22 -08:00
5 changed files with 16 additions and 10 deletions

View File

@@ -150,12 +150,8 @@ struct commit_graft *read_graft_line(char *buf, int len)
buf[--len] = '\0';
if (buf[0] == '#' || buf[0] == '\0')
return NULL;
if ((len + 1) % 41) {
bad_graft_data:
error("bad graft data: %s", buf);
free(graft);
return NULL;
}
if ((len + 1) % 41)
goto bad_graft_data;
i = (len + 1) / 41 - 1;
graft = xmalloc(sizeof(*graft) + 20 * i);
graft->nr_parent = i;
@@ -168,6 +164,11 @@ struct commit_graft *read_graft_line(char *buf, int len)
goto bad_graft_data;
}
return graft;
bad_graft_data:
error("bad graft data: %s", buf);
free(graft);
return NULL;
}
static int read_graft_file(const char *graft_file)