Skip to content

Commit 012a8af

Browse files
committed
Bugfix in undoing changes in ezk.git
1 parent fcda4f2 commit 012a8af

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

EasyKey.git/ezk-git-atuc.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
source "$script_dir/../shellmenu.sh"
5+
source "$script_dir/ezk-git-functions.sh"
6+
37
function revertLastCommit () {
48
echo "Enter YES if you want to revert to last commit:"
59
read cname
@@ -44,21 +48,20 @@ function resetToCommitHard () {
4448
git reset --hard $cname
4549
}
4650

47-
while ${continuemenu:=true}; do
48-
clear
51+
atucStatus() {
52+
coloredLog " ALWAYS PREFER REVERT " "$clrPurple" "$clrWhite" && printf "\n\r"
53+
echo
54+
echo "NOTE: if your work with remote repos and already
55+
pushed commits that you want to undo -> PREFER REVERT !!"
56+
57+
}
58+
4959
menuInit "Undoing changes"
50-
coloredLog " ALWAYS PREFER REVERT " "$clrPurple" "$clrWhite" && printf "\n\r"
5160
submenuHead "Undoing changes"
5261
menuItem a "Revert last commit - (keep commit history - create new commit)" revertLastCommit
5362
menuItem b "Revert commit - (keep commit history - create new commit)" revertToCommit
5463
menuItem c "(Soft) Reset commit - (delete some commits - keep current working dir)" resetToCommit
5564
menuItem d "(Hard) Reset commit - (delete some commits - overwrite working dir)" resetToCommitHard
5665
menuItem e "Undo local changes (only effects untracked files)" clean
57-
58-
echo
59-
echo "NOTE: if your work with remote repos and already
60-
pushed commits that you want to undo -> PREFER REVERT !!"
61-
62-
choice
63-
done
66+
startMenu "atucStatus"
6467
noterminate

maven_example.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ menuInit "Maven demo menu"
3333
menuItem e "Show effective settings" "mvn help:effective-settings"
3434
menuItem r "Show local repo location" "mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]'"
3535
menuItem l "Show global settings file location" showGlobalSettingFile
36-
startMenu "pwd"
36+
startMenu "echo /Users"
3737
echo "bye, bye, homie!"

simplest_example.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ menuItem c "Clean all" "mvn clean:clean"
1111
menuItem x "Compile" "mvn clean compile"
1212
menuItem t "Test" "mvn clean test"
1313
menuItem i "Install" "mvn clean install"
14-
startMenu "pwd"
14+
startMenu "echo /Users"
1515
echo "bye, bye, homie!"

0 commit comments

Comments
 (0)