Open turion opened 8 months ago
I'm assuming the error comes from your tool trying to interpret the LFS pointers as CSVs, and fails.
I'm currently experimenting with a shell script like this:
#! /bin/sh
tmpfileO=$(mktemp /tmp/csv-merge.O.XXXXXX)
tmpfileA=$(mktemp /tmp/csv-merge.A.XXXXXX)
tmpfileB=$(mktemp /tmp/csv-merge.B.XXXXXX)
tmpfileM=$(mktemp /tmp/csv-merge.M.XXXXXX)
cat $1 | git-lfs smudge -- $4 > $tmpfileO
cat $2 | git-lfs smudge -- $4 > $tmpfileA
cat $3 | git-lfs smudge -- $4 > $tmpfileB
csvmerge3 --key=timestamp $tmpfileO $tmpfileA $tmpfileB -o $tmpfileM
cat $tmpfileM | git-lfs clean -- $4 > $2
But I don't know whether that's the best approach.
I successfully created a test repo with a CSV file where I could rebase some commits with your tool that would have created a conflict otherwise. Awesome!
I don't know how to use this in another repo where I also have git LFS on CSV files. I tried combining filters and your merge tool:
With the same git config:
But I'm getting:
csvdiff3.merge3.PrimaryKeyError: Cannot find a valid primary key in timestamp