From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: "Stefan Beller" <sbeller@google.com>,
"Martin Ågren" <martin.agren@gmail.com>,
gitgitgadget@gmail.com, git <git@vger.kernel.org>,
"Junio C Hamano" <gitster@pobox.com>,
"Gaël Lhez" <gael.lhez@gmail.com>
Subject: Re: [PATCH v2 1/1] bundle: cleanup lock files on error
Date: Thu, 15 Nov 2018 11:43:01 -0500 [thread overview]
Message-ID: <20181115164300.GA29290@sigill.intra.peff.net> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1811151725310.41@tvgsbejvaqbjf.bet>
On Thu, Nov 15, 2018 at 05:32:15PM +0100, Johannes Schindelin wrote:
> I cannot claim that I wrapped my head around your explanation or your diff (I am
> busy trying to prepare Git for Windows' `master` for rebasing to v2.20.0-rc0),
> but it does fix the problem. Thank you so much!
>
> The line `test_expect_code 1 ...` needs to be adjusted to `test_expect_code
> 128`, of course, and to discern from the fixed problem (which also exits with
> code 128), the error output should be verified, like so:
>
> -- snip --
> test_expect_success 'try to create a bundle with empty ref count' '
> test_must_fail git bundle create foobar.bundle master..master 2>err &&
> test_i18ngrep "Refusing to create empty bundle" err
> '
> -- snap --
It seems like we should be checking that the stale lockfile isn't left,
which is the real problem (the warning is annoying, but is a symptom of
the same thing). I.e., something like:
test_must_fail git bundle create foobar.bundle master..master &&
test_path_is_missing foobar.bundle.lock
That would already pass on non-Windows platforms, but that's OK. It will
never give a false failure.
If you don't mind, can you confirm that the test above fails without
either of the two patches under discussion?
> Do you want to integrate this test into your patch and run with it, or do you
> want me to shepherd your patch?
I'll wrap it up with a commit message and a test.
-Peff
next prev parent reply other threads:[~2018-11-15 16:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 15:09 [PATCH 0/1] bundle: fix issue when bundles would be empty Johannes Schindelin via GitGitGadget
2018-11-13 15:09 ` [PATCH 1/1] bundle: refuse to create empty bundle Gaël Lhez via GitGitGadget
2018-11-13 19:28 ` Stefan Beller
2018-11-13 20:37 ` Gaël Lhez
[not found] ` <CAK8L4uiMHrsdwJz9+rD1tSCywL2kHosx-hKZdS=UtZDHLy464A@mail.gmail.com>
2018-11-13 21:11 ` Stefan Beller
2018-11-14 15:23 ` Johannes Schindelin
2018-11-14 15:25 ` [PATCH v2 0/1] bundle: fix issue when bundles would be empty Johannes Schindelin via GitGitGadget
2018-11-14 15:25 ` [PATCH v2 1/1] bundle: cleanup lock files on error Gaël Lhez via GitGitGadget
2018-11-14 21:43 ` Martin Ågren
2018-11-14 22:08 ` Stefan Beller
2018-11-15 4:34 ` Jeff King
2018-11-15 12:57 ` Johannes Schindelin
2018-11-15 13:37 ` Jeff King
2018-11-15 16:32 ` Johannes Schindelin
2018-11-15 16:43 ` Jeff King [this message]
2018-11-15 20:01 ` Johannes Schindelin
2018-11-16 9:43 ` [PATCH] bundle: dup() output descriptor closer to point-of-use Jeff King
2018-11-16 15:06 ` Johannes Schindelin
2018-11-17 7:05 ` Junio C Hamano
2018-11-15 16:49 ` [PATCH v2 1/1] bundle: cleanup lock files on error Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181115164300.GA29290@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=gael.lhez@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=martin.agren@gmail.com \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).