summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d699676)
raw | patch | inline | side by side (parent: d699676)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 9 Aug 2007 00:01:49 +0000 (17:01 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 11 Aug 2007 05:19:06 +0000 (22:19 -0700) |
While "git bundle" was a useful way to sneakernet incremental
changes, we did not allow:
$ git bundle create v2.6.20.bndl v2.6.20
to create a bundle that contains the whole history to a
well-known good revision. Such a bundle can be mirrored
everywhere, and people can prime their repository with it to
reduce the load on the repository that serves near the tip of
the development.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
changes, we did not allow:
$ git bundle create v2.6.20.bndl v2.6.20
to create a bundle that contains the whole history to a
well-known good revision. Such a bundle can be mirrored
everywhere, and people can prime their repository with it to
reduce the load on the repository that serves near the tip of
the development.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-bundle.c | patch | blob | history | |
t/t5510-fetch.sh | patch | blob | history |
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 6ae5ab04c95ab99538bbcf9ef2f5031e7237df3a..cb439ca4656d53228e34d342f681bdcc645a158d 100644 (file)
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
struct rev_info revs;
struct child_process rls;
+ /*
+ * NEEDSWORK: this should use something like lock-file
+ * to create temporary that is cleaned up upon error.
+ */
bundle_fd = (!strcmp(path, "-") ? 1 :
open(path, O_CREAT | O_EXCL | O_WRONLY, 0666));
if (bundle_fd < 0)
* Make sure the refs we wrote out is correct; --max-count and
* other limiting options could have prevented all the tips
* from getting output.
+ *
+ * Non commit objects such as tags and blobs do not have
+ * this issue as they are not affected by those extra
+ * constraints.
*/
- if (!(e->item->flags & SHOWN)) {
+ if (!(e->item->flags & SHOWN) && e->item->type == OBJ_COMMIT) {
warning("ref '%s' is excluded by the rev-list options",
e->name);
continue;
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 426017e1d08aad5aa3a92f9473e02defc4b10aaf..439430f569ca70b5e3b08ef07996949d7259c9b7 100755 (executable)
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
test 4 = $(git verify-pack -v bundle.pack | wc -l)
'
+test_expect_success 'bundle should be able to create a full history' '
+
+ cd "$D" &&
+ git tag -a -m '1.0' v1.0 master &&
+ git bundle create bundle4 v1.0
+
+'
+
test_done