diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2008-11-10 21:43:00 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-11 14:19:29 -0800 |
commit | 89cf4c7004ec329c3171448a154d050c8f75874e (patch) | |
tree | 47290d1ea4edf2091b76c7c3d1a36e9fe6abf60b /remote.c | |
parent | bf98421a3363696f3b4c8aedc242bfaadc1ce6f6 (diff) | |
download | git-89cf4c7004ec329c3171448a154d050c8f75874e.tar.gz |
remote: add a new 'origin' variable to the struct
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>
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -201,6 +201,7 @@ static void read_remotes_file(struct remote *remote) if (!f) return; + remote->origin = REMOTE_REMOTES; while (fgets(buffer, BUF_SIZE, f)) { int value_list; char *s, *p; @@ -261,6 +262,7 @@ static void read_branches_file(struct remote *remote) s++; if (!*s) return; + remote->origin = REMOTE_BRANCHES; p = s + strlen(s); while (isspace(p[-1])) *--p = 0; @@ -350,6 +352,7 @@ static int handle_config(const char *key, const char *value, void *cb) 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")) |