diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2014-01-06 13:06:26 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2014-01-06 14:24:12 +0000 |
commit | 44c52debfb8bc27a78e4159fff30ac6e716c9518 (patch) | |
tree | a84386a33748b990a1e9e9e5413a4053019fbc91 | |
parent | aba23668406b06d682715461f92641805ab88d98 (diff) | |
download | tbdiff-44c52debfb8bc27a78e4159fff30ac6e716c9518.tar.gz |
Add options to diff command to change header content to only include file name, and explicitly ask for a unified diff
-rwxr-xr-x | baserock-system-config-sync/baserock-system-config-sync | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/baserock-system-config-sync/baserock-system-config-sync b/baserock-system-config-sync/baserock-system-config-sync index b17c8d0..cb5984d 100755 --- a/baserock-system-config-sync/baserock-system-config-sync +++ b/baserock-system-config-sync/baserock-system-config-sync @@ -151,12 +151,12 @@ merge_regular_file() { cp -a "$vu" "$vt" ;; 'none exists exists') - if ! (diff "$v2" "$vu" | patch "$v2" -t -o "$vt"); then + if ! (diff -u "$v2" --label="$v2" "$vu" --label="$vu" | patch "$v2" -t -o "$vt"); then cp -a "$v2" "$vt" # merge failed, use v2 fi ;; 'exists exists exists') - if ! (diff "$v1" "$vu" | patch "$v2" -t -o "$vt"); then + if ! (diff -u "$v1" --label="$v1" "$vu" --label="$vu" | patch "$v2" -t -o "$vt"); then cp -a "$v2" "$vt" # merge failed, use v2 fi ;; |