mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-19 12:01:05 -05:00
Merge branch 'address-coverity-reports'
Coverity pointed out a couple of bugs, and here are fixes for some of them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -570,7 +570,10 @@ static int bisect_start(struct bisect_terms *terms, int no_checkout,
|
||||
write_file(git_path_bisect_start(), "%s\n", start_head.buf);
|
||||
|
||||
if (no_checkout) {
|
||||
get_oid(start_head.buf, &oid);
|
||||
if (get_oid(start_head.buf, &oid) < 0) {
|
||||
retval = error(_("invalid ref: '%s'"), start_head.buf);
|
||||
goto finish;
|
||||
}
|
||||
if (update_ref(NULL, "BISECT_HEAD", &oid, NULL, 0,
|
||||
UPDATE_REFS_MSG_ON_ERR)) {
|
||||
retval = -1;
|
||||
|
||||
@@ -1203,7 +1203,7 @@ static int rebase_config(const char *var, const char *value, void *data)
|
||||
if (git_config_bool(var, value))
|
||||
opts->flags |= REBASE_DIFFSTAT;
|
||||
else
|
||||
opts->flags &= !REBASE_DIFFSTAT;
|
||||
opts->flags &= ~REBASE_DIFFSTAT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user