Closed ghuls closed 5 years ago
Thanks for the detailed report! I'll investigate further.
Thanks @ghuls !
For the record: the LCS computed was correct (the concatenation of all the non-highlighted parts on added and removed are identical). The issue was that the LCS was computed on a stream of token containing the line markers.
Another issue now with the following diff.
The --include
and --include
lines are highlighted completely (worked before).
diff --git a/ngs_runs_backup.sh b/ngs_runs_backup.sh
index 2479c97..9673455 100755
--- a/ngs_runs_backup.sh
+++ b/ngs_runs_backup.sh
@@ -13,25 +13,27 @@ NGS_RUNS_ARCHIVE_DIR='/ngs_runs/'
ngs_runs_backup_dry_run () {
- rsync --dry-run \
- -rlptDv \
- --include '+ */'\
+ rsync \
+ --dry-run \
+ -rlptDv \
+ --include '+ */' \
--include '+ *q.gz' \
--exclude '- *' \
--prune-empty-dirs \
"${NGS_RUNS_STAGING_DIR}" \
- "${NGS_RUNS_ARCHIVE_DIR}"
+ "${NGS_RUNS_ARCHIVE_DIR}";
}
ngs_runs_backup_for_real () {
- rsync --progress \
+ rsync \
+ --progress \
-rlptDv \
- --include '+ */'\
+ --include '+ */' \
--include '+ *q.gz' \
--exclude '- *' \
--prune-empty-dirs \
"${NGS_RUNS_STAGING_DIR}" \
- "${NGS_RUNS_ARCHIVE_DIR}"
+ "${NGS_RUNS_ARCHIVE_DIR}";
}
diffr
seems to highlight unchanged parts. At least when there are a different number of leading spaces and dashes following those spaces.The second dash in
--def
is colored in read, which shouldn't be the case.In this case the following dashes are highligthed:
-01234
: first dash--abc
: second dash--poi
: second dashIn both cases it should only highlight the leading spaces as that is the only part that changed.
With underscores the highlighting works fine: