-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add git-wip and git-unwip #669
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
Conversation
Hm, kinda sounds like |
@eMPee584 it is very similar to |
4501c4a
to
71395a3
Compare
Rebased onto |
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.
Thanks for the rebase! Generally looks good to me, had two suggestions
bin/git-unwip
Outdated
|
||
if [ 'WIP' != $LAST_COMMIT ]; then | ||
echo 'Last commit is not a WIP commit, so it will not be unWIP-ed.' | ||
exit |
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.
exit | |
exit 1 |
I think this should be an error if it is unable "to unwip"
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.
That makes sense I will update the commit. 👍
bin/git-unwip
Outdated
# * https://github.com/ddollar/git-utils/blob/master/git-unwip | ||
|
||
# Check if the last commit is a 'WIP' commit | ||
LAST_COMMIT=`git log -1 --pretty=%B | tr --delete '[:space:]'` |
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.
LAST_COMMIT=`git log -1 --pretty=%B | tr --delete '[:space:]'` | |
LAST_COMMIT=`git log -1 --pretty=%B | tr -d '[:space:]'` |
BSD tr doesn't seem to support --delete
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.
Well, that is unfortunate. I have been trying to use the full flag names in scripts, but you are right that BSD does not support it.
I will update to use -d
as you suggested.
71395a3
to
8915f7c
Compare
a792dac
to
0165853
Compare
@hyperupcall thanks for approving the workflow execution. I have tried to fix the various failures in:
|
0165853
to
720beae
Compare
@hyperupcall thanks again for running the workflow. After some investigation is seems that the problem is the version of codespell, which does not include the inline ignore support. I have created a separate commit to upgrade codespell, which updates Hopefully it will work in Github Actions too. 🤞 |
Thanks! Inline ignoring seems to work fine, although CI still unfortunately fails on spellcheck. I haven't properly been able to look into it because of my schedule at the moment - though I will later |
I think probably the newer version of codespell is catching typos or "typos" that weren't caught before. Once those issues are fixed then I'll be able to merge this (to keep CI green on main). I'll be able to get around to doing it maybe in a week or two if its not already done |
720beae
to
afe19c1
Compare
@hyperupcall I fixed one problem, can caused another. 😆 I just updated the Thanks again for your time and attention, it is much appreciated. |
Fantastic! It's green now. Everything LGTM, I just have to pass it off to @spacewander now |
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.
Thanks! Just a few comments.
b8868f3
to
37d477e
Compare
@spacewander I have updated the commit with |
man/git-summary.1
Outdated
@@ -1,6 +1,6 @@ | |||
.\" generated with Ronn-NG/v0.9.1 |
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.
Why touch the git-summary?
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.
This was updated because of a spelling error which was noticed by the latest version of codespell
.
I upgraded codespell
so that I would be able to use the inline disabled comments.
I need this because my last name "Cant" gets flagged as a spelling error.
820457a
to
9e0fbe7
Compare
@spacewander when you are ready to re-run the workflow, I have updated the Please let me know if there is anything which needs to be changed. Thanks again for your time. (P.S.: Would it be helpful to add |
Commands.md
Outdated
|
||
## git unwip | ||
|
||
Undo A Work In Progress(WIP) commit and put all of those changes back into the |
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.
Undo A Work In Progress(WIP) commit and put all of those changes back into the | |
Undo a Work In Progress(WIP) commit and put all of those changes back into the |
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.
I have updated the commit with this change.
Thanks. Let's submit a new PR for it. |
9e0fbe7
to
69b20f8
Compare
69b20f8
to
bbda815
Compare
man/git-wip.html
Outdated
|
||
<h2 id="AUTHOR">AUTHOR</h2> | ||
|
||
<p>Written by Andrew Sullivan Cant <<a href="mailto:[email protected]" data-bare-link="true">[email protected]</a>> <!-- codespell:ignore Cant --></p> |
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.
It seems the generated HTML files don't handle the <!--
correctly. What about adding the word to https://github.com/tj/git-extras/blob/main/.github/.ignore_words?
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.
That sounds like a possibility. Let me see if I can fix the comment first, and if not I will add to the ignore word list.
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.
Hi @spacewander,
Sorry for the long delay. I finally got to have a look at the codespell ignore issue, and moved "Cant" into the .ignore_words
file as you suggested. I re-ran the codespell command locally and re-generated the HTML, so hopefully this is all ready to go.
Thanks for your time and attention.
@acant |
@spacewander sorry, I thought I had fixed that. I will get that resolved later today. |
It is a lastet verison, and is needed so that I can use the inline ignore support in a future commit. After updating tests/pyproject.toml I ran the following commands: ``` cd tests poetry lock --no-update poetry install ``` I also fixed a spelling error in man/git-summary.md, which was not caught by the old version of codespell. After updating the file I also updated the related files by running the following commands: ``` cd man make -C .. man/git-summary.{1,html} ```
Updated/re-built the documentation with: ``` cd man make -C .. man/git-unwip.{1,html} make -C .. man/git-wip.{1,html} make -C .. man/git-extras.{1,html} ```
@spacewander that was easier than I thought. :) The conflict is fixed, and hopefully ready to merge now. |
@acant |
I have been using these commands for a while, to save interim changes when switching between feature branches. This ideas in other places, but it would be nice to included it here too. I have added links to files in https://github.com/ddollar/git-utils which are similar, but the scripts are not exactly the same.
Any feedback is welcome. I went through the contributing guidelines, but if I have missed anything I am happy to updated it.
Thanks in advance.