X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin%2Fcheckout.c;h=7d1706e0f9a5b866f8d592914ab8cc2330d271a8;hb=08353ebbab2dfdee50a6daa616ec8b6483cb07c8;hp=72e4fbc729f0afcc459ab67926e9c2575fd72094;hpb=5bebcd4ecba0791cecaa49d30ddd7ca8ffe03627;p=git.git diff --git a/builtin/checkout.c b/builtin/checkout.c index 72e4fbc72..7d1706e0f 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -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;