# Git config depth option?

2 messages from 2016-02-10 to 2016-02-12. Participants: Gary Mort, Duy Nguyen.
Thread: https://gitlist.dev/t/41385

## Gary Mort, 2016-02-10 17:57

Subject: Git config depth option?
Message-ID: <CAG7bRqy=eMhr7G_7ODUcXGCHQ97uZYicTiav8-vL8hVKkSV_gg@mail.gmail.com>
URL: https://gitlist.dev/e/CAG7bRqy%3DeMhr7G_7ODUcXGCHQ97uZYicTiav8-vL8hVKkSV_gg%40mail.gmail.com

```
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, 2016-02-12 00:16

Subject: Re: Git config depth option?
Message-ID: <CACsJy8DV5HCMtphbyft6Jc6sk3+rutvQY9sqs3jQjf3aD4tUZw@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8DV5HCMtphbyft6Jc6sk3%2BrutvQY9sqs3jQjf3aD4tUZw%40mail.gmail.com
In-Reply-To: <CAG7bRqy=eMhr7G_7ODUcXGCHQ97uZYicTiav8-vL8hVKkSV_gg@mail.gmail.com>

```
On Thu, Feb 11, 2016 at 12:57 AM, Gary Mort <gary@sherodesigns.com> wrote:
> 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

```
