Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Maciej Ciemborowicz <maciej.ciemborowicz@gmail.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>,
	 Karthik Nayak <karthik.188@gmail.com>
Subject: Re: [PATCH v3 0/4] refs: run copy and rename through transactions
Date: Wed, 07 Oct 2026 12:55:50 -0700	[thread overview]
Message-ID: <xmqq8q4970ah.fsf@gitster.g> (raw)
In-Reply-To: <cover.1791395643.git.maciej.ciemborowicz@gmail.com> (Maciej Ciemborowicz's message of "Wed, 07 Oct 2026 20:05:13 +0200")

Maciej Ciemborowicz <maciej.ciemborowicz@gmail.com> writes:

> Reference copy and rename bypass the transaction API. With files, the
> reference-transaction hook sees only the source deletion; with reftable,
> it sees neither endpoint. This series puts the logical ref updates and
> the reflog history into ordinary transactions so hooks can observe and
> reject the complete operation.
> ...
>  Documentation/githooks.adoc     |  10 +
>  refs.c                          | 200 ++++++++-
>  refs.h                          |  25 ++
>  refs/debug.c                    |  24 --
>  refs/files-backend.c            | 739 +++++++++++++++++---------------
>  refs/packed-backend.c           |   2 -
>  refs/refs-internal.h            |  28 +-
>  refs/reftable-backend.c         | 334 ++-------------
>  t/helper/test-ref-store.c       |  76 ++++
>  t/perf/p1424-ref-copy-rename.sh |  48 +++
>  t/t1424-ref-copy-transaction.sh | 352 +++++++++++++++
>  t/t1425-reflog-transaction.sh   |  59 +++
>  12 files changed, 1206 insertions(+), 691 deletions(-)
>  create mode 100755 t/perf/p1424-ref-copy-rename.sh
>  create mode 100755 t/t1424-ref-copy-transaction.sh
>  create mode 100755 t/t1425-reflog-transaction.sh
>
> Range-diff against v2:
> 1:  d852537d8c < -:  ---------- refs: run copy and rename through transactions
> -:  ---------- > 1:  6d7c146e57 refs: distinguish internal transactions from logical updates
> -:  ---------- > 2:  5c3ec4eb49 refs: support replacing reflogs in a transaction
> -:  ---------- > 3:  77af4e809c refs: run copy and rename through ordinary transactions
> -:  ---------- > 4:  83fa644fb3 refs: remove backend-specific copy and rename callbacks

I do not think I have time to read these humoungous patches, some of
which weigh more than 1000+ lines, with fine toothed comb any time
soon, but when applied to the recent tip of master 6de20f6092 (The
4th batch, 2026-10-06), it seems to break t0600 and t5510.  The
failing tests do not seem to be anything so system specific (and I
am on a GNU/Linux platform that is not anything remarkable).

I wonder what I am doing differently.  Did they pass for you?  Here
are the first failure from these test scripts.

Thanks.

expecting success of 0600.16 'delete fails cleanly if packed-refs.new write fails':
        # Setup and expectations are similar to the test above.
        prefix=refs/failed-packed-refs &&
        git update-ref $prefix/foo $C &&
        git pack-refs --all &&
        git update-ref $prefix/foo $D &&
        git for-each-ref $prefix >unchanged &&
        # This should not happen in practice, but it is an easy way to get a
        # reliable error (we open with create_tempfile(), which uses O_EXCL).
        : >.git/packed-refs.new &&
        test_when_finished "rm -f .git/packed-refs.new" &&
        test_must_fail git update-ref -d $prefix/foo &&
        git for-each-ref $prefix >actual &&
        test_cmp unchanged actual

test_must_fail: command succeeded: git update-ref -d refs/failed-packed-refs/foo
not ok 16 - delete fails cleanly if packed-refs.new write fails

expecting success of 5510.35 'fetch --prune fails to delete branches':
        git clone . prune-fail &&
        (
                cd prune-fail &&
                git update-ref refs/remotes/origin/extrabranch main &&
                git pack-refs --all &&
                : this will prevent --prune from locking packed-refs for deleting refs, but adding loose refs still succeeds  &&
                >.git/packed-refs.new &&

                test_must_fail git fetch --prune origin
        )

Cloning into 'prune-fail'...
done.
From /usr/local/google/home/jch/w/git.git/t/trash directory.t5510-fetch/.
 - [deleted]         (none)     -> origin/extrabranch
test_must_fail: command succeeded: git fetch --prune origin
not ok 35 - fetch --prune fails to delete branches



  parent reply	other threads:[~2026-10-07 19:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-19 13:33 [BUG] reference-transaction hook misses destination of git branch -m Maciej Ciemborowicz
2026-09-19 20:52 ` Karthik Nayak
2026-09-20 16:50   ` [PATCH] refs: run copy and rename through transactions Maciej Ciemborowicz
2026-09-21 17:54     ` Junio C Hamano
2026-09-21 23:28       ` Junio C Hamano
2026-09-22 13:08         ` Maciej Ciemborowicz
2026-09-23 13:36     ` [PATCH v2] " Maciej Ciemborowicz
2026-09-30  3:32       ` Maciej Ciemborowicz
2026-10-02 10:56       ` Patrick Steinhardt
2026-10-02 14:16         ` Maciej Ciemborowicz
2026-10-05  6:03           ` Patrick Steinhardt
2026-10-07 18:05     ` [PATCH v3 0/4] " Maciej Ciemborowicz
2026-10-07 18:05       ` [PATCH v3 1/4] refs: distinguish internal transactions from logical updates Maciej Ciemborowicz
2026-10-07 18:05       ` [PATCH v3 2/4] refs: support replacing reflogs in a transaction Maciej Ciemborowicz
2026-10-07 18:05       ` [PATCH v3 3/4] refs: run copy and rename through ordinary transactions Maciej Ciemborowicz
2026-10-07 18:05       ` [PATCH v3 4/4] refs: remove backend-specific copy and rename callbacks Maciej Ciemborowicz
2026-10-07 19:55       ` Junio C Hamano [this message]
2026-10-08  9:44     ` [PATCH v4 0/4] refs: run copy and rename through transactions Maciej Ciemborowicz
2026-10-08  9:44       ` [PATCH v4 1/4] refs: distinguish internal transactions from logical updates Maciej Ciemborowicz
2026-10-08  9:44       ` [PATCH v4 2/4] refs: support replacing reflogs in a transaction Maciej Ciemborowicz
2026-10-08  9:44       ` [PATCH v4 3/4] refs: run copy and rename through ordinary transactions Maciej Ciemborowicz
2026-10-08  9:44       ` [PATCH v4 4/4] refs: remove backend-specific copy and rename callbacks Maciej Ciemborowicz
2026-10-08 10:10       ` [PATCH v4 0/4] refs: run copy and rename through transactions Patrick Steinhardt
2026-10-08 10:43         ` Maciej Ciemborowicz
2026-10-08 11:01           ` Maciej Ciemborowicz
2026-10-08 15:45             ` Junio C Hamano
2026-10-08 19:06               ` Maciej Ciemborowicz
2026-10-08 19:19                 ` Kristoffer Haugsbakk
2026-10-08 21:11                   ` Maciej Ciemborowicz
2026-10-09  5:41                 ` Patrick Steinhardt
2026-10-08 15:54         ` Junio C Hamano
2026-09-23 12:49   ` [PATCH v4 0/3] refs: report old OIDs for batched deletions Maciej Ciemborowicz

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=xmqq8q4970ah.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    --cc=maciej.ciemborowicz@gmail.com \
    --cc=ps@pks.im \
    /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