From: "Guido Martínez" <mtzguido@gmail.com>
To: git@vger.kernel.org
Cc: "Guido Martínez" <mtzguido@gmail.com>
Subject: [RFC/PATCH] Ordering of remotes for fetch --all
Date: Mon, 25 Apr 2016 23:15:05 +0200 [thread overview]
Message-ID: <20160425211506.8421-1-mtzguido@gmail.com> (raw)
Hi all,
I run a server with several git mirrors, that are updated every hour. On
that same server, users clone those projects and work on them. We use
the local mirrors to reduce network load: the users can fetch from the
mirror first (to get most of the objects with zero network cost) and
then fetch the real remote (to make sure they're completely up to date).
I would like this to be configurable in each git working directory,
so users can just configure the order they want and then just do "git
remote update".
I'm aware one can get this behavior by editing .git/config and
ordering the remotes as one wishes, but I find that very hacky and not
scripting-friendly.
This patch introduces a fetch priority for each remote, at a default of
50 and modifiable via git config. This new order will only matter when
doing fetch --all.
Do you think this is a useful feature? Hopefully you don't consider this
as just noise :)
(As a side note: for ordering the remotes a stable sort would be best,
to have the least impact possible on current behavior. I believe
git_qsort is stable but a confirmation would be nice.)
Thanks!
Guido
Guido Martínez (1):
remote: add a fetching priority to each remote
Documentation/config.txt | 5 +++++
builtin/fetch.c | 2 +-
remote.c | 43 +++++++++++++++++++++++++++++++++++++++----
remote.h | 2 ++
4 files changed, 47 insertions(+), 5 deletions(-)
--
2.8.1.281.g0994585
next reply other threads:[~2016-04-25 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 21:15 Guido Martínez [this message]
2016-04-25 21:15 ` [RFC/PATCH] remote: add a fetching priority to each remote Guido Martínez
2016-04-25 21:37 ` [RFC/PATCH] Ordering of remotes for fetch --all Jeff King
2016-04-28 15:24 ` Guido Martínez
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=20160425211506.8421-1-mtzguido@gmail.com \
--to=mtzguido@gmail.com \
--cc=git@vger.kernel.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).