mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-17 04:23:29 -05:00
rebase -i: watch out for invalid upstream arguments
This was overlooked in 53bbcfbde7 (rebase -i: implement the main part
of interactive rebase as a builtin, 2018-09-27).
Found by Coverity.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -33,7 +33,8 @@ static int get_revision_ranges(const char *upstream, const char *onto,
|
||||
const char *shortrev;
|
||||
struct object_id rev_oid;
|
||||
|
||||
get_oid(base_rev, &rev_oid);
|
||||
if (get_oid(base_rev, &rev_oid) < 0)
|
||||
return error(_("invalid rev '%s'"), base_rev);
|
||||
shortrev = find_unique_abbrev(&rev_oid, DEFAULT_ABBREV);
|
||||
|
||||
*shortrevisions = xstrfmt("%s..%s", shortrev, shorthead);
|
||||
|
||||
Reference in New Issue
Block a user