Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-17 03:23:22 +0400
committerJunio C Hamano <gitster@pobox.com>2010-06-17 03:23:22 +0400
commite1c07fa8b169639ee105890082211ba70241b66c (patch)
tree1bbfeb9554a8009d0483b98a37947b3ae95474ef
parentdb1cf2eb987d428d75724be883aaea7e34b616e3 (diff)
parent97a20eea199f490760cc25b1b7df28361f54e536 (diff)
Merge branch 'jn/maint-bundle' into maint
* jn/maint-bundle: fix "bundle --stdin" segfault t5704 (bundle): add tests for bundle --stdin
-rw-r--r--object.c4
-rwxr-xr-xt/t5704-bundle.sh16
2 files changed, 18 insertions, 2 deletions
diff --git a/object.c b/object.c
index 3ca92c4c4d..277b3ddba7 100644
--- a/object.c
+++ b/object.c
@@ -252,10 +252,10 @@ void add_object_array_with_mode(struct object *obj, const char *name, struct obj
void object_array_remove_duplicates(struct object_array *array)
{
- int ref, src, dst;
+ unsigned int ref, src, dst;
struct object_array_entry *objects = array->objects;
- for (ref = 0; ref < array->nr - 1; ref++) {
+ for (ref = 0; ref + 1 < array->nr; ref++) {
for (src = ref + 1, dst = src;
src < array->nr;
src++) {
diff --git a/t/t5704-bundle.sh b/t/t5704-bundle.sh
index a8f4419e61..ddc3dc52f4 100755
--- a/t/t5704-bundle.sh
+++ b/t/t5704-bundle.sh
@@ -30,4 +30,20 @@ test_expect_success 'tags can be excluded by rev-list options' '
'
+test_expect_failure 'bundle --stdin' '
+
+ echo master | git bundle create stdin-bundle.bdl --stdin &&
+ git ls-remote stdin-bundle.bdl >output &&
+ grep master output
+
+'
+
+test_expect_failure 'bundle --stdin <rev-list options>' '
+
+ echo master | git bundle create hybrid-bundle.bdl --stdin tag &&
+ git ls-remote hybrid-bundle.bdl >output &&
+ grep master output
+
+'
+
test_done