mirror of
https://github.com/git/git.git
synced 2026-03-13 02:13:24 +01:00
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:
13
commit.c
13
commit.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user