lesfurets / git-octopus

The continuous merge workflow
GNU Lesser General Public License v3.0
222 stars 22 forks source link

Incorrect usage of git unpack-file and merge-file #20

Open dubreuia opened 8 years ago

dubreuia commented 8 years ago

I don't know why, but while executing git octopus I get the following error. It doesn't break anything and the execution continues. It seems to happen on a .xls which git sees as a binary file

Trying simple merge with refs/remotes/features/AMX-11904_Assu2000_integration_F115
Simple merge did not work, trying automatic merge.
Auto-merging third-party/product-catalog/formules/src/main/resources/com/lesfurets/pc/auto/Formules_Assu2000.xls
error: Cannot merge binary files: .merge_file_Wth4IY
ERROR: content conflict in third-party/product-catalog/formules/src/main/resources/com/lesfurets/pc/auto/Formules_Assu2000.xls
fatal: merge program failed
Applying conflict resolution 71853c6197a6a7f222db0f1978c7cb232b87c5ee
usage: git unpack-file <sha1>
usage: git unpack-file <sha1>
usage: git unpack-file <sha1>
usage: git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> <orig-file> <file2>

    -p, --stdout          send results to standard output
    --diff3               use a diff3 based merge
    --ours                for conflicts, use our version
    --theirs              for conflicts, use their version
    --union               for conflicts, use a union version
    --marker-size <n>     for conflicts, use this marker size
    -q, --quiet           do not warn about conflicts
    -L <name>             set labels for file1/orig-file/file2

usage: git unpack-file <sha1>
usage: git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> <orig-file> <file2>

    -p, --stdout          send results to standard output
    --diff3               use a diff3 based merge
    --ours                for conflicts, use our version
    --theirs              for conflicts, use their version
    --union               for conflicts, use a union version
    --marker-size <n>     for conflicts, use this marker size
    -q, --quiet           do not warn about conflicts
    -L <name>             set labels for file1/orig-file/file2

Conflict not resolved
diff --cc third-party/product-catalog/formules/src/main/resources/com/lesfurets/pc/auto/Formules_Assu2000.xls
index ff53054,fe68524..0000000
Binary files differ
dubreuia commented 8 years ago

I'll try to post steps to reproduce from a clean repo

apflieger commented 8 years ago

I would say that git-apply-conflict-resolution detects the binary conflict as a "UU" text conflict here https://github.com/lesfurets/git-octopus/blob/master/src/git-apply-conflict-resolution#L40 "UU" means "file modified by both sides". git status --porcelain may tell us if it's a binary conflict