Skip to content

improve symbolic-ref robustness

Jeff King git 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 9 repliesIn review
  2. v14 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3create_symref: modernize variable namesrefs.h refs/files-backend.c+21 -220 replies
2/3create_symref: use existing ref-lock coderefs/files-backend.c t/t1401-symbolic-ref.sh+62 -550 replies
3/3create_symref: write reflog while holding lockrefs/files-backend.c+2 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMichael Haggerty
SeriesR-b
1/3
2/3
3/3Noticed-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] improve symbolic-ref robustness
Quoted 3 lines · Jeff King

I noticed that an interrupt "git symbolic-ref" will not clean up "HEAD.lock". So I started this series as an attempt to convert create_symref() to "struct lock_file" to get the usual tempfile cleanup.

Here's version 2, based on comments from Michael. The first two patches were picked out separately for jk/symbolic-ref-maint, so I've dropped them here (so 1+2 here are the original 3+4).

The other differences from v1 are:

- use "refname" instead of "ref" to match surrounding code

- drop adjust_shared_perm, as lockfile does it for us

- adjust reflog writing order (done in a new patch)

The patches are:

[1/3]: create_symref: modernize variable names [2/3]: create_symref: use existing ref-lock code [3/3]: create_symref: write reflog while holding lock

-Peff