From: Leo Gaspard <leo@gaspard.io>
To: git@vger.kernel.org
Cc: "Joey Hess" <id@joeyh.name>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Johannes Sixt" <j6t@kdbg.org>
Subject: [PATCH 0/2] fetch: add tweak-fetch hook
Date: Fri, 9 Feb 2018 22:28:06 +0100 [thread overview]
Message-ID: <30753d19-d77d-1a1a-ba42-afcd6fbb4223@gaspard.io> (raw)
In-Reply-To: <20180209202044.GA6783@kitenet.net>
On 02/09/2018 09:20 PM, Joey Hess wrote:> Yes; my patches are under the
same GPL-2 as the rest of git.
Thanks! So here comes my patch series, heavily based on yours.
There are some things to bear in mind while reviewing it:
* This is my first real attempt at contributing to git, which means I
could be very very far off-track
* Most of it is based on trying to make the 6-year-old patch series
work and pass all the tests, so if a new feature has been added since
then I likely didn't notice it or don't know how to handle it correctly
There are still three TODO's in the code:
* In the documentation, one stating that I don't really get what this
“ignore” parameter exactly does, and whether it should be handled
specially (a prime example of a new feature I'm not really sure how to
handle, somewhere in the code it's written all the “ignore” references
are at the end of the list, but I'm already not self-confident enough
about the difference between “merge” and “not-for-merge” to even
consider making a good choice about how to handle “ignore”)
* In `builtins/fetch.c`, function `do_fetch`, there is a conflict of
interest between placing the `prune` before the `fetch` (as done by
commit 10a6cc889 ("fetch --prune: Run prune before fetching",
2014-01-02)), and placing the `fetch` before the `prune` (which would
allow hooks that rename the local-ref to not be prune'd and then
re-fetched when doing a `git fetch --prune` -- without that a hook that
would want to both read the old commit information and rename the
local-ref would not be able to). Or maybe this question means actually
there should be a third solution? but I don't really know what. Maybe
also hooking into the prune operation?
* In `templates/hooks--tweak-fetch.sample`, the “check this actually
works” todo, as I'd rather first check this patch series is not too far
off-topic before doing non-essential work -- anyway another version of
the patch series will be required for the other two TODO's, so I can fix
it at this point.
That being said, what do you think about these patches?
Thanks for your time!
Leo Gaspard
next prev parent reply other threads:[~2018-02-09 21:28 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 21:56 Fetch-hooks Leo Gaspard
2018-02-07 22:51 ` Fetch-hooks Ævar Arnfjörð Bjarmason
2018-02-08 0:06 ` Fetch-hooks Leo Gaspard
2018-02-08 15:30 ` Fetch-hooks Joey Hess
2018-02-08 17:02 ` Fetch-hooks Leo Gaspard
2018-02-08 21:06 ` Fetch-hooks Ævar Arnfjörð Bjarmason
2018-02-08 22:18 ` Fetch-hooks Leo Gaspard
2018-02-09 22:04 ` Fetch-hooks Ævar Arnfjörð Bjarmason
2018-02-09 22:24 ` Fetch-hooks Leo Gaspard
2018-02-09 22:56 ` Fetch-hooks Ævar Arnfjörð Bjarmason
2018-02-09 22:30 ` Fetch-hooks Jeff King
2018-02-09 22:45 ` Fetch-hooks Junio C Hamano
2018-02-09 23:49 ` Fetch-hooks Leo Gaspard
2018-02-10 0:13 ` Fetch-hooks Jeff King
2018-02-10 0:37 ` Fetch-hooks Leo Gaspard
2018-02-10 1:08 ` Fetch-hooks Junio C Hamano
2018-02-10 1:33 ` Fetch-hooks Leo Gaspard
2018-02-10 18:03 ` Fetch-hooks Leo Gaspard
2018-02-10 12:21 ` Fetch-hooks Jeff King
2018-02-10 18:36 ` Fetch-hooks Leo Gaspard
2018-02-12 19:23 ` Fetch-hooks Brandon Williams
2018-02-13 15:44 ` Fetch-hooks Leo Gaspard
2018-02-14 1:38 ` Fetch-hooks Jeff King
2018-02-14 1:35 ` Fetch-hooks Jeff King
2018-02-14 2:02 ` Fetch-hooks Leo Gaspard
2018-02-19 21:23 ` Fetch-hooks Jeff King
2018-02-19 22:50 ` Fetch-hooks Leo Gaspard
2018-02-20 6:10 ` Fetch-hooks Jacob Keller
2018-02-20 7:42 ` Fetch-hooks Jeff King
2018-02-20 21:19 ` Fetch-hooks Leo Gaspard
2018-02-14 1:46 ` Fetch-hooks Jacob Keller
2018-02-09 19:12 ` Fetch-hooks Leo Gaspard
2018-02-09 20:20 ` Fetch-hooks Joey Hess
2018-02-09 21:28 ` Leo Gaspard [this message]
2018-02-09 21:44 ` [PATCH 1/2] fetch: preparations for tweak-fetch hook Leo Gaspard
2018-02-09 21:44 ` [PATCH 2/2] fetch: add " Leo Gaspard
2018-02-09 22:40 ` Junio C Hamano
2018-02-09 22:34 ` [PATCH 1/2] fetch: preparations for " 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=30753d19-d77d-1a1a-ba42-afcd6fbb4223@gaspard.io \
--to=leo@gaspard.io \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=id@joeyh.name \
--cc=j6t@kdbg.org \
/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).