Re: [PATCH v2 05/16] fetch-pack: support fetching from a shallow repository
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jul 23, 2013, 02:06 UTC
- Message-ID
- <CACsJy8C3Cb+W-GSnz2VzmRBvs980yKZNskGKqjG2+89JfHYEvQ@mail.gmail.com>
- In-Reply-To
- <DADC072FCD7749C8B51D9DE594D67AB7@PhilipOakley>
On Tue, Jul 23, 2013 at 2:10 AM, Philip Oakley <philipoakley@iee.org> wrote:
Show 8 quoted lines
>> And a full repository may automatically become shallow if >> you fetch from a shallow repository. > > > This "sounds" risky: Perhaps add a note about '[PATCH v2 15/16] config: add > core.noshallow to prevent turning a repo into a shallow one' which will > become available later in the series. The later core.noshallow may be a > hostage to fortune.
core.noshallow is one way. Another is reject new shallow history (i.e. no additions to .git/shallow) unless the user explicitly asks so either via --depth or a new option --shallow. This does not mean that fetching from a shallow clone always fails without either of those options. The shallow clone may provide updates to an existing ref and _not_ introduce new shallow grafts and that would be successful. core.noshallow (or an opposite alternative) is probably the only way for push. -- Duy