[PATCH 2/7] clone: also configure url for bare clones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this the 'origin' remote would not be configured, so when
calling remote_get with 'origin' as argument we would get an
unconfigured remote.
---

	Turns out there was one use-case that is not exercised by the
	test suite. The remote-helper tests later in the series do
	exercised that path, but we might want a seperate test.

 builtin/clone.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index 068d61f..05be999 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -495,12 +495,12 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 			git_config_set(key.buf, "true");
 			strbuf_reset(&key);
 		}
-
-		strbuf_addf(&key, "remote.%s.url", option_origin);
-		git_config_set(key.buf, repo);
-		strbuf_reset(&key);
 	}
 
+	strbuf_addf(&key, "remote.%s.url", option_origin);
+	git_config_set(key.buf, repo);
+	strbuf_reset(&key);
+
 	if (option_reference)
 		setup_reference(git_dir);
 
-- 
1.7.0.3.317.gbb04ec

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]