Skip to content

Commit

Permalink
Merge branch 'jn/maint-bundle'
Browse files Browse the repository at this point in the history
* jn/maint-bundle:
  fix "bundle --stdin" segfault
  t5704 (bundle): add tests for bundle --stdin
  • Loading branch information
gitster committed May 21, 2010
2 parents 4d54494 + 97a20ee commit dfe0171
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
16 changes: 16 additions & 0 deletions t/t5704-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dfe0171

Please sign in to comment.