mbox series

[v3,0/2] show-brach: segfault fix from Gregory David

Message ID cover-v3-0.2-00000000000-20220421T152704Z-avarab@gmail.com (mailing list archive)
Headers show
Series show-brach: segfault fix from Gregory David | expand

Message

Ævar Arnfjörð Bjarmason April 21, 2022, 3:33 p.m. UTC
This is a version of
https://lore.kernel.org/git/225b410d-2d98-8c0b-c289-22f753c175d4@p1sec.com/
that applies with "git am", the patch got munged in transit (from the
looks of it from Thunderbird's wrapping).

I added a 1/2 to factor out some shared code used by the segfault fix,
and made the now-smaller 2/2 use that function.

I also renamed some varibles to reduce wrapping, and made the
append_one_rev() come after the ref formatting. Other similar code
above does that, it looks to me like they're equivalent
(append_one_rev increments ref_name_cnt).

Gregory David (1):
  show-branch: fix SEGFAULT when `--current` and `--reflog` together

Ævar Arnfjörð Bjarmason (1):
  show-branch: refactor in preparation for next commit

 builtin/show-branch.c  | 47 ++++++++++++++++++++++++++++++------------
 t/t3202-show-branch.sh | 43 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+), 13 deletions(-)