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/pack | |
| 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/pack')
| -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 |
2 files changed, 0 insertions, 0 deletions
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 |
