if (shortname) {
if (origin)
printf_ln(rebasing ?
- _("Branch %s set up to track remote branch %s from %s by rebasing.") :
- _("Branch %s set up to track remote branch %s from %s."),
+ _("Branch '%s' set up to track remote branch '%s' from '%s' by rebasing.") :
+ _("Branch '%s' set up to track remote branch '%s' from '%s'."),
local, shortname, origin);
else
printf_ln(rebasing ?
- _("Branch %s set up to track local branch %s by rebasing.") :
- _("Branch %s set up to track local branch %s."),
+ _("Branch '%s' set up to track local branch '%s' by rebasing.") :
+ _("Branch '%s' set up to track local branch '%s'."),
local, shortname);
} else {
if (origin)
printf_ln(rebasing ?
- _("Branch %s set up to track remote ref %s by rebasing.") :
- _("Branch %s set up to track remote ref %s."),
+ _("Branch '%s' set up to track remote ref '%s' by rebasing.") :
+ _("Branch '%s' set up to track remote ref '%s'."),
local, remote);
else
printf_ln(rebasing ?
- _("Branch %s set up to track local ref %s by rebasing.") :
- _("Branch %s set up to track local ref %s."),
+ _("Branch '%s' set up to track local ref '%s' by rebasing.") :
+ _("Branch '%s' set up to track local ref '%s'."),
local, remote);
}
}
if (!attr_only) {
const char *head;
- struct object_id oid;
- head = resolve_ref_unsafe("HEAD", 0, oid.hash, NULL);
+ head = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
if (!is_bare_repository() && head && !strcmp(head, ref->buf))
die(_("Cannot force update the current branch."));
}
die(_("Not a valid object name: '%s'."), start_name);
}
- switch (dwim_ref(start_name, strlen(start_name), oid.hash, &real_ref)) {
+ switch (dwim_ref(start_name, strlen(start_name), &oid, &real_ref)) {
case 0:
/* Not branching from any existing branch */
if (explicit_tracking)
transaction = ref_transaction_begin(&err);
if (!transaction ||
ref_transaction_update(transaction, ref.buf,
- oid.hash, forcing ? NULL : null_sha1,
+ &oid, forcing ? NULL : &null_oid,
0, msg, &err) ||
ref_transaction_commit(transaction, &err))
die("%s", err.buf);