aboutsummaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wt-status.c b/wt-status.c
index 4f76e19d3..ed3271c3f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1449,7 +1449,7 @@ static void wt_status_get_detached_from(struct wt_status_state *state)
return;
}
- if (dwim_ref(cb.buf.buf, cb.buf.len, oid.hash, &ref) == 1 &&
+ if (dwim_ref(cb.buf.buf, cb.buf.len, &oid, &ref) == 1 &&
/* sha1 is a commit? match without further lookup */
(!oidcmp(&cb.noid, &oid) ||
/* perhaps sha1 is a tag, try to dereference to a commit */
@@ -2297,14 +2297,14 @@ int has_uncommitted_changes(int ignore_submodules)
*/
int require_clean_work_tree(const char *action, const char *hint, int ignore_submodules, int gently)
{
- struct lock_file *lock_file = xcalloc(1, sizeof(*lock_file));
+ struct lock_file lock_file = LOCK_INIT;
int err = 0, fd;
- fd = hold_locked_index(lock_file, 0);
+ fd = hold_locked_index(&lock_file, 0);
refresh_cache(REFRESH_QUIET);
if (0 <= fd)
- update_index_if_able(&the_index, lock_file);
- rollback_lock_file(lock_file);
+ update_index_if_able(&the_index, &lock_file);
+ rollback_lock_file(&lock_file);
if (has_unstaged_changes(ignore_submodules)) {
/* TRANSLATORS: the action is e.g. "pull with rebase" */