Skip to content
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 new changes from feature branch #7

Merged
merged 11 commits into from
Jan 26, 2023
Merged

Add new changes from feature branch #7

merged 11 commits into from
Jan 26, 2023

Conversation

julien040
Copy link
Owner

No description provided.

Because of a missing return, undo would still reset files even if the user said no
Whereami print the HEAD hash and the current branch to replace git rev-parse
- Add select in gut fix
- Add first fix in gut fix (amend commit message)
- To be able to prompt for a new commit message, I've extract the prompt of Save cmd in a new function called promptCommitMessage
- Change default page size to 6 in prompt.Select to avoid navigation when choosing a fix
Before, when gut commited changes, it would print stats similar to git
However, Git shows the number of lines added/removed while gut the number of files added/removed.
It could be ambiguous for git users so I changed the print message to files added / files deleted
Gut fix can now change content of a commit if it hasn't been pushed yet
`gut explain` explains what a command does and how
It's to help to transition back to git
Remove some placeholder for most commands and add a real equivalent
Add a sort because arg list in prompt doesn't follow map declaration order
- Message func has a new color called optional. It prints in gray
- Message has now an interface similar to printF with placeholder
- Goto shows the state of the repository at a given commit and detach head
- New function checkIfDetachedHead should be put at the beginning of important functions. It ensure no changes are made while the repo is in detached mode
To avoid data loss, gut check if the head is detached on commands that modify the working tree
@julien040 julien040 merged commit 3b7939c into main Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant