]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin/checkout.c
Turn unpack_trees_options.msgs into an array + enum
[git.git] / builtin / checkout.c
index 72e4fbc729f0afcc459ab67926e9c2575fd72094..7d1706e0f9a5b866f8d592914ab8cc2330d271a8 100644 (file)
@@ -373,7 +373,7 @@ static int merge_working_tree(struct checkout_opts *opts,
                topts.src_index = &the_index;
                topts.dst_index = &the_index;
 
-               topts.msgs.not_uptodate_file = "You have local changes to '%s'; cannot switch branches.";
+               topts.msgs[ERROR_NOT_UPTODATE_FILE] = "You have local changes to '%s'; cannot switch branches.";
 
                refresh_cache(REFRESH_QUIET);
 
@@ -636,7 +636,8 @@ static int check_tracking_name(const char *refname, const unsigned char *sha1,
 
 static const char *unique_tracking_name(const char *name)
 {
-       struct tracking_name_data cb_data = { name, NULL, 1 };
+       struct tracking_name_data cb_data = { NULL, NULL, 1 };
+       cb_data.name = name;
        for_each_ref(check_tracking_name, &cb_data);
        if (cb_data.unique)
                return cb_data.remote;