From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
git@vger.kernel.org, "Johannes Sixt" <j6t@kdbg.org>,
"Ramsay Jones" <ramsay@ramsayjones.plus.com>,
"Stefano Lattarini" <stefano.lattarini@gmail.com>,
"Ondřej Bílka" <neleai@seznam.cz>,
"Arnold D . Robbins" <arnold@skeeve.com>
Subject: Re: [PATCH 1/7] compat/regex: add a README with a maintenance guide
Date: Fri, 12 May 2017 12:15:37 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1.1705121214470.146734@virtualbox> (raw)
In-Reply-To: <xmqqwp9m99zw.fsf@gitster.mtv.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 3720 bytes --]
Hi,
[replacing Ramsay's email address with a working one]
On Fri, 12 May 2017, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
> > diff --git a/compat/regex/README b/compat/regex/README
> > new file mode 100644
> > index 0000000000..345d322d8c
> > --- /dev/null
> > +++ b/compat/regex/README
> > @@ -0,0 +1,21 @@
> > +This is the Git project's copy of the GNU awk (Gawk) regex
> > +engine. It's used when Git is build with e.g. NO_REGEX=NeedsStartEnd,
> > +or when the C library's regular expression functions are otherwise
> > +deficient.
> > +
> > +This is not a fork, but a source code copy. Upstream is the Gawk
> > +project, and the sources should be periodically updated from their
> > +copy, which can be done with:
> > +
> > + for f in $(find . -name '*.[ch]' -printf "%f\n"); do wget http://git.savannah.gnu.org/cgit/gawk.git/plain/support/$f -O $f; done
> > +
> > +For ease of maintenance, and to intentionally make it inconvenient to
> > +diverge from upstream (since it makes it harder to re-merge) any local
> > +changes should be stored in the patches/ directory, which after doing
> > +the above can be applied as:
> > +
> > + for p in patches/*; do patch -p3 < $p; done
> > +
> > +For any changes that aren't specific to the git.git copy please submit
> > +a patch to the Gawk project and/or to the GNU C library (the Gawk
> > +regex engine is a periodically & forked copy from glibc.git).
>
> I am not a huge fan of placing patch files under version control.
>
> If I were doing the "code drop from the outside world from time to
> time", I'd rather do the following every time we update:
>
> - have a topic branch for importing version N+1, and in its first
> commit, replace compat/regex/ with the pristine copy of the files
> we'll borrow from version N+1.
>
> - ask "git log -p compat/regex/" to grab all changes made to the
> directory, and stop at the commit that imported the pristine copy
> of the files we borrowed from version N. These are the changes
> we made to the pristine copy of version N to adjust it to our
> needs.
>
> - cherry-pick these patches on the topic branch; some of them
> hopefully have been upstreamed, the remainder of the patches are
> presumably to adjust the code to our local needs.
>
> - make more changes, while still on the topic branch, to adjust the
> code to our local and current needs.
>
> - once the result becomes buildable and tests OK, merge it back to
> the mainline.
>
> This may break bisectability, but I think it is OK (you should be
> able to skip and test only first-parent chain, treating as if these
> are squashed together into a single change). The patch files your
> approach is keeping will become the individual patches on the topic
> branch, and will be explained and justified the same way as any
> other patches in their commit log message.
>
> Having said all that, since I am not expecting to be the primary one
> working in this area, I'll let you (who I take to be volunteering to
> be the one) pick the approach that you would find the easiest and
> least error prone to handle this task.
FWIW I agree that Junio's proposed strategy would make more sense, with
one addition of my own:
- rather than scraping the files from the CGit website (which does not
guarantee that the first scraped file will be from the same revision as
the last scraped file), I would very strongly prefer the files to be
copied from a clone of gawk.git, and the gawk.git revision from which
they were copied should be recorded in git.git's commit adding them.
Thanks,
Dscho
next prev parent reply other threads:[~2017-05-12 10:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 22:00 [PATCH 0/7] Update the compat/regex engine from upstream Ævar Arnfjörð Bjarmason
2017-05-04 22:00 ` [PATCH 1/7] compat/regex: add a README with a maintenance guide Ævar Arnfjörð Bjarmason
2017-05-12 0:47 ` Junio C Hamano
2017-05-12 10:15 ` Johannes Schindelin [this message]
2017-05-12 20:59 ` Junio C Hamano
2017-05-14 19:14 ` arnold
2017-05-15 1:20 ` Junio C Hamano
2017-05-15 12:14 ` Johannes Schindelin
2017-05-15 12:51 ` arnold
2017-05-04 22:00 ` [PATCH 2/7] compat/regex: update the gawk regex engine from upstream Ævar Arnfjörð Bjarmason
2017-05-04 22:00 ` [PATCH 3/7] fixup! " Ævar Arnfjörð Bjarmason
2017-05-05 5:54 ` Johannes Sixt
2017-05-05 6:12 ` [PATCH v2 8/7] " Ævar Arnfjörð Bjarmason
2017-05-04 22:00 ` [PATCH 4/7] " Ævar Arnfjörð Bjarmason
2017-05-04 22:00 ` [PATCH 5/7] " Ævar Arnfjörð Bjarmason
2017-05-04 22:00 ` [PATCH 6/7] " Ævar Arnfjörð Bjarmason
2017-05-04 22:00 ` [PATCH 7/7] " Ævar Arnfjörð Bjarmason
2017-05-08 0:55 ` [PATCH 0/7] Update the compat/regex " Junio C Hamano
2017-05-08 6:38 ` Ævar Arnfjörð Bjarmason
2017-05-08 7:03 ` Junio C Hamano
2017-05-12 0:31 ` Junio C Hamano
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=alpine.DEB.2.21.1.1705121214470.146734@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=arnold@skeeve.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=neleai@seznam.cz \
--cc=ramsay@ramsayjones.plus.com \
--cc=stefano.lattarini@gmail.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).