From: Junio C Hamano <gitster@pobox•com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail•com>
Cc: git@vger•kernel.org, "Johannes Sixt" <j6t@kdbg•org>,
"Ramsay Jones" <ramsay@ramsay1•demon.co.uk>,
"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 09:47:31 +0900 [thread overview]
Message-ID: <xmqqwp9m99zw.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170504220043.25702-2-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Thu, 4 May 2017 22:00:37 +0000")
Æ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.
Thanks.
next prev parent reply other threads:[~2017-05-12 0:47 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 [this message]
2017-05-12 10:15 ` Johannes Schindelin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwp9m99zw.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=arnold@skeeve$(echo .)com \
--cc=avarab@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=j6t@kdbg$(echo .)org \
--cc=neleai@seznam$(echo .)cz \
--cc=ramsay@ramsay1$(echo .)demon.co.uk \
--cc=stefano.lattarini@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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