threads / discuss / 41385

Git config depth option?

Subject: Git config depth option?

## tl;dr

2 messages between Feb 10, 2016 and Feb 12, 2016.

replies: 1people: 2as markdown or json

Gary Mort· Feb 10, 2016, 17:57 UTC · lore

I checked the documentation and scanned through the source code for clone: https://github.com/git/git/blob/master/builtin/clone.c

And nothing jumps out at me as a way to specify a default depth using a global git configuration file. I see the option defined at https://github.com/git/git/blob/master/builtin/clone.c#L87

Since c is not my primary programming language, it may well be that there is some common parsing function/file which automatically maps command options to config file options. So, is there a way to set a default depth for the clone command?

-- 
Best Regards,

Gary

Gary A. Mort
Backend Developer | Shero Designs, Inc.



Office  845-547-0224 Ext 126 | Fax 845-547-0224
gary@sherodesigns.com | http://sherodesigns.com
Duy Nguyen· Feb 12, 2016, 00:16 UTC · re: Gary Mort · lore

Re: Git config depth option?

On Thu, Feb 11, 2016 at 12:57 AM, Gary Mort <gary@sherodesigns.com> wrote:
Show 11 quoted lines
> I checked the documentation and scanned through the source code for clone:
> https://github.com/git/git/blob/master/builtin/clone.c
>
> And nothing jumps out at me as a way to specify a default depth using
> a global git configuration file.  I see the option defined at
> https://github.com/git/git/blob/master/builtin/clone.c#L87
>
> Since c is not my primary programming language, it may well be that
> there is some common parsing function/file which automatically maps
> command options to config file options.  So, is there a way to set a
> default depth for the clone command?
No. But it it necessary the _clone_ command? I mean, would this alias suffice?
git config --global c1 'clone --depth 1'
-- 
Duy

← back to recent threads