Skip to content

Commit 6e89f1e

Browse files
BaoCaiHJKrag
authored andcommitted
Change on review suggestion
1 parent f1cdc1b commit 6e89f1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

diff-advance/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@ Run `source setup.sh` or `bash setup.sh` or `./setup.sh` (or `.\setup.ps1` in Po
1313
3. Compare `git diff master pipeline-improvement` and `git diff pipeline-improvement master`. Notice what is being removed and added.
1414
4. Include `--word-diff` with `git diff`. In addition to the default, word diff can also be used in different modes, i.e. `--word-diff=color`. See how it is different from normal diff.
1515
5. Include `--name-only` option with `git diff` and see the result.
16-
6. With `--name-only`, we get a list of changed files. This can be useful for example when we want to do selective compile/test of changed files instead of a full re-build, given that steps can be compiled/tested independently. In our exercise, there are 3 steps in a pipeline and a utilities file. Let's say we only want to test the pipelines because we're confident enough with the utils to not test them (naughty-list programmer). We can do something like this:
16+
6. With `--name-only`, we get a list of changed files. This can be useful for example when we want to do selective compile/test of changed files instead of a full re-build, given that steps can be compiled/tested independently. In our exercise, there are 3 steps in a pipeline and an utilities file. Let's say we only want to test the pipelines because we're confident enough with the utils to not test them (naughty-list programmer). We can do something like this:
1717

18-
`git diff --name-only | grep .pipeline | xargs cat`
18+
`git diff --name-only | grep '.pipeline' | xargs cat`
1919

2020
This will:
2121
1. Get a list of the changed files
2222
2. Filter for only `.pipeline` files
23-
3. `cat`/test only these files
23+
3. `cat`/test these files
2424

2525
## Relevant commands and options
26+
2627
- `git diff`
2728
- `--word-diff`
2829
- `--name-only`
2930
- `grep`
30-
- `xargs`
31+
- `xargs`

0 commit comments

Comments
 (0)