[PATCH 2/7] git-remote - Unset core.origin when deleting the default remote

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <gitster@...>
Cc: <git@...>, Mark Levedahl <mlevedahl@...>
Date: Sunday, February 3, 2008 - 1:31 pm

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 git-remote.perl |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/git-remote.perl b/git-remote.perl
index d13e4c1..75d2371 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -328,6 +328,11 @@ sub rm_remote {
 
 	$git->command('config', '--remove-section', "remote.$name");
 
+	my $defremote = $git->config("core.origin");
+	if (defined $defremote && $defremote eq $name) {
+	       $git->command("config", "--unset", "core.origin");
+	}
+
 	eval {
 	    my @trackers = $git->command('config', '--get-regexp',
 			'branch.*.remote', $name);
-- 
1.5.4.18.g43c18

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0 of 7] [resend] - Improve handling remotes, orig..., Johannes Schindelin, (Sun Feb 3, 6:43 pm)
Re: [PATCH 0 of 7] [resend] - Improve handling remotes, orig..., Johannes Schindelin, (Mon Feb 4, 10:55 am)
Re: [PATCH 0 of 7] [resend] - Improve handling remotes, orig..., Johannes Schindelin, (Mon Feb 4, 10:48 am)
Re: [PATCH 0 of 7] [resend] - Improve handling remotes, orig..., Johannes Schindelin, (Mon Feb 4, 4:47 pm)
Re: [PATCH 0 of 7] [resend] - Improve handling remotes, orig..., Johannes Schindelin, (Mon Feb 4, 5:49 pm)
Re: [PATCH 0 of 7] [resend] - Improve handling remotes, orig..., Johannes Schindelin, (Mon Feb 4, 2:15 pm)
[PATCH 2/7] git-remote - Unset core.origin when deleting the..., Mark Levedahl, (Sun Feb 3, 1:31 pm)