-
Notifications
You must be signed in to change notification settings - Fork 899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add diff-advance exercise #365
Conversation
@coderabbitai review |
Caution Review failedThe pull request is closed. WalkthroughThe changes introduce a new README file titled "Git Kata: Git Diff Advance," which outlines tasks for exploring functionalities of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Out of diff range and nitpick comments (2)
diff-advance/README.md (2)
13-13
: Consider revising to "Notice what is being removed and added."
16-16
: Consider revising to "Let's say we only want to test the pipelines because we're confident enough with the utils not to test them (naughty-list programmer)."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Out of diff range and nitpick comments (1)
diff-advance/README.md (1)
16-16
: Try to vary your phrasing to enhance readability.
diff-advance/README.md
Outdated
3. Compare `git diff master pipeline-improvement` and `git diff pipeline-improvement master`. Notice what is being removed and added. | ||
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. | ||
5. Include `--name-only` option with `git diff` and see the result. | ||
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using "an" instead of "a" before "utilities file" as it sounds more natural.
- a utilities file
+ an utilities file
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
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: | |
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: |
diff-advance/README.md
Outdated
This will: | ||
1. Get a list of the changed files | ||
2. Filter for only `.pipeline` files | ||
3. `cat`/test only these files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid redundancy by using synonyms or restructuring the sentence.
- `cat`/test only these files
+ `cat`/test these files
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
3. `cat`/test only these files | |
3. `cat`/test these files |
diff-advance/README.md
Outdated
`git diff --name-only | grep .pipeline | xargs cat` | ||
|
||
This will: | ||
1. Get a list of the changed files | ||
2. Filter for only `.pipeline` files | ||
3. `cat`/test only these files | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify the example command to enhance understanding.
- `git diff --name-only | grep .pipeline | xargs cat`
+ `git diff --name-only | grep '.pipeline' | xargs cat`
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
`git diff --name-only | grep .pipeline | xargs cat` | |
This will: | |
1. Get a list of the changed files | |
2. Filter for only `.pipeline` files | |
3. `cat`/test only these files | |
`git diff --name-only | grep '.pipeline' | xargs cat` | |
This will: | |
1. Get a list of the changed files | |
2. Filter for only `.pipeline` files | |
3. `cat`/test only these files |
diff-advance/README.md
Outdated
## Relevant commands and options | ||
- `git diff` | ||
- `--word-diff` | ||
- `--name-only` | ||
- `grep` | ||
- `xargs` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure proper markdown formatting by adding blank lines around the list.
+
- `git diff`
- `--word-diff`
- `--name-only`
- `grep`
- `xargs`
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
## Relevant commands and options | |
- `git diff` | |
- `--word-diff` | |
- `--name-only` | |
- `grep` | |
- `xargs` | |
## Relevant commands and options | |
- `git diff` | |
- `--word-diff` | |
- `--name-only` | |
- `grep` | |
- `xargs` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
You can close this if you want, I'm not doing any more changes base on this AI's review |
@BaoCaiH Thanks a lot for this contribution and sorry for the very long delay in looking at it. |
Exercise for issue #356
Summary by CodeRabbit
git diff
functionalities.git diff
options.