Skip to content

Commit 9d43505

Browse files
committed
New GIT internals objects menu
1 parent a5dc490 commit 9d43505

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

EasyKey.git/ezk-git-functions.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ function gitExtras () {
293293
nowaitonexit
294294
}
295295

296+
objectInternals() {
297+
bash $script_dir/../EasyKey.git/ezk-git-giob.sh
298+
nowaitonexit
299+
}
300+
296301
function reset () {
297302
executeCommand "git reset"
298303
}

EasyKey.git/ezk-git-giob.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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"
6+
7+
setActual() {
8+
actual=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
9+
}
10+
11+
setActual
12+
13+
menuInit "Git object internals"
14+
submenuHead "Usefull commands "
15+
menuItem b "Current HEAD pointer" "git symbolic-ref HEAD"
16+
menuItem c "Inspect current tree" "git cat-file -p ${actual}^{tree}"
17+
menuItem d "Inspect current commit" "git cat-file -p ${actual}^{commit}"
18+
menuItem e "All branches" "tree .git/refs/heads"
19+
menuItem f "All tags" "git fetch --tags && tree .git/refs/tags"
20+
startMenu "setActual"
21+
noterminate

EasyKey.git/git.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ menuInit "EasyKey.git"
2323
submenuHead "Other usefull actions "
2424
menuItemClm s "Working with diffs" workingDiffs w "Working with commits" atlassiansView
2525
menuItemClm y "Setting up repositories" settingUp 5 "Git extras" gitExtras
26+
menuItem 9 "GIT object internals" objectInternals
2627
submenuHead "Git admin actions "
2728
menuItemClm 1 "Show local git config" localGitConfig 2 "Show global git config" globalGitConfig
2829
menuItemClm 3 "Administering aliases" adminAliases 4 "Show .gitignore" gitIgnore

0 commit comments

Comments
 (0)