-
-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
Repository::is_shallow()
to test if a repository is shallow.
- Loading branch information
Showing
8 changed files
with
127 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
gix/tests/fixtures/generated-archives/make_shallow_repo.tar.xz
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
set -eu -o pipefail | ||
|
||
mkdir base | ||
(cd base | ||
git init -q | ||
|
||
git checkout -b main | ||
touch a && git add a | ||
git commit -q -m c1 | ||
echo 1 >> a | ||
git commit -q -am c2 | ||
echo 1 >> a | ||
git commit -q -am c3 | ||
) | ||
|
||
mkdir empty | ||
(cd empty | ||
git init -q | ||
|
||
git checkout -b main | ||
touch a && git add a | ||
git commit -q -m c1 | ||
touch .git/shallow | ||
) | ||
|
||
git clone --depth 1 --bare file://$PWD/base shallow.git | ||
git clone --depth 1 file://$PWD/base shallow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters