diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-02-17 18:00:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-17 11:24:20 -0800 |
commit | a933c23e66265eedf822535ac56fcdb4ecb07a8c (patch) | |
tree | 2248903b0d95e1bdf362828ebf5dd40507c3532b /sideband.c | |
parent | commit: add tests of commit races (diff) | |
download | tgif-a933c23e66265eedf822535ac56fcdb4ecb07a8c.tar.xz |
commit: avoid race when creating orphan commits
If HEAD doesn't point at anything during the initial check, then we
should make sure that it *still* doesn't point at anything when we are
ready to update the reference. Otherwise, another process might commit
while we are working (e.g., while we are waiting for the user to edit
the commit message) and we will silently overwrite it.
This fixes a failing test in t7516.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sideband.c')
0 files changed, 0 insertions, 0 deletions