Commit c07b52df by Ben Straub

Remove `inmem` flag, use NULL name instead

parent 0642c143
......@@ -191,7 +191,6 @@ int git_remote_create_inmemory(git_remote **out, git_repository *repo, const cha
if ((error = create_internal(&remote, repo, NULL, url, fetch)) < 0)
return error;
remote->inmem = true;
*out = remote;
return 0;
}
......@@ -366,7 +365,7 @@ int git_remote_save(const git_remote *remote)
assert(remote);
if (remote->inmem) {
if (!remote->name) {
giterr_set(GITERR_INVALID, "Can't save an in-memory remote.");
return GIT_EINVALIDSPEC;
}
......@@ -1325,7 +1324,7 @@ int git_remote_rename(
assert(remote && new_name);
if (remote->inmem) {
if (!remote->name) {
giterr_set(GITERR_INVALID, "Can't rename an in-memory remote.");
return GIT_EINVALIDSPEC;
}
......@@ -1347,7 +1346,7 @@ int git_remote_rename(
remote->name = git__strdup(new_name);
if (remote->inmem) return 0;
if (!remote->name) return 0;
return git_remote_save(remote);
}
......
......@@ -19,7 +19,6 @@ struct git_remote {
char *name;
char *url;
char *pushurl;
bool inmem;
git_vector refs;
struct git_refspec fetch;
struct git_refspec push;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment