Merge branch 'ab/fetch-negotiate-segv-fix'
Code recently added to support common ancestry negotiation during "git push" did not sanity check its arguments carefully enough. * ab/fetch-negotiate-segv-fix: fetch: fix segfault in --negotiate-only without --negotiation-tip=* fetch: document the --negotiate-only option send-pack.c: move "no refs in common" abort earlier
This commit is contained in:
@ -1990,6 +1990,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
|
||||
fetch_config_from_gitmodules(sfjc, rs);
|
||||
}
|
||||
|
||||
if (negotiate_only && !negotiation_tip.nr)
|
||||
die(_("--negotiate-only needs one or more --negotiate-tip=*"));
|
||||
|
||||
if (deepen_relative) {
|
||||
if (deepen_relative < 0)
|
||||
die(_("Negative depth in --deepen is not supported"));
|
||||
|
||||
Reference in New Issue
Block a user