Remove inconsistent history check
Current histfile will often be larger than merged file (duplicate lines being possible)
This commit is contained in:
parent
823b081b69
commit
d6af926afb
|
@ -163,15 +163,13 @@ function sync-history {
|
||||||
tscp "$local_history" "$remote_file"
|
tscp "$local_history" "$remote_file"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Merging history files..."
|
echo "Merging history files..."
|
||||||
fc -W # Write to history file
|
fc -W # Write to history file
|
||||||
merge-hist "$local_history" "$copy_of_remote" > "$merged"
|
merge-hist "$local_history" "$copy_of_remote" > "$merged"
|
||||||
if ! (($(cat "$merged" | wc -l) > $(cat "$copy_of_remote" | wc -l))); then
|
|
||||||
echo "Merged histfile '$merged' somehow smaller than current histfile"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
mv "$merged" "$local_history"
|
mv "$merged" "$local_history"
|
||||||
fc -R # Read from new history file
|
fc -R # Read from new history file
|
||||||
|
|
||||||
echo "Uploading new shared history..."
|
echo "Uploading new shared history..."
|
||||||
tscp "$local_history" "$remote_file"
|
tscp "$local_history" "$remote_file"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue