summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bf98421)
raw | patch | inline | side by side (parent: bf98421)
author | Miklos Vajna <vmiklos@frugalware.org> | |
Mon, 10 Nov 2008 20:43:00 +0000 (21:43 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 11 Nov 2008 22:19:29 +0000 (14:19 -0800) |
This allows one to track where was the remote's original source, so that
it's possible to decide if it makes sense to migrate it to the config
format or not.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
it's possible to decide if it makes sense to migrate it to the config
format or not.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c | patch | blob | history | |
remote.h | patch | blob | history |
diff --git a/remote.c b/remote.c
index e530a21e5c92e49012c459fba0eb7732672883c2..cbb3e484fe7803f68eae8507c8216ed951d0b54b 100644 (file)
--- a/remote.c
+++ b/remote.c
if (!f)
return;
+ remote->origin = REMOTE_REMOTES;
while (fgets(buffer, BUF_SIZE, f)) {
int value_list;
char *s, *p;
s++;
if (!*s)
return;
+ remote->origin = REMOTE_BRANCHES;
p = s + strlen(s);
while (isspace(p[-1]))
*--p = 0;
if (!subkey)
return error("Config with no key for remote %s", name);
remote = make_remote(name, subkey - name);
+ remote->origin = REMOTE_CONFIG;
if (!strcmp(subkey, ".mirror"))
remote->mirror = git_config_bool(key, value);
else if (!strcmp(subkey, ".skipdefaultupdate"))
diff --git a/remote.h b/remote.h
index d2e170ce664c0efd9ded356c171dabf4b26e452c..a46a5be131caf1d1d71f97cab3c3ba2cebb6386c 100644 (file)
--- a/remote.h
+++ b/remote.h
#ifndef REMOTE_H
#define REMOTE_H
+enum {
+ REMOTE_CONFIG,
+ REMOTE_REMOTES,
+ REMOTE_BRANCHES
+};
+
struct remote {
const char *name;
+ int origin;
const char **url;
int url_nr;