1- #! /bin/sh
1+ #! /bin/bash
2+
3+ script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
4+ source " $script_dir /../shellmenu.sh"
5+ source " $script_dir /ezk-git-functions.sh"
26
37function numberedList () {
48 kommando=" $1 "
@@ -81,34 +85,30 @@ function diffDate () {
8185 # alternative: git diff 'HEAD@{2017-03-03T00:00:00}' HEAD --name-status | nl
8286}
8387
88+ diffStatus () {
89+ showStatus
90+ echo
91+ echo " Note: GIT diff cann compare four locations with each other: "
92+ echo " your working directory, the stage, the repository."
93+ echo
94+ coloredLog " ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐" " $clrPurple " " $clrBlack "
95+ coloredLog " │ │ │ │ │ │ │ │" " $clrPurple " " $clrBlack "
96+ coloredLog " │ │ -> │ │ -> │ │ -> │ │" " $clrPurple " " $clrBlack "
97+ coloredLog " └────────┘ └────────┘ └────────┘ └────────┘" " $clrPurple " " $clrBlack "
98+ coloredLog " work dir stage local repo remote repo" " $clrWhite " " $clrBlack "
99+ }
100+
84101git fetch --all
85- while ${continuemenu:= true} ; do
86- clear
87102menuInit " Working with diffs"
88- echo
89- echo " Note: GIT diff cann compare four locations with each other: "
90- echo " your working directory, the stage, the repository."
91- echo
92- coloredLog " ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐" " $clrPurple " " $clrBlack "
93- coloredLog " │ │ │ │ │ │ │ │" " $clrPurple " " $clrBlack "
94- coloredLog " │ │ -> │ │ -> │ │ -> │ │" " $clrPurple " " $clrBlack "
95- coloredLog " └────────┘ └────────┘ └────────┘ └────────┘" " $clrPurple " " $clrBlack "
96- coloredLog " work dir stage local repo remote repo" " $clrWhite " " $clrBlack "
97- echo
98- submenuHead " Different diff options:"
99- menuItem a " actual branch vs. origin/actual branch. -> local repository vs. remote repository" headHead
100- menuItem b " actual working dir vs. actual branch last commit -> work dir vs. local repository" dirHead
101- menuItem c " actual working dir vs. other commits -> work dir vs. local repository" treeCommit
102- menuItem d " commit vs. commit -> local repository vs. local repository" commitCommit
103- menuItem e " branch vs. branch -> repository vs. repository (local/remote)" branchBranch
104- echo
105- submenuHead " Specific diffs:"
106- menuItem k " Diff since date" diffDate
107- echo
108- submenuHead " Other usefull stuff here:"
109- menuItem h " show commits" showCommits
110- echo
111- showStatus
112- choice
113- done
103+ submenuHead " Different diff options:"
104+ menuItem a " actual branch vs. origin/actual branch. -> local repository vs. remote repository" headHead
105+ menuItem b " actual working dir vs. actual branch last commit -> work dir vs. local repository" dirHead
106+ menuItem c " actual working dir vs. other commits -> work dir vs. local repository" treeCommit
107+ menuItem d " commit vs. commit -> local repository vs. local repository" commitCommit
108+ menuItem e " branch vs. branch -> repository vs. repository (local/remote)" branchBranch
109+ submenuHead " Specific diffs:"
110+ menuItem k " Diff since date" diffDate
111+ submenuHead " Other usefull stuff here:"
112+ menuItem h " show commits" showCommits
113+ startMenu " diffStatus"
114114noterminate
0 commit comments