bitfab 0.36.8 → 0.36.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bitfab/replay.rb +13 -6
- data/lib/bitfab/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23d0d3e96160502ecf10da7fe952d08fec34439595e4c61e50ce9ea7c086a11c
|
|
4
|
+
data.tar.gz: 7bb58eab2f4749bd073593ec4c359d8460d1a1012eab60727999ad765a3e6d1e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7360217eac4dfaa7ae66c645415598a9b794e2433434b425de54a1922243a93012270d9146309aca8d3ee65e9084da047cd6c6a5751cade83e1eb7b7d7458ab7
|
|
7
|
+
data.tar.gz: ee2575e01da6352effba7a1943621aa44280aabd5ead4aed76ce85561db6ccd8251c28c369de846fce1879e8ff4a08da9a6211b924d40f0a78430bec98302e76
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -570,28 +570,28 @@ module Bitfab
|
|
|
570
570
|
|
|
571
571
|
base, from_trunk = resolved
|
|
572
572
|
|
|
573
|
-
tracked = git(root, ["diff", "--name-status", "--
|
|
573
|
+
tracked = git(root, ["diff", "--name-status", "--find-renames", "-z", base, "--", ":!.bitfab"]) || ""
|
|
574
574
|
untracked = git(root, ["ls-files", "--others", "--exclude-standard", "-z", "--", ":!.bitfab"]) || ""
|
|
575
575
|
|
|
576
576
|
entries = cc_parse_name_status_z(tracked)
|
|
577
|
-
untracked.split("\0").reject(&:empty?).each { |p| entries << ["A", p] }
|
|
577
|
+
untracked.split("\0").reject(&:empty?).each { |p| entries << ["A", p, p] }
|
|
578
578
|
return nil if entries.empty?
|
|
579
579
|
|
|
580
580
|
files = []
|
|
581
581
|
total = 0
|
|
582
|
-
entries.each do |status, path|
|
|
582
|
+
entries.each do |status, before_path, path|
|
|
583
583
|
break if files.length >= CC_MAX_FILES
|
|
584
584
|
|
|
585
585
|
# Skip oversized files by size BEFORE reading their full contents, so a
|
|
586
586
|
# huge changed file can't OOM/stall replay just to be discarded.
|
|
587
|
-
before_bytes = (status == "A") ? 0 : cc_blob_bytes(root, base,
|
|
587
|
+
before_bytes = (status == "A") ? 0 : cc_blob_bytes(root, base, before_path)
|
|
588
588
|
after_bytes = (status == "D") ? 0 : cc_working_bytes(root, path)
|
|
589
589
|
next if before_bytes > CC_MAX_FILE_BYTES || after_bytes > CC_MAX_FILE_BYTES
|
|
590
590
|
|
|
591
591
|
# Normalize CRLF -> LF on both sides: git's blob is already LF-normalized
|
|
592
592
|
# (autocrlf clean), so a raw CRLF working file would otherwise skew every
|
|
593
593
|
# line as changed. Comparing/storing LF keeps the diff meaningful.
|
|
594
|
-
before = (status == "A") ? "" : (git(root, ["show", "#{base}:#{
|
|
594
|
+
before = (status == "A") ? "" : (git(root, ["show", "#{base}:#{before_path}"]) || "").gsub("\r\n", "\n")
|
|
595
595
|
after = (status == "D") ? "" : cc_read_working_file(root, path).gsub("\r\n", "\n")
|
|
596
596
|
next if before == after
|
|
597
597
|
|
|
@@ -619,8 +619,15 @@ module Bitfab
|
|
|
619
619
|
out = []
|
|
620
620
|
i = 0
|
|
621
621
|
while i + 1 < parts.length
|
|
622
|
-
|
|
622
|
+
status = parts[i][0]
|
|
623
|
+
before_path = parts[i + 1]
|
|
623
624
|
i += 2
|
|
625
|
+
if ["R", "C"].include?(status) && i < parts.length
|
|
626
|
+
out << [status, before_path, parts[i]]
|
|
627
|
+
i += 1
|
|
628
|
+
else
|
|
629
|
+
out << [status, before_path, before_path]
|
|
630
|
+
end
|
|
624
631
|
end
|
|
625
632
|
out
|
|
626
633
|
end
|
data/lib/bitfab/version.rb
CHANGED