mbox series

[0/8] various wt-status/worktree cleanups

Message ID cover.1599762679.git.martin.agren@gmail.com (mailing list archive)
Headers show
Series various wt-status/worktree cleanups | expand

Message

Martin Ågren Sept. 10, 2020, 7:03 p.m. UTC
Junio noticed that wt-status.c is a bit inconsistent about printing to
`s->fp` vs `stdout`. That's patch two. The third patch tries to
robustify some freeing of memory. While working on that one, I ended up
in the sibling file worktree.c.

This merges pretty well with `seen` (`jc/quote-path-cleanup`) (and the
tests still pass). These patches are obviously low priority, nothing
revolutionary here.

Martin Ågren (8):
  wt-status: replace sha1 mentions with oid
  wt-status: print to s->fp, not stdout
  wt-status: introduce wt_status_state_free_buffers()
  worktree: drop useless call to strbuf_reset
  worktree: update renamed variable in comment
  worktree: rename copy-pasted variable
  worktree: use skip_prefix to parse target
  worktree: simplify search for unique worktree

 wt-status.h  |  7 +++++
 ref-filter.c |  4 +--
 worktree.c   | 39 +++++++++++++--------------
 wt-status.c  | 76 ++++++++++++++++++++++++++++++----------------------
 4 files changed, 71 insertions(+), 55 deletions(-)

Comments

Taylor Blau Sept. 12, 2020, 3:49 a.m. UTC | #1
On Thu, Sep 10, 2020 at 09:03:34PM +0200, Martin Ågren wrote:
> This merges pretty well with `seen` (`jc/quote-path-cleanup`) (and the
> tests still pass). These patches are obviously low priority, nothing
> revolutionary here.

What revision is this series based on, again? Applying the first patch
on top of 'seen' (bf3e2864f3, at the time of writing) produces a
conflict due to the dropped parameter in 'dwim_ref()'.

But, applying in directly on top of Junio's 'jc/quote-path-cleanup' from
his repository handles the first patch just fine, but fails in the
second patch. The conflicts here are in 'wt_shortstatus_unmerged' and
'wt_shortstatus_status'.

I didn't look deeply to figure out what exactly was going on here, but
it would be good to know so that I can play with these patches a bit
myself.

Thanks,
Taylor
Martin Ågren Sept. 12, 2020, 2:03 p.m. UTC | #2
On Sat, 12 Sep 2020 at 05:49, Taylor Blau <me@ttaylorr.com> wrote:
>
> On Thu, Sep 10, 2020 at 09:03:34PM +0200, Martin Ågren wrote:
> > This merges pretty well with `seen` (`jc/quote-path-cleanup`) (and the
> > tests still pass). These patches are obviously low priority, nothing
> > revolutionary here.
>
> What revision is this series based on, again? [ ... ]

This is on top of current maint: 47ae905ffb ("Git 2.28", 2020-07-26)

> I didn't look deeply to figure out what exactly was going on here, but
> it would be good to know so that I can play with these patches a bit
> myself.

Ok, beware that there's at least one bug, so you're better off dropping
"worktree: drop useless call to strbuf_reset". I'll probably replace it
with something to remove that function and basically inline it into
its only caller.


Martin