nqminhuit / gis

Java Command Line Application which extends Git for supporting git-modules
1 stars 0 forks source link

[feature] list all local branch names from all sub-modules #55

Closed nqminhuit closed 1 year ago

nqminhuit commented 1 year ago

this feature is for emacs integration, another approach is to list the folders .git/refs/heads from all sub modules which can be done via Elisp side.

nqminhuit commented 1 year ago

Looks like the "completing-read" function of elisp is smart enough to remove duplicate, however there is duplicate function in Gis' code and if-else logic

nqminhuit commented 1 year ago

using lisp is much more complicated since the linux command does not return branch with freature/**:

$ fd -H -p -g '**/refs/heads/**' | xargs -I {} basename {} | sort | uniq
beta
develop
feature
MSEC-19720_Kiosk_Window
MSEC-19752
MSEC-19790
MSEC-19843
release
nqminhuit commented 1 year ago

there is a better command:

git for-each-ref --format='%(refname:short)' refs/heads/