git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 0/3] A couple of CI fixes regarding the built-in add --patch
Date: Tue, 30 Aug 2022 13:54:21 +0000	[thread overview]
Message-ID: <pull.1340.git.1661867664.gitgitgadget@gmail.com> (raw)

This is an attempt to address the concern Junio raised in
https://lore.kernel.org/git/xmqq7d3gm1bl.fsf@gitster.g/: originally
motivated by a test suite failure when running Git's test suite in Visual
Studio, this pulls out the signed vs unsigned fix whose implications are
potentially much wider than Visual C.

While in that space, I spent the time (which took almost as long as I
expected
[https://lore.kernel.org/git/nrr2312s-q256-61n7-2843-7r0s817rp432@tzk.qr/])
to craft a semantic patch to scrutinize Git's source code for similar issues
(narrator's voice: there were no other instances, what did ya expect?).

To verify the fix, I then worked on a patch to exercise the built-in git add
-p in the test suite even when NO_PERL is set, and while developing this
patch and validating it, I got really puzzled that the add -p test case in
t6132 did not need to be guarded behind a PERL prereq. So this patch series
also includes a fix for that.

The story arc that binds all of these patches together is that they all
revolve around NO_PERL and CI issues that involve git add --patch.

Note: This patch series is based on ds/github-actions-use-newer-ubuntu (but
probably applies cleanly even on maint) because I tried to develop a
semantic patch to fix similar issues in the code base. However, I've since
run into what looks like a bug in Coccinelle
[https://github.com/coccinelle/coccinelle/issues/284]. My latest version of
that semantic patch looks like this, but I stopped when running it on Git's
source code triggered the bug for 66 of Git's .c files:

@@
type T = { unsigned int };
T:n b;
type S != { unsigned int, size_t };
S s;
binary operator o != { &&, || };
@@
-s o b
+s o (S)b

@@
type T = { unsigned int };
T:n b;
type S != { unsigned int, size_t };
S s;
binary operator o != { &&, || };
@@
-b o s
+(S)b o s


Johannes Schindelin (3):
  add -p: avoid ambiguous signed/unsigned comparison
  t3701: test the built-in `add -i` regardless of NO_PERL
  t6132(NO_PERL): do not run the scripted `add -p`

 add-patch.c                 | 2 +-
 t/t3701-add-interactive.sh  | 4 ++--
 t/t6132-pathspec-exclude.sh | 6 +++++-
 3 files changed, 8 insertions(+), 4 deletions(-)


base-commit: ef46584831268a83591412a33783caf866867482
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1340%2Fdscho%2Fbuilt-in-add-i-does-not-need-perl-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1340/dscho/built-in-add-i-does-not-need-perl-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1340
-- 
gitgitgadget

             reply	other threads:[~2022-08-30 13:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 13:54 Johannes Schindelin via GitGitGadget [this message]
2022-08-30 13:54 ` [PATCH 1/3] add -p: avoid ambiguous signed/unsigned comparison Johannes Schindelin via GitGitGadget
2022-08-30 19:09   ` Junio C Hamano
2022-08-30 13:54 ` [PATCH 2/3] t3701: test the built-in `add -i` regardless of NO_PERL Johannes Schindelin via GitGitGadget
2022-08-30 18:54   ` Jeff King
2022-08-30 21:03     ` Johannes Schindelin
2022-08-30 19:09   ` Junio C Hamano
2022-08-30 13:54 ` [PATCH 3/3] t6132(NO_PERL): do not run the scripted `add -p` Johannes Schindelin via GitGitGadget
2022-08-30 14:19 ` validating signed/unsigned comparisons with Coccinelle, was Re: [PATCH 0/3] A couple of CI fixes regarding the built-in add --patch Johannes Schindelin
2022-08-30 15:22   ` Phillip Wood
2022-08-30 21:12     ` Johannes Schindelin
2022-08-30 21:29       ` Junio C Hamano
2022-08-30 21:46         ` Junio C Hamano
2022-08-30 21:32       ` Jeff King
2022-08-30 15:19 ` Phillip Wood

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=pull.1340.git.1661867664.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /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).