Skip to content

Commit

Permalink
merge driver for encrypted data
Browse files Browse the repository at this point in the history
  • Loading branch information
kinnalru committed Oct 4, 2013
1 parent ebc683c commit cb2af23
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions gitcrypt-merge
@@ -0,0 +1,27 @@
#!/bin/bash

CURRENT="$1"
BASE="$2"
OTHER="$3"
SIZE="$4"

cat "$CURRENT" | gitcrypt smudge > "$CURRENT".tmp || exit 1
cat "$CURRENT".tmp > "$CURRENT"
rm "$CURRENT".tmp

cat "$BASE" | gitcrypt smudge > "$BASE".tmp || exit 1
cat "$BASE".tmp > "$BASE"
rm "$BASE".tmp

cat "$OTHER" | gitcrypt smudge > "$OTHER".tmp || exit 1
cat "$OTHER".tmp > "$OTHER"
rm "$OTHER".tmp

git merge-file --marker-size "$SIZE" "$CURRENT" "$BASE" "$OTHER"
cp "$CURRENT" confl
exit 1


cat "$CURRENT" | gitcrypt clean > "$CURRENT".tmp || exit 1
cat "$CURRENT".tmp > "$CURRENT"
rm "$CURRENT".tmp

0 comments on commit cb2af23

Please sign in to comment.