diff options
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r-- | builtin/worktree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c index 78d26902a6..475b9581a5 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -12,7 +12,7 @@ #include "worktree.h" static const char * const worktree_usage[] = { - N_("git worktree add [<options>] <path> <branch>"), + N_("git worktree add [<options>] <path> [<branch>]"), N_("git worktree prune [<options>]"), N_("git worktree list [<options>]"), NULL @@ -277,7 +277,7 @@ static int add_worktree(const char *path, const char *refname, if (commit) argv_array_pushl(&cp.args, "update-ref", "HEAD", - sha1_to_hex(commit->object.sha1), NULL); + oid_to_hex(&commit->object.oid), NULL); else argv_array_pushl(&cp.args, "symbolic-ref", "HEAD", symref.buf, NULL); |