File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,22 @@ setActual() {
88 actual=$( git rev-parse --abbrev-ref HEAD 2> /dev/null)
99}
1010
11+ allBranches () {
12+ find .git/refs/heads -type f -exec sh -c ' echo "File: $1"; cat "$1"' _ {} \;
13+ }
14+
15+ allTags () {
16+ find .git/refs/tags -type f -exec sh -c ' echo "File: $1"; cat "$1"' _ {} \;
17+ }
18+
1119setActual
1220
1321menuInit " Git object internals"
1422submenuHead " Usefull commands "
1523menuItem 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 "
24+ menuItem c " Inspect current tree object " " git cat-file -p ${actual} ^{tree}"
25+ menuItem d " Inspect current commit object " " git cat-file -p ${actual} ^{commit}"
26+ menuItem e " All branches" allBranches
27+ menuItem f " All tags" allTags
2028startMenu " setActual"
2129noterminate
You can’t perform that action at this time.
0 commit comments