From: Jeff King <peff@peff.net>
To: Hamza Mahfooz <someguy@effective-light.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] grep: mark "haystack" buffers as const
Date: Mon, 20 Sep 2021 22:05:46 -0400 [thread overview]
Message-ID: <YUk9+p1j3GNwZ1DL@coredump.intra.peff.net> (raw)
In-Reply-To: <YUk4vnMQHApY99Lb@coredump.intra.peff.net>
On Mon, Sep 20, 2021 at 09:43:26PM -0400, Jeff King wrote:
> When we're grepping in a buffer, we don't need to modify it. So we can
> take "const char *" buffers, rather than "char *". This can avoid some
> awkward casts in our callers.
Sorry, this patch should have touched strip_timestamp(), too. I had
originally done it in the earlier patch, but because we pass a
pointer-to-pointer, the compiler got mad about the mis-matched type from
the caller. So I reverted it there, but forgot to add it back in here.
At any rate, these are mostly for illustration. They'd need a little
rebasing if not put on top of your patches anyway.
-Peff
next prev parent reply other threads:[~2021-09-21 2:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 0:30 [PATCH v6 1/2] grep: refactor next_match() and match_one_pattern() for external use Hamza Mahfooz
2021-09-21 0:30 ` [PATCH v6 2/2] pretty: colorize pattern matches in commit messages Hamza Mahfooz
2021-09-21 1:24 ` Jeff King
2021-09-21 1:39 ` Jeff King
2021-09-21 1:41 ` [PATCH 1/2] grep: stop modifying buffer in strip_timestamp Jeff King
2021-09-21 1:43 ` [PATCH 2/2] grep: mark "haystack" buffers as const Jeff King
2021-09-21 2:05 ` Jeff King [this message]
2021-09-21 2:38 ` [PATCH v6 2/2] pretty: colorize pattern matches in commit messages Hamza Mahfooz
2021-09-21 3:15 ` Jeff King
2021-09-21 1:15 ` [PATCH v6 1/2] grep: refactor next_match() and match_one_pattern() for external use Jeff King
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=YUk9+p1j3GNwZ1DL@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=someguy@effective-light.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).