Skip to content

Commit 4655b98

Browse files
authored
Never expand the inline diff when applying a cached step diff (#549)
See example 19.7 here: https://tldp.org/LDP/abs/html/here-docs.html TIL that it's possible to turn variable expansion off.
1 parent 9096cae commit 4655b98

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ All notable changes to `src-cli` are documented in this file.
1717

1818
### Fixed
1919

20+
- The step-wise caching for `src batch [apply|preview]` introduced in 3.28.1 could break if a cached diff contained quoted. This fixes the application by disabling any unquoting/expansion.
21+
2022
### Removed
2123

2224
## 3.28.1

internal/batches/workspace/volume_workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ exec git diff --cached --no-prefix --binary
269269
func (w *dockerVolumeWorkspace) ApplyDiff(ctx context.Context, diff []byte) error {
270270
script := fmt.Sprintf(`#!/bin/sh
271271
272-
cat << EOF | exec git apply -p0 -
272+
cat <<'EOF' | exec git apply -p0 -
273273
%s
274274
EOF
275275

0 commit comments

Comments
 (0)