Merge branch 'po/userdiff-csharp'
[gitweb.git] / builtin / checkout.c
index 1f7e1546f69acaef5e3c5cca1476acec972cb334..7f81120c728dce6fe712280f40583925eda264e3 100644 (file)
@@ -533,10 +533,13 @@ static void update_refs_for_switch(struct checkout_opts *opts,
                        if (old->path && !strcmp(new->path, old->path))
                                fprintf(stderr, "Already on '%s'\n",
                                        new->name);
-                       else
+                       else if (opts->new_branch)
                                fprintf(stderr, "Switched to%s branch '%s'\n",
                                        opts->branch_exists ? " and reset" : " a new",
                                        new->name);
+                       else
+                               fprintf(stderr, "Switched to branch '%s'\n",
+                                       new->name);
                }
                if (old->path && old->name) {
                        char log_file[PATH_MAX], ref_file[PATH_MAX];