File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ _umpf_completion()
38
38
" " )
39
39
COMPREPLY=( $( compgen -W " ${completion_cmds[*]} help" -- $cur ) )
40
40
;;
41
- diff|show|tag|build)
41
+ diff|show|tag|tig| build)
42
42
local -a refs
43
43
refs=( $( compgen -W " $( git for-each-ref --format=' %(refname:short)' refs/tags refs/heads refs/remotes) " -- $cur ) )
44
44
if [ ${# refs[@]} -eq 0 ]; then
Original file line number Diff line number Diff line change @@ -200,6 +200,8 @@ usage() {
200
200
diff <commit-ish> show patches not in any topic branch (not
201
201
upstream) and patches missing locally
202
202
show <commit-ish> show an useries file from an umpf
203
+ tig [umpf] browse an umpf interactively, showing state of
204
+ local, remote and remote-tracking topic branches
203
205
204
206
tag <commit-ish> generate a utag from an umerge
205
207
format-patch <utag> generate a useries file and patch stack
@@ -1874,6 +1876,38 @@ do_show() {
1874
1876
cleanup
1875
1877
}
1876
1878
1879
+ # ## namespace: tig ###
1880
+
1881
+ tig_topic () {
1882
+ ${GIT} show-ref -s " ${content} " >> " ${STATE} /refs"
1883
+ }
1884
+
1885
+ tig_release () {
1886
+ echo " ${content} " >> " ${STATE} /refs"
1887
+ }
1888
+
1889
+ tig_hashinfo () {
1890
+ echo " ${content} " >> " ${STATE} /refs"
1891
+ }
1892
+
1893
+ # ## command: tig ###
1894
+
1895
+ do_tig () {
1896
+ local -a refs
1897
+ local base
1898
+
1899
+ prepare_persistent tig " ${@ } "
1900
+ parse_series tig " ${STATE} /series"
1901
+
1902
+ mapfile -t refs < " ${STATE} /refs"
1903
+ base=" $( < " ${STATE} /base-name" ) "
1904
+
1905
+ # cut off each ref at base
1906
+ tig ^" ${base} " ^ " ${refs[@]} "
1907
+
1908
+ cleanup
1909
+ }
1910
+
1877
1911
# ## command: init ###
1878
1912
1879
1913
do_init () {
You can’t perform that action at this time.
0 commit comments