@thedecipherist/mdd 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,16 +26,18 @@ if [ "$CHANGES" -eq 0 ]; then
|
|
|
26
26
|
exit 0
|
|
27
27
|
fi
|
|
28
28
|
|
|
29
|
-
# Dirty working tree — block
|
|
29
|
+
# Dirty working tree — block and ask the user what to do
|
|
30
30
|
echo ""
|
|
31
31
|
echo "⛔ MDD BRANCH GUARD"
|
|
32
32
|
echo ""
|
|
33
|
-
echo "
|
|
34
|
-
echo "
|
|
35
|
-
echo ""
|
|
36
|
-
echo "
|
|
37
|
-
echo " —
|
|
38
|
-
echo " git stash && git checkout -b feat/<name>"
|
|
33
|
+
echo " Branch '${BRANCH}' has ${CHANGES} uncommitted change(s)."
|
|
34
|
+
echo " Use AskUserQuestion to ask the user:"
|
|
35
|
+
echo " Question: 'You have uncommitted changes on ${BRANCH}. How would you like to proceed?'"
|
|
36
|
+
echo " Options:"
|
|
37
|
+
echo " 1. Commit changes — run: git add -A && git commit -m 'wip: save before branch' && git checkout -b feat/<name>"
|
|
38
|
+
echo " 2. Stash changes — run: git stash && git checkout -b feat/<name>"
|
|
39
|
+
echo " 3. Cancel — do nothing"
|
|
40
|
+
echo " For options 1 and 2, replace feat/<name> with a branch name derived from the task at hand."
|
|
39
41
|
echo ""
|
|
40
42
|
|
|
41
43
|
exit 2
|