From patchwork Wed Jan 6 09:01:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 12001177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BB22C433DB for ; Wed, 6 Jan 2021 09:03:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 233DA2310C for ; Wed, 6 Jan 2021 09:03:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726385AbhAFJCt (ORCPT ); Wed, 6 Jan 2021 04:02:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbhAFJCr (ORCPT ); Wed, 6 Jan 2021 04:02:47 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96FA6C06134D for ; Wed, 6 Jan 2021 01:02:07 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id 11so1348705pfu.4 for ; Wed, 06 Jan 2021 01:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wdLUcs3RHXTDanAA+JFePnfaSbgyLTYONomgKCN8nyY=; b=YxPPMI27+9AOBOzvJp6+DeWs4vT4W2WWREA2s3+WlIeDANMsKfdzkrDkfJ/BQRcYEG 1XhYcg1qqm1OPP/JTmq7i2/8g60/IQTRVst4VgVabcFPk9dtooyClkRekVYes0PEX+NA 1taGWn4ao+7BDOPUnLTNyOqfJdsU7BJpLKsi6mnFPj94875KdTrTOYVjRI642ppTskjX WK15zjKYuP57+Xh/SAZM+TA0QwnXjcFqvIHOluV1ujYze8Zz52vrAbf1hJtBM79HPW2c seHOPI4xpU/S9bC73Bga20EukBwYobvWp91BgHxqQGyJIeSqDrEIzGuqNf+ritvXB3Lr eXjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wdLUcs3RHXTDanAA+JFePnfaSbgyLTYONomgKCN8nyY=; b=WEzLOm+LIjNXUakKAES3NiZVQ/WYbyO0xUlRdK5zOCdGHFqQYzKJBajFrec0wbUf9K MBrvlvzUqLxSfRXz9D+0q5YZbo0gu9V08HL4zrXDh9g2CcOAdZ38nRQT6CPU8vQM2KK3 EaQEBwx2fOFT5t546j+/9omqPPzQbog/R36j81kqkOeGv6n+xVIGdz67J7sjrzOXzsWt BAwH9uqNTRg6tYRuQEFHBVin1MdS4+Zosx1x767XiR6HXNXEKmSoOKNlui4JUBhIUqUo 8ls3z0exFre2z7ahcAjl3KnpE8QTo8m1uWeylq/lUy/N86FKn984PPNarAR//2ksD9A/ RKVQ== X-Gm-Message-State: AOAM5312HZRx4bR5oRyTHOHtYBlMoCUGv2PAKxiH9b/2Y5Tr0UIpkDgg T+C7pY0nAGE9vhE7xmFuNF4/8AD7oTQ= X-Google-Smtp-Source: ABdhPJzkNYX8vkGFYO47G7LQvo2oihMGj4pB4maNJjqnOJgyhkl0rf9NQBu1ukQuBWs1FW1EnByMfg== X-Received: by 2002:a63:e1b:: with SMTP id d27mr3502071pgl.441.1609923726988; Wed, 06 Jan 2021 01:02:06 -0800 (PST) Received: from archbookpro.hsd1.ca.comcast.net ([2601:647:4201:c540::414c]) by smtp.gmail.com with ESMTPSA id m10sm1561919pjn.53.2021.01.06.01.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 01:02:06 -0800 (PST) From: Denton Liu To: Git Mailing List Cc: =?utf-8?q?Martin_=C3=85gren?= , =?utf-8?q?SZEDER?= =?utf-8?q?_G=C3=A1bor?= , Junio C Hamano Subject: [PATCH v2 1/2] refs: factor out set_read_ref_cutoffs() Date: Wed, 6 Jan 2021 01:01:53 -0800 Message-Id: <8f14ec39970b6cbf9b6615485316063306706e6a.1609923643.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: References: <0c6885f15f5ce0be28142d9c69724362e72481a9.1609551262.git.liu.denton@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This block of code is duplicated twice. In a future commit, it will be duplicated for a third time. Factor out the common functionality into set_read_ref_cutoffs(). In the case of read_ref_at_ent(), we are incrementing `cb->reccnt` at the beginning of the function. Move these to right before the return so that the `cb->reccnt - 1` is changed to `cb->reccnt` and it can be cleanly factored out into set_read_ref_cutoffs(). The duplication of the increment statements will be removed in a future patch. Signed-off-by: Denton Liu --- refs.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/refs.c b/refs.c index 13dc2c3291..bfdd04aefd 100644 --- a/refs.c +++ b/refs.c @@ -882,25 +882,30 @@ struct read_ref_at_cb { int *cutoff_cnt; }; +static void set_read_ref_cutoffs(struct read_ref_at_cb *cb, + timestamp_t timestamp, int tz, const char *message) +{ + if (cb->msg) + *cb->msg = xstrdup(message); + if (cb->cutoff_time) + *cb->cutoff_time = timestamp; + if (cb->cutoff_tz) + *cb->cutoff_tz = tz; + if (cb->cutoff_cnt) + *cb->cutoff_cnt = cb->reccnt; +} + static int read_ref_at_ent(struct object_id *ooid, struct object_id *noid, const char *email, timestamp_t timestamp, int tz, const char *message, void *cb_data) { struct read_ref_at_cb *cb = cb_data; - cb->reccnt++; cb->tz = tz; cb->date = timestamp; if (timestamp <= cb->at_time || cb->cnt == 0) { - if (cb->msg) - *cb->msg = xstrdup(message); - if (cb->cutoff_time) - *cb->cutoff_time = timestamp; - if (cb->cutoff_tz) - *cb->cutoff_tz = tz; - if (cb->cutoff_cnt) - *cb->cutoff_cnt = cb->reccnt - 1; + set_read_ref_cutoffs(cb, timestamp, tz, message); /* * we have not yet updated cb->[n|o]oid so they still * hold the values for the previous record. @@ -917,11 +922,13 @@ static int read_ref_at_ent(struct object_id *ooid, struct object_id *noid, warning(_("log for ref %s unexpectedly ended on %s"), cb->refname, show_date(cb->date, cb->tz, DATE_MODE(RFC2822))); + cb->reccnt++; oidcpy(&cb->ooid, ooid); oidcpy(&cb->noid, noid); cb->found_it = 1; return 1; } + cb->reccnt++; oidcpy(&cb->ooid, ooid); oidcpy(&cb->noid, noid); if (cb->cnt > 0) @@ -935,14 +942,7 @@ static int read_ref_at_ent_oldest(struct object_id *ooid, struct object_id *noid { struct read_ref_at_cb *cb = cb_data; - if (cb->msg) - *cb->msg = xstrdup(message); - if (cb->cutoff_time) - *cb->cutoff_time = timestamp; - if (cb->cutoff_tz) - *cb->cutoff_tz = tz; - if (cb->cutoff_cnt) - *cb->cutoff_cnt = cb->reccnt; + set_read_ref_cutoffs(cb, timestamp, tz, message); oidcpy(cb->oid, ooid); if (is_null_oid(cb->oid)) oidcpy(cb->oid, noid); From patchwork Wed Jan 6 09:01:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 12001181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E0D3C433E6 for ; Wed, 6 Jan 2021 09:03:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B0B12310E for ; Wed, 6 Jan 2021 09:03:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbhAFJCu (ORCPT ); Wed, 6 Jan 2021 04:02:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbhAFJCt (ORCPT ); Wed, 6 Jan 2021 04:02:49 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F42C061357 for ; Wed, 6 Jan 2021 01:02:09 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id 15so1795002pgx.7 for ; Wed, 06 Jan 2021 01:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jXtlc23yRHGCb7I5sp+LPDYPc9yTT5ukOKQU2VpD4gI=; b=SrdZMpiyeb67xPkUyQDVp/fNYg8PHgjyLC9A/FD1Q/5v/kK18jh4lAxJ6OA37/o30Q iX4H09wWPw6TolSgPJ/ED1cH2BsRRXu+f+VPP9yTRmUWV1z1nvfyIrN9RzT4qGa/goWm UmxWrSbsdYgzhEAebUO2tbrITiFJUK1KxvEVHwMieAKNTD3h7+SqCEThsiU9ZMq+LiyF VDtJ33r4eQXjkAMRx2eFnGgQ0y99VloG8XXVTwVZnC/1AkqY1S5DBzBF1etjo9pb+99Z 4gOvIxzluhnDahHK98obYPaD7A6F43+i8LUPDfvFCY/DlMpl1k4E2FDCgGWusrtOGlRS v7zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jXtlc23yRHGCb7I5sp+LPDYPc9yTT5ukOKQU2VpD4gI=; b=BRE7BekU0aDqafhJnzGUrOuQ/aX966Qx3mva4ZncGSHeolmiw1f7TCBXGA3K+3zpAT wrzpc2ePb7YmkbWOpPN8595TO0Ss99+S3doCXV/fwyOzZnMBp2nL8lNNmJbs42D+jTkH 9uX9ItOd5WqDmb2u/zPlpRnGRGs7SZpYYCfnS/wreKJEcMLa6kgd0ITnOA1CkzCvEOv7 pdNoSaaw1WFbXvhSGGXmMT9+M9uRNuytUczVgUEWY0wWxHiXU3p+JSkK3UJzK90POBjZ B0tRihw2+EVVO2rn/JQB8GPvkv1bL6jM/yIj9aLLINIIhZRGaum1CpnhBApqK2W6zz3O eBjg== X-Gm-Message-State: AOAM532QrJheqm/87bBo0tVfKIDh9/jetEpK5Jscceo9U1e3rnpkN7vp Vfw/VjrZzqby97+NUXXM4cvX9JcVN3w= X-Google-Smtp-Source: ABdhPJziaqE98srEsoP6JZRsggss8S4QNNGxCU82I9GaoeJCVNUxiuAm0fQu/9zJBKx5uMPnjBryyw== X-Received: by 2002:a63:5d5f:: with SMTP id o31mr3511589pgm.295.1609923728366; Wed, 06 Jan 2021 01:02:08 -0800 (PST) Received: from archbookpro.hsd1.ca.comcast.net ([2601:647:4201:c540::414c]) by smtp.gmail.com with ESMTPSA id m10sm1561919pjn.53.2021.01.06.01.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 01:02:07 -0800 (PST) From: Denton Liu To: Git Mailing List Cc: =?utf-8?q?Martin_=C3=85gren?= , =?utf-8?q?SZEDER?= =?utf-8?q?_G=C3=A1bor?= , Junio C Hamano Subject: [PATCH v2 2/2] refs: allow @{n} to work with n-sized reflog Date: Wed, 6 Jan 2021 01:01:54 -0800 Message-Id: <18a35506b87356c1ae844d2686b2be6bd04567b2.1609923643.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: References: <0c6885f15f5ce0be28142d9c69724362e72481a9.1609551262.git.liu.denton@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This sequence works $ git checkout -b newbranch $ git commit --allow-empty -m one $ git show -s newbranch@{1} and shows the state that was immediately after the newbranch was created. But then if you do $ git reflog expire --expire=now refs/heads/newbranch $ git commit --allow=empty -m two $ git show -s newbranch@{1} you'd be scolded with fatal: log for 'newbranch' only has 1 entries While it is true that it has only 1 entry, we have enough information in that single entry that records the transition between the state in which the tip of the branch was pointing at commit 'one' to the new commit 'two' built on it, so we should be able to answer "what object newbranch was pointing at?". But we refuse to do so. Make @{0} the special case where we use the new side to look up that entry. Otherwise, look up @{n} using the old side of the (n-1)th entry of the reflog. Suggested-by: Junio C Hamano Signed-off-by: Denton Liu --- refs.c | 42 ++++++++++++++++++++++++------------- t/t1503-rev-parse-verify.sh | 4 ++-- t/t1508-at-combinations.sh | 16 ++++++++++++++ 3 files changed, 46 insertions(+), 16 deletions(-) diff --git a/refs.c b/refs.c index bfdd04aefd..9eb26d456d 100644 --- a/refs.c +++ b/refs.c @@ -900,40 +900,49 @@ static int read_ref_at_ent(struct object_id *ooid, struct object_id *noid, const char *message, void *cb_data) { struct read_ref_at_cb *cb = cb_data; + int at_indexed_ent; cb->tz = tz; cb->date = timestamp; - if (timestamp <= cb->at_time || cb->cnt == 0) { + if (cb->cnt > 0) + cb->cnt--; + at_indexed_ent = cb->cnt == 0 && !is_null_oid(ooid); + if (timestamp <= cb->at_time || at_indexed_ent) { set_read_ref_cutoffs(cb, timestamp, tz, message); /* * we have not yet updated cb->[n|o]oid so they still * hold the values for the previous record. */ - if (!is_null_oid(&cb->ooid)) { - oidcpy(cb->oid, noid); - if (!oideq(&cb->ooid, noid)) - warning(_("log for ref %s has gap after %s"), + if (!is_null_oid(&cb->ooid) && !oideq(&cb->ooid, noid)) + warning(_("log for ref %s has gap after %s"), cb->refname, show_date(cb->date, cb->tz, DATE_MODE(RFC2822))); - } - else if (cb->date == cb->at_time) + if (at_indexed_ent) + oidcpy(cb->oid, ooid); + else if (!is_null_oid(&cb->ooid) || cb->date == cb->at_time) oidcpy(cb->oid, noid); else if (!oideq(noid, cb->oid)) warning(_("log for ref %s unexpectedly ended on %s"), cb->refname, show_date(cb->date, cb->tz, DATE_MODE(RFC2822))); - cb->reccnt++; - oidcpy(&cb->ooid, ooid); - oidcpy(&cb->noid, noid); cb->found_it = 1; - return 1; } cb->reccnt++; oidcpy(&cb->ooid, ooid); oidcpy(&cb->noid, noid); - if (cb->cnt > 0) - cb->cnt--; - return 0; + return cb->found_it; +} + +static int read_ref_at_ent_newest(struct object_id *ooid, struct object_id *noid, + const char *email, timestamp_t timestamp, + int tz, const char *message, void *cb_data) +{ + struct read_ref_at_cb *cb = cb_data; + + set_read_ref_cutoffs(cb, timestamp, tz, message); + oidcpy(cb->oid, noid); + /* We just want the first entry */ + return 1; } static int read_ref_at_ent_oldest(struct object_id *ooid, struct object_id *noid, @@ -967,6 +976,11 @@ int read_ref_at(struct ref_store *refs, const char *refname, cb.cutoff_cnt = cutoff_cnt; cb.oid = oid; + if (cb.cnt == 0) { + refs_for_each_reflog_ent_reverse(refs, refname, read_ref_at_ent_newest, &cb); + return 0; + } + refs_for_each_reflog_ent_reverse(refs, refname, read_ref_at_ent, &cb); if (!cb.reccnt) { diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh index dc9fe3cbf1..a7e9b4863d 100755 --- a/t/t1503-rev-parse-verify.sh +++ b/t/t1503-rev-parse-verify.sh @@ -86,8 +86,8 @@ test_expect_success 'fails silently when using -q' ' test_expect_success 'fails silently when using -q with deleted reflogs' ' ref=$(git rev-parse HEAD) && git update-ref --create-reflog -m "message for refs/test" refs/test "$ref" && - git reflog delete --updateref --rewrite refs/test@{0} && - test_must_fail git rev-parse -q --verify refs/test@{0} >error 2>&1 && + git reflog delete --updateref --rewrite refs/test@{1} && + test_must_fail git rev-parse -q --verify refs/test@{1} >error 2>&1 && test_must_be_empty error ' diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh index 4a9964e9dc..15aac6e77a 100755 --- a/t/t1508-at-combinations.sh +++ b/t/t1508-at-combinations.sh @@ -99,4 +99,20 @@ test_expect_success 'create path with @' ' check "@:normal" blob content check "@:fun@ny" blob content +test_expect_success '@{1} works with only one reflog entry' ' + git checkout -B newbranch master && + git reflog expire --expire=now refs/heads/newbranch && + git commit --allow-empty -m "first after expiration" && + git rev-parse newbranch~ >expect && + git rev-parse newbranch@{1} >actual && + test_cmp expect actual +' + +test_expect_success '@{0} works with empty reflog' ' + git checkout -B newbranch master && + git reflog expire --expire=now refs/heads/newbranch && + git rev-parse newbranch >expect && + git rev-parse newbranch@{0} >actual && + test_cmp expect actual +' test_done From patchwork Thu Jan 7 10:43:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 12003535 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE632C433DB for ; Thu, 7 Jan 2021 10:44:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AE692313B for ; Thu, 7 Jan 2021 10:44:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726522AbhAGKn6 (ORCPT ); Thu, 7 Jan 2021 05:43:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbhAGKn6 (ORCPT ); Thu, 7 Jan 2021 05:43:58 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2990C0612F4 for ; Thu, 7 Jan 2021 02:43:17 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id z12so1215744pjn.1 for ; Thu, 07 Jan 2021 02:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uc3Llvu52b8dmLGd+187rDrw+S5tlFRNYqVDyXfp1Zc=; b=FAmFJ797Fl3mLGrUO5tjdMXvkPkdxmB2V3lRAxWIpBO9YmvNu+odxVekjwK2vV9Kvj xGYfjozuCd9bFUCol3WVLBmAUUtmgof+K9eRdDjrjVtw9d5dgmREQ1UFs/T5PastdNKV kU0NhY5FgLSwps1PUSaTsXn6uoEZaoag5gEN/IEbV3deMc/g6Sr6qjZYm6AER27vW/U/ 3w8RCYlXwGngLwVTvRhQRFnhLalxVssvBceWd1aIkOFVnUf9CuEKDaoJhSkEr7JpVaEW jHXHZnhpwzAyNvNkqNLOhhHNQhiF3wL5Tve5Io1WcpHPyKu9QnL0AaL2u1X5vYV6SHo8 AJ+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uc3Llvu52b8dmLGd+187rDrw+S5tlFRNYqVDyXfp1Zc=; b=ml02y5ozxwoZ330PPaMdy8bDu25U8OwgTa3HMZx26FZBzqLbR6Vc5p5SdVvqIFTl1l PORsfuRssXplHU2DP+I19yEx7b7BRT64Sh7CzJ0RJfAyDaYRUfGtaSVKJbP7217jLc+1 +tgwVlsZl1oPmOQjOjUdLy4Bnw95om3kHqWDBzjGcBNmaEANQDhwfFeoq0MjvYJrVM7e 96oFqMfrHjU9wojMVN0x3oMmU6wvlnJpohZR2qR/Lyveeqh3sXVg9hACsu/iKb6qQS9C 4fVhLtgaw0lvauLp3FmNocPnid1Ljv/l0fvRv+lduAdZ/qGJi2O3ZdgNpxOkwegVeQVG Fjgg== X-Gm-Message-State: AOAM530yVLSKtEKrvKEKHj86/9sM1sNr3Kxd8BdaYfi5Y30ybxE3eTt4 hR2aqeGUwWUGHYYPHHSWKWmOgxjAL8A= X-Google-Smtp-Source: ABdhPJwgJX8rQIDy64p8siB6fwRajwabeXAJ1/rhyflm4y0HebvXFMVmsOmiIOq3yQbBtZe6x4oV5w== X-Received: by 2002:a17:90a:a24:: with SMTP id o33mr8627494pjo.191.1610016197151; Thu, 07 Jan 2021 02:43:17 -0800 (PST) Received: from archbookpro.hsd1.ca.comcast.net ([2601:647:4201:c540::414c]) by smtp.gmail.com with ESMTPSA id d4sm1795361pjz.28.2021.01.07.02.43.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 02:43:16 -0800 (PST) From: Denton Liu To: Git Mailing List Subject: [PATCH v3 3/2] fixup! refs: allow @{n} to work with n-sized reflog Date: Thu, 7 Jan 2021 02:43:15 -0800 Message-Id: <8ce0071bbf8373ed00cccc797f83c4d30d72ae6e.1610016122.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Denton Liu --- t/t1508-at-combinations.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh index 528a77287c..e4521b7b97 100755 --- a/t/t1508-at-combinations.sh +++ b/t/t1508-at-combinations.sh @@ -111,4 +111,5 @@ test_expect_success '@{0} works with empty reflog' ' git reflog expire --expire=now refs/heads/newbranch && test_cmp_rev newbranch newbranch@{0} ' + test_done