Re: Git-Mediawiki : cloning a set of pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 08, 2011 at 11:19:40AM -0400, Jeff King wrote:

> Maybe it would be even simpler and more flexible to give clone a "-c"
> flag that writes specific config variables in the newly-created
> repository. Like:
> 
>   git clone -c mediawiki.page=page1 \
>             -c mediawiki.page=page2 \
>             http://...
> 
> Then the remote helper can just consult the git config. As a bonus, it
> also lets you do things like:
> 
>   git clone -c core.ignorecase=true git://...
> 
> which is currently awkward (you either have to have set such variable in
> your ~/.gitconfig, or you must use init+config+fetch to do a clone
> manually.

This turned out to be a very tiny amount of code, but I found a ton
of other bugs while working on it. :)

So the patch series is long, but the important bits are at the end. I
factored the code from the existing "git -c", so most of the bugfixes
are there.

  [01/10]: strbuf_split: add a max parameter
  [02/10]: fix "git -c" parsing of values with equals signs

These two are the first bugfix.

  [03/10]: config: die on error in command-line config

Another bugfix.

  [04/10]: config: avoid segfault when parsing command-line config

Another bugfix.

  [05/10]: strbuf: allow strbuf_split to work on non-strbufs
  [06/10]: config: use strbuf_split_str instead of a temporary strbuf

Plugging a memory leak.

  [07/10]: parse-options: add OPT_STRING_LIST helper
  [08/10]: remote: use new OPT_STRING_LIST
  [09/10]: config: make git_config_parse_parameter a public function

These are refactoring for 10/10.

  [10/10]: clone: accept config options on the command line

And this is the actual patch.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]