From: Carlo Arenas <carenas@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, angavrilov@gmail.com, me@yadavpratyush.com
Subject: Re: [RFC PATCH 0/4] git-gui: support SHA-256 repositories
Date: Mon, 11 Oct 2021 12:47:13 -0700 [thread overview]
Message-ID: <CAPUEspjFZDKtP8oJmuA6dCcX9XF1WBFvFikkZTNcKfHbOxJwPA@mail.gmail.com> (raw)
In-Reply-To: <87bl3vlk0j.fsf@evledraar.gmail.com>
On Mon, Oct 11, 2021 at 7:21 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
>
> On Mon, Oct 11 2021, Carlo Marcelo Arenas Belón wrote:
>
> > [1] https://lore.kernel.org/git/20211011114723.204-1-carenas@gmail.com/
> >
> > Carlo Marcelo Arenas Belón (4):
> > blame: prefer null_sha1 over nullid and retire later
> > rename all *_sha1 variables and make null_oid hash aware
> > expand regexp matching an oid to be hash agnostic
> > track oid_size to allow for checks that are hash agnostic
> >
> > git-gui.sh | 30 ++++++++++++++++--------------
> > lib/blame.tcl | 18 +++++++++---------
> > lib/checkout_op.tcl | 4 ++--
> > lib/choose_repository.tcl | 2 +-
> > lib/commit.tcl | 3 ++-
> > lib/remote_branch_delete.tcl | 2 +-
> > 6 files changed, 31 insertions(+), 28 deletions(-)
>
> There was a similar series earlier this year which didn't make it that
> fixes some of the same issues:
> https://lore.kernel.org/git/pull.979.git.1623687519832.gitgitgadget@gmail.com/
This specific series is for git-gui, and the one posted before is for gitk,
but the code is still similar enough, and indeed the gitk part was
included in a reference.
> Just seems like a lot of needless work as opposed to just matching
> x{40,64} or whatever. Yes that's not the same regex semantically, but I
> think the current code is just being overly strict, i.e. it's parsing
> some plumbing output, we can trust that the thing that looks like the
> OID in that position is the OID.
>
> If anything I'd think we could just match [0-9a-f]{4,} in most/all of
> these cases, would make things like this easier to read:
It makes me nervous though to see checks like the one I fixed on
commit[1] that use logic to check the correct size of the SHA as an
implication of it being a valid value.
considering the code is very old, maybe that was relevant long ago?,
but agree some checks seem to be unnecessarily strict.
I have relaxed some of the checks in the gitk patch and will be
posting it soon, so hopefully reviews from people that know the code
better could be collected.
Carlo
[1] https://lore.kernel.org/git/20211011121757.627-5-carenas@gmail.com/
next prev parent reply other threads:[~2021-10-11 19:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 12:17 [RFC PATCH 0/4] git-gui: support SHA-256 repositories Carlo Marcelo Arenas Belón
2021-10-11 12:17 ` [RFC PATCH 1/4] blame: prefer null_sha1 over nullid and retire later Carlo Marcelo Arenas Belón
2021-10-27 19:43 ` Pratyush Yadav
2021-10-11 12:17 ` [RFC PATCH 2/4] rename all *_sha1 variables and make null_oid hash aware Carlo Marcelo Arenas Belón
2021-10-11 20:07 ` Eric Sunshine
2021-11-13 6:54 ` Pratyush Yadav
2021-10-11 12:17 ` [RFC PATCH 3/4] expand regexp matching an oid to be hash agnostic Carlo Marcelo Arenas Belón
2021-11-13 7:55 ` Pratyush Yadav
2021-10-11 12:17 ` [RFC PATCH 4/4] track oid_size to allow for checks that are " Carlo Marcelo Arenas Belón
2021-11-13 8:04 ` Pratyush Yadav
2021-11-13 8:10 ` Pratyush Yadav
2021-10-11 14:15 ` [RFC PATCH 0/4] git-gui: support SHA-256 repositories Ævar Arnfjörð Bjarmason
2021-10-11 19:47 ` Carlo Arenas [this message]
2021-11-13 8:08 ` Pratyush Yadav
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPUEspjFZDKtP8oJmuA6dCcX9XF1WBFvFikkZTNcKfHbOxJwPA@mail.gmail.com \
--to=carenas@gmail.com \
--cc=angavrilov@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=me@yadavpratyush.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).