diff options
| author | Patrick Steinhardt <ps@pks.im> | 2017-07-10 12:25:43 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2017-08-25 18:15:12 +0200 |
| commit | 477b3e047426d7ccddb6028416ff0fcc2541a0fd (patch) | |
| tree | 2385384349066ce5dd5b3fcc41164d9af8825983 /tests/resources/submodules.git/objects | |
| parent | a889c05f2abfec5e45fa50faf7307c06c7c9b25b (diff) | |
| download | libgit2-477b3e047426d7ccddb6028416ff0fcc2541a0fd.tar.gz | |
submodule: refuse lookup in bare repositories
While it is technically possible to look up submodules inside of a
bare repository by reading the submodule configuration of a specific
commit, we do not offer this functionality right now. As such, calling
both `git_submodule_lookup` and `git_submodule_foreach` should error out
early when these functions encounter a bare repository. While
`git_submodule_lookup` already does return an error due to not being
able to parse the configuration, `git_submodule_foreach` simply returns
success and never invokes the callback function.
Fix the issue by having both functions check whether the repository is
bare and returning an error in that case.
Diffstat (limited to 'tests/resources/submodules.git/objects')
| -rw-r--r-- | tests/resources/submodules.git/objects/26/a3b32a9b7d97486c5557f5902e8ac94638145e | 2 | ||||
| -rw-r--r-- | tests/resources/submodules.git/objects/78/308c9251cf4eee8b25a76c7d2790c73d797357 | bin | 0 -> 97 bytes | |||
| -rw-r--r-- | tests/resources/submodules.git/objects/97/896810b3210244a62a82458b8e0819ecfc6850 | 3 | ||||
| -rw-r--r-- | tests/resources/submodules.git/objects/b6/0fd986699ba4e9e68bea07cf8e793f323ef888 | bin | 0 -> 138 bytes | |||
| -rw-r--r-- | tests/resources/submodules.git/objects/d5/f7fc3f74f7dec08280f370a975b112e8f60818 | bin | 0 -> 21 bytes | |||
| -rw-r--r-- | tests/resources/submodules.git/objects/e3/50052cc767cd1fcb37e84e9a89e701925be4ae | bin | 0 -> 120 bytes | |||
| -rw-r--r-- | tests/resources/submodules.git/objects/info/packs | 2 | ||||
| -rw-r--r-- | tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.idx | bin | 0 -> 1156 bytes | |||
| -rw-r--r-- | tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.pack | bin | 0 -> 228 bytes |
9 files changed, 7 insertions, 0 deletions
diff --git a/tests/resources/submodules.git/objects/26/a3b32a9b7d97486c5557f5902e8ac94638145e b/tests/resources/submodules.git/objects/26/a3b32a9b7d97486c5557f5902e8ac94638145e new file mode 100644 index 000000000..2c3c2cb61 --- /dev/null +++ b/tests/resources/submodules.git/objects/26/a3b32a9b7d97486c5557f5902e8ac94638145e @@ -0,0 +1,2 @@ +x%= +0F])0"I*|-t{?2ilV8$mvkk*FDA=(=|=6 DAv=A}&'O$=
\ No newline at end of file diff --git a/tests/resources/submodules.git/objects/78/308c9251cf4eee8b25a76c7d2790c73d797357 b/tests/resources/submodules.git/objects/78/308c9251cf4eee8b25a76c7d2790c73d797357 Binary files differnew file mode 100644 index 000000000..c85fb5512 --- /dev/null +++ b/tests/resources/submodules.git/objects/78/308c9251cf4eee8b25a76c7d2790c73d797357 diff --git a/tests/resources/submodules.git/objects/97/896810b3210244a62a82458b8e0819ecfc6850 b/tests/resources/submodules.git/objects/97/896810b3210244a62a82458b8e0819ecfc6850 new file mode 100644 index 000000000..1c8dbdf9f --- /dev/null +++ b/tests/resources/submodules.git/objects/97/896810b3210244a62a82458b8e0819ecfc6850 @@ -0,0 +1,3 @@ +x[ +0E*fʤS K4ݿwׅ9p2MCFP@u..p!OYdiYU'̕8XbPn6 +ħԞ1[q}0qc[W#1fR:SZ+Y+{tdlvOmu_}5i` K
\ No newline at end of file diff --git a/tests/resources/submodules.git/objects/b6/0fd986699ba4e9e68bea07cf8e793f323ef888 b/tests/resources/submodules.git/objects/b6/0fd986699ba4e9e68bea07cf8e793f323ef888 Binary files differnew file mode 100644 index 000000000..3d78bd6be --- /dev/null +++ b/tests/resources/submodules.git/objects/b6/0fd986699ba4e9e68bea07cf8e793f323ef888 diff --git a/tests/resources/submodules.git/objects/d5/f7fc3f74f7dec08280f370a975b112e8f60818 b/tests/resources/submodules.git/objects/d5/f7fc3f74f7dec08280f370a975b112e8f60818 Binary files differnew file mode 100644 index 000000000..6e0b49e86 --- /dev/null +++ b/tests/resources/submodules.git/objects/d5/f7fc3f74f7dec08280f370a975b112e8f60818 diff --git a/tests/resources/submodules.git/objects/e3/50052cc767cd1fcb37e84e9a89e701925be4ae b/tests/resources/submodules.git/objects/e3/50052cc767cd1fcb37e84e9a89e701925be4ae Binary files differnew file mode 100644 index 000000000..082a58941 --- /dev/null +++ b/tests/resources/submodules.git/objects/e3/50052cc767cd1fcb37e84e9a89e701925be4ae diff --git a/tests/resources/submodules.git/objects/info/packs b/tests/resources/submodules.git/objects/info/packs new file mode 100644 index 000000000..0785ef698 --- /dev/null +++ b/tests/resources/submodules.git/objects/info/packs @@ -0,0 +1,2 @@ +P pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.pack + diff --git a/tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.idx b/tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.idx Binary files differnew file mode 100644 index 000000000..810fc3181 --- /dev/null +++ b/tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.idx diff --git a/tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.pack b/tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.pack Binary files differnew file mode 100644 index 000000000..c25c4a73f --- /dev/null +++ b/tests/resources/submodules.git/objects/pack/pack-b69d04bb39ac274669e2184e45bd90015d02ef5b.pack |
