diff options
| author | Junio C Hamano <gitster@pobox.com> | 2008-11-12 22:00:25 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2008-11-12 22:00:25 -0800 |
| commit | a5b2d4ac24ef18cf8c628e258bef8a20d9bf4b2b (patch) | |
| tree | 01b2cd87612e8dab1a3208627d8b3dd03ba4a599 /remote.c | |
| parent | 902a4a252a05c492824be693d5ed1888961756f9 (diff) | |
| parent | 74443f185ed91f3388b0e45838262eb3ec8338aa (diff) | |
| download | git-a5b2d4ac24ef18cf8c628e258bef8a20d9bf4b2b.tar.xz | |
Merge branch 'mv/remote-rename'
* mv/remote-rename:
git-remote: document the migration feature of the rename subcommand
git-remote rename: migrate from remotes/ and branches/
remote: add a new 'origin' variable to the struct
Implement git remote rename
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")) |
