Merge branch 'ma/worktree-cleanups'

Code clean-up.

* ma/worktree-cleanups:
  worktree: use skip_prefix to parse target
  worktree: rename copy-pasted variable
  worktree: update renamed variable in comment
  worktree: inline `worktree_ref()` into its only caller
  wt-status: introduce wt_status_state_free_buffers()
  wt-status: print to s->fp, not stdout
  wt-status: replace sha1 mentions with oid
This commit is contained in:
Junio C Hamano
2020-10-05 14:01:52 -07:00
5 changed files with 70 additions and 66 deletions

View File

@ -1557,9 +1557,7 @@ char *get_head_description(void)
strbuf_addstr(&desc, _("no branch"));
strbuf_addch(&desc, ')');
free(state.branch);
free(state.onto);
free(state.detached_from);
wt_status_state_free_buffers(&state);
return strbuf_detach(&desc, NULL);
}