author | Jeff King <peff@peff.net> | |
Wed, 24 Feb 2010 17:08:53 +0000 (12:08 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 24 Feb 2010 19:16:14 +0000 (11:16 -0800) | ||
commit | db03b55781f23a9276234faf9a21922ff8c5678d | |
tree | 6fbba79fe0bb29f19acb0ecc0528dcd25560cae8 | tree | snapshot |
parent | 521537476fe99b97bfcdf1b8f0c579061af5fd3e | commit | diff |
push: fix segfault for odd config
If you have a branch.$X.merge config option, but no branch.$X.remote, and
your configuration tries to push tracking branches, git will segfault.
The problem is that even though branch->merge_nr is 1, you don't actually
have an upstream since there is no remote. Other callsites generally
check explicitly that branch->merge is not NULL, so let's do that here,
too.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If you have a branch.$X.merge config option, but no branch.$X.remote, and
your configuration tries to push tracking branches, git will segfault.
The problem is that even though branch->merge_nr is 1, you don't actually
have an upstream since there is no remote. Other callsites generally
check explicitly that branch->merge is not NULL, so let's do that here,
too.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-push.c | diff | blob | history |