Files
git/builtin
Thomas Gummerer a31eeae27f remote: use remote_is_configured() for add and rename
Both remote add and remote rename use a slightly different hand-rolled
check if the remote exits.  The hand-rolled check may have some subtle
cases in which it might fail to detect when a remote already exists.
One such case was fixed in fb86e32 ("git remote: allow adding remotes
agreeing with url.<...>.insteadOf").  Another case is when a remote is
configured as follows:

  [remote "foo"]
    vcs = bar

If we try to run `git remote add foo bar` with the above remote
configuration, git segfaults.  This change fixes it.

In addition, git remote rename $existing foo with the configuration for
foo as above silently succeeds, even though foo already exists,
modifying its configuration.  With this patch it fails with "remote foo
already exists".

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-16 13:33:12 -08:00
..
2016-02-03 14:16:04 -08:00
2015-10-05 11:08:04 -07:00
2016-01-20 11:43:25 -08:00
2015-11-20 08:02:05 -05:00
2016-02-03 14:15:58 -08:00
2016-01-28 16:10:14 -08:00
2015-11-20 08:02:05 -05:00
2015-11-20 08:02:05 -05:00
2016-02-03 14:16:04 -08:00
2016-01-20 11:43:35 -08:00
2015-11-20 08:02:05 -05:00
2016-02-03 14:15:58 -08:00
2015-10-05 11:08:06 -07:00
2015-11-20 08:02:05 -05:00
2015-11-20 04:52:01 -05:00
2016-01-18 19:48:43 -08:00
2015-10-21 15:59:34 -07:00
2015-11-20 08:02:05 -05:00
2015-11-20 08:02:05 -05:00
2015-11-20 08:02:05 -05:00
2016-01-28 16:10:14 -08:00
2016-01-12 15:16:54 -08:00
2015-11-20 08:02:05 -05:00
2015-10-05 13:20:08 -07:00
2015-11-20 08:02:05 -05:00
2015-11-20 08:02:05 -05:00
2016-01-20 11:43:25 -08:00
2016-01-28 16:10:14 -08:00
2015-11-20 08:02:05 -05:00
2015-11-20 08:02:05 -05:00