git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Adding glob support to remotes
Date: Wed, 22 Nov 2006 09:04:20 +0000	[thread overview]
Message-ID: <200611220904.21850.andyparkins@gmail.com> (raw)

Hello,

I'm working on adding (basic) glob support to remote fetch definitions.  This 
is to allow you to write things like

[remote "origin"]
  fetch = refs/heads/*:refs/remotes/upstream/*

I started to add code to git-parse-remote.sh:canon_refs_list_for_fetch() to 
preprocess the reflist to catch lines with a "*" in them then use the remote 
pattern to filter the output of from "git-ls-remote -h", blah, blah, you get 
the idea...

However, git-ls-remote needs the name of the remote repository (of course), 
but that isn't directly available in git-parse-remote.sh.  Should I
 a) pass it as a parameter from git-fetch.sh right through each intermediate 
function
 b) create a global?
 c) change git-check-ref-format to allow "*" in the name, then put the 
git-ls-remote call in git-fetch instead.

I don't like to do (b) as it's nasty programming behaviour; however passing a 
parameter is fairly intrusive to the existing code.  Similarly (c) means I'm 
messing in places I suspect I shouldn't be (git-check-ref-format).

git-gods - what do I do?



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE

             reply	other threads:[~2006-11-22  9:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22  9:04 Andy Parkins [this message]
2006-11-22 12:56 ` Adding glob support to remotes Junio C Hamano
2006-11-22 14:41   ` Andy Parkins
2006-11-22 20:50     ` Junio C Hamano
2006-11-23  8:44       ` Andy Parkins

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=200611220904.21850.andyparkins@gmail.com \
    --to=andyparkins@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).