samoht/dog

cant push dog git repos to GitHub

avsm opened this issue · 3 comments

avsm commented
git push gh master
Counting objects: 69, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (69/69), 6.53 KiB | 0 bytes/s, done.
Total 69 (delta 17), reused 69 (delta 17)
remote: error: object 5b5d48fef47a935959b0fe59be821b1e1c8408b0:contains duplicate file entries
remote: error: object 5b5d48fef47a935959b0fe59be821b1e1c8408b0:not properly sorted
remote: fatal: Error in object
error: unpack failed: index-pack abnormal exit
To git@github.com:avsm/qcon-irmin-demo.git
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'git@github.com:avsm/qcon-irmin-demo.git'

This happens with 2 clients synchronising to dog.0.2 using this script:

#!/usr/bin/env bash

set -ex

server="http://127.0.0.1:8080"
name=$1

rm -rf $name
mkdir $name
cd $name
dog init $name


for i in `jot 10`; do
  f="log$i"
  for j in `jot 2`; do
    echo `date` >> $f
    dog push -m "$name update" $server
    sleep $2
  done
done

Which version of ocaml-git do you have?

avsm commented

git 1.5.0

I can reproduce this. Seems that there is an issue with the FS.iter_blobs function which iter on duplicates. I'll move the issue upstream.