@@ -321,4 +321,5 @@ endif::git-pull[]
--bundle-uri=<uri>::
Instead of fetching from a remote, fetch a bundle from the given
`<uri>` and unbundle the data into the local repository. The refs
- in the bundle will be stored under the `refs/bundle/*` namespace.
+ in the bundle will be stored under the hidden `refs/bundle/*`
+ namespace.
@@ -1,6 +1,7 @@
#include "cache.h"
#include "bundle-uri.h"
#include "bundle.h"
+#include "config.h"
#include "object-store.h"
#include "refs.h"
#include "run-command.h"
@@ -152,6 +153,12 @@ int fetch_bundle_uri(struct repository *r, const char *uri)
if ((result = unbundle_from_file(r, filename.buf)))
goto cleanup;
+ git_config_set_multivar_gently("log.excludedecoration",
+ "refs/bundle/",
+ "refs/bundle/",
+ CONFIG_FLAGS_FIXED_VALUE |
+ CONFIG_FLAGS_MULTI_REPLACE);
+
cleanup:
unlink(filename.buf);
strbuf_release(&filename);
@@ -28,7 +28,9 @@ test_expect_success 'fetch file bundle' '
git -C fetch-to fetch --bundle-uri="$(pwd)/fetch-from/B.bundle" &&
git -C fetch-to rev-parse refs/bundles/topic >actual &&
git -C fetch-from rev-parse topic >expect &&
- test_cmp expect actual
+ test_cmp expect actual &&
+
+ test_config log.excludedecoration refs/bundle/
'
test_expect_success 'fetch file:// bundle' '
@@ -36,7 +38,9 @@ test_expect_success 'fetch file:// bundle' '
git -C fetch-file fetch --bundle-uri="file://$(pwd)/fetch-from/B.bundle" &&
git -C fetch-file rev-parse refs/bundles/topic >actual &&
git -C fetch-from rev-parse topic >expect &&
- test_cmp expect actual
+ test_cmp expect actual &&
+
+ test_config log.excludedecoration refs/bundle/
'
#########################################################################
@@ -62,7 +66,9 @@ test_expect_success 'fetch HTTP bundle' '
git -C fetch-http fetch --bundle-uri="$HTTPD_URL/B.bundle" &&
git -C fetch-http rev-parse refs/bundles/topic >actual &&
git -C fetch-from rev-parse topic >expect &&
- test_cmp expect actual
+ test_cmp expect actual &&
+
+ test_config log.excludedecoration refs/bundle/
'
# Do not add tests here unless they use the HTTP server, as they will