fetch: add --update-shallow to accept refs that update .git/shallow
The same steps are done as in when --update-shallow is not given. The only difference is we now add all shallow commits in "ours" and "theirs" to .git/shallow (aka "step 8"). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
79d3a236c5
commit
48d25cae22
@ -21,6 +21,12 @@
|
||||
If the source repository is shallow, fetch as much as possible so that
|
||||
the current repository has the same history as the source repository.
|
||||
|
||||
--update-shallow::
|
||||
By default when fetching from a shallow repository,
|
||||
`git fetch` refuses refs that require updating
|
||||
.git/shallow. This option updates .git/shallow and accept such
|
||||
refs.
|
||||
|
||||
ifndef::git-pull[]
|
||||
--dry-run::
|
||||
Show what would be done, without making any changes.
|
||||
|
Reference in New Issue
Block a user