From 0522f02182a7d08e821103f165576006881efbfd Mon Sep 17 00:00:00 2001 From: Detlef Groth Date: Mon, 19 Aug 2024 07:53:58 +0200 Subject: [PATCH] adding git-tag command, updating docs --- doc/me.smd | 17 +++++++++++++---- jasspa/macros/git.emf | 20 ++++++++++++++++++++ jasspa/macros/me.ehf | 17 +++++++++++++---- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/doc/me.smd b/doc/me.smd index 5867713..c0dffbe 100644 --- a/doc/me.smd +++ b/doc/me.smd @@ -1191,8 +1191,10 @@ [git-grep(3)](git-grep(3)) MicroEmacs Git interface - grep repo file content [git-log(3)](git-log(3)) MicroEmacs Git interface - log changes [git-pull(3)](git-pull(3)) MicroEmacs Git interface - update files and folders + [git-rm(3)](git-rm(3)) MicroEmacs Git interface - remove file [git-state(3)](git-state(3)) MicroEmacs Git interface - list state of directory files [git-status(3)](git-status(3)) MicroEmacs Git interface - status of file + [git-tag(3)](git-tag(3)) MicroEmacs Git interface - view and add Git tags [ipipe-kill(2)](ipipe-kill(2)) Kill a incremental pipe [ipipe-shell-command(2)](ipipe-shell-command(2)) (esc \) Incremental pipe (non-suspending system call) @@ -1935,8 +1937,10 @@ [git-grep(3)](git-grep(3)) MicroEmacs Git interface - grep repo file content [git-log(3)](git-log(3)) MicroEmacs Git interface - log changes [git-pull(3)](git-pull(3)) MicroEmacs Git interface - update files and folders + [git-rm(3)](git-rm(3)) MicroEmacs Git interface - remove file [git-state(3)](git-state(3)) MicroEmacs Git interface - list state of directory files [git-status(3)](git-status(3)) MicroEmacs Git interface - status of file + [git-tag(3)](git-tag(3)) MicroEmacs Git interface - view and add Git tags [global-abbrev-file(2)](global-abbrev-file(2)) Set global abbreviation file [global-bind-key(2)](global-bind-key(2)) (esc k) Bind a key to a named command or macro [global-mode(2)](global-mode(2)) (esc m) Change a global buffer mode @@ -2530,8 +2534,10 @@ [git-grep(3)](git-grep(3)) MicroEmacs Git interface - grep repo file content [git-log(3)](git-log(3)) MicroEmacs Git interface - log changes [git-pull(3)](git-pull(3)) MicroEmacs Git interface - update files and folders + [git-rm(3)](git-rm(3)) MicroEmacs Git interface - remove file [git-state(3)](git-state(3)) MicroEmacs Git interface - list state of directory files [git-status(3)](git-status(3)) MicroEmacs Git interface - status of file + [git-tag(3)](git-tag(3)) MicroEmacs Git interface - view and add Git tags [grep(3)](grep(3)) Search a file for a pattern [ifill-paragraph(3)](ifill-paragraph(3)) (esc q) Format a paragraph [indent-decrease(3)](indent-decrease(3)) Decrease the line indentation @@ -3522,8 +3528,10 @@ [git-grep(3)](git-grep(3)) MicroEmacs Git interface - grep repo file content [git-log(3)](git-log(3)) MicroEmacs Git interface - log changes [git-pull(3)](git-pull(3)) MicroEmacs Git interface - update files and folders + [git-rm(3)](git-rm(3)) MicroEmacs Git interface - remove file [git-state(3)](git-state(3)) MicroEmacs Git interface - list state of directory files [git-status(3)](git-status(3)) MicroEmacs Git interface - status of file + [git-tag(3)](git-tag(3)) MicroEmacs Git interface - view and add Git tags [global-abbrev-file(2)](global-abbrev-file(2)) Set global abbreviation file [global-bind-key(2)](global-bind-key(2)) (esc k) Bind a key to a named command or macro [global-mode(2)](global-mode(2)) (esc m) Change a global buffer mode @@ -4951,7 +4959,7 @@ - adding git.emf for basic git support, git-commit, git-grep, git-status etc - improved build architecture on Github comnining platform build using matrix approach - - repository cleanup from old binaries, 3rdparty folder + - repository cleanup from old binaries, 3rdparty folder, old Makefiles - [240813] - Windows: Static embedding of libz @@ -42859,6 +42867,7 @@ $a __git-rm__ __git-state__ __git-status__ + _n_ __git-tag__ ## DESCRIPTION @@ -42919,9 +42928,9 @@ $a the current buffer in the window including the modification state, repository etc. - The __git-tag__ command opens a dialog box and allows the user to add, remove - or delete a CVS tag. - + The __git-tag__ command displays either all existing tags or allows you to + enter a new tag name if a numerical argument of 1 is given by asking for the + tag name and a message. ## NOTES diff --git a/jasspa/macros/git.emf b/jasspa/macros/git.emf index 0c1b19d..e0d44aa 100644 --- a/jasspa/macros/git.emf +++ b/jasspa/macros/git.emf @@ -202,3 +202,23 @@ define-macro git-state screen-update !endif !emacro + +define-macro git-tag + !if &bmod "edit" + set-variable #l0 @mc5 "Save buffer first (?/y/n) ? " "nNyY" "(Y)es, (N)o, (C-g)Abort ? " + !if &iseq #l0 "y" + save-buffer + !endif + !endif + !if &and @? &equ @# 1 + ml-write "is one" + set-variable #l0 @ml08 "enter tagname (like v1.0-beta0)" + set-variable #l1 @ml08 "enter message (like v1.0-beta0)" + 0 pipe-shell-command &cat .git.lang &spr " git tag -a '%s' -m '%s'" #l0 #l1 "*git*" + !else + 0 pipe-shell-command &cat .git.lang " git tag" "*git*" + !if &band $system 0x01 + screen-update + !endif + !endif +!emacro diff --git a/jasspa/macros/me.ehf b/jasspa/macros/me.ehf index e37aa2e..7746f54 100644 --- a/jasspa/macros/me.ehf +++ b/jasspa/macros/me.ehf @@ -1283,8 +1283,10 @@ Miscellaneous Information lsgit-grep(3)lmgit-grep(3)le MicroEmacs Git interface - grep repo file content lsgit-log(3)lmgit-log(3)le MicroEmacs Git interface - log changes lsgit-pull(3)lmgit-pull(3)le MicroEmacs Git interface - update files and folders + lsgit-rm(3)lmgit-rm(3)le MicroEmacs Git interface - remove file lsgit-state(3)lmgit-state(3)le MicroEmacs Git interface - list state of directory files lsgit-status(3)lmgit-status(3)le MicroEmacs Git interface - status of file + lsgit-tag(3)lmgit-tag(3)le MicroEmacs Git interface - view and add Git tags lsipipe-kill(2)lmipipe-kill(2)le Kill a incremental pipe lsipipe-shell-command(2)lmipipe-shell-command(2)le (esc \) Incremental pipe (non-suspending system call) @@ -2018,8 +2020,10 @@ Miscellaneous Information lsgit-grep(3)lmgit-grep(3)le MicroEmacs Git interface - grep repo file content lsgit-log(3)lmgit-log(3)le MicroEmacs Git interface - log changes lsgit-pull(3)lmgit-pull(3)le MicroEmacs Git interface - update files and folders + lsgit-rm(3)lmgit-rm(3)le MicroEmacs Git interface - remove file lsgit-state(3)lmgit-state(3)le MicroEmacs Git interface - list state of directory files lsgit-status(3)lmgit-status(3)le MicroEmacs Git interface - status of file + lsgit-tag(3)lmgit-tag(3)le MicroEmacs Git interface - view and add Git tags lsglobal-abbrev-file(2)lmglobal-abbrev-file(2)le Set global abbreviation file lsglobal-bind-key(2)lmglobal-bind-key(2)le (esc k) Bind a key to a named command or macro lsglobal-mode(2)lmglobal-mode(2)le (esc m) Change a global buffer mode @@ -2612,8 +2616,10 @@ Miscellaneous Information lsgit-grep(3)lmgit-grep(3)le MicroEmacs Git interface - grep repo file content lsgit-log(3)lmgit-log(3)le MicroEmacs Git interface - log changes lsgit-pull(3)lmgit-pull(3)le MicroEmacs Git interface - update files and folders + lsgit-rm(3)lmgit-rm(3)le MicroEmacs Git interface - remove file lsgit-state(3)lmgit-state(3)le MicroEmacs Git interface - list state of directory files lsgit-status(3)lmgit-status(3)le MicroEmacs Git interface - status of file + lsgit-tag(3)lmgit-tag(3)le MicroEmacs Git interface - view and add Git tags lsgrep(3)lmgrep(3)le Search a file for a pattern lsifill-paragraph(3)lmifill-paragraph(3)le (esc q) Format a paragraph lsindent-decrease(3)lmindent-decrease(3)le Decrease the line indentation @@ -3601,8 +3607,10 @@ Miscellaneous Information lsgit-grep(3)lmgit-grep(3)le MicroEmacs Git interface - grep repo file content lsgit-log(3)lmgit-log(3)le MicroEmacs Git interface - log changes lsgit-pull(3)lmgit-pull(3)le MicroEmacs Git interface - update files and folders + lsgit-rm(3)lmgit-rm(3)le MicroEmacs Git interface - remove file lsgit-state(3)lmgit-state(3)le MicroEmacs Git interface - list state of directory files lsgit-status(3)lmgit-status(3)le MicroEmacs Git interface - status of file + lsgit-tag(3)lmgit-tag(3)le MicroEmacs Git interface - view and add Git tags lsglobal-abbrev-file(2)lmglobal-abbrev-file(2)le Set global abbreviation file lsglobal-bind-key(2)lmglobal-bind-key(2)le (esc k) Bind a key to a named command or macro lsglobal-mode(2)lmglobal-mode(2)le (esc m) Change a global buffer mode @@ -5026,7 +5034,7 @@ Miscellaneous Information - adding git.emf for basic git support, git-commit, git-grep, git-status etc - improved build architecture on Github comnining platform build using matrix approach - - repository cleanup from old binaries, 3rdparty folder + - repository cleanup from old binaries, 3rdparty folder, old Makefiles - [240813] - Windows: Static embedding of libz @@ -42287,6 +42295,7 @@ $a cDgit-rmcA cDgit-statecA cDgit-statuscA + cCncA cDgit-tagcA cEDESCRIPTION cA @@ -42347,9 +42356,9 @@ $a the current buffer in the window including the modification state, repository etc. - The cDgit-tagcA command opens a dialog box and allows the user to add, remove - or delete a CVS tag. - + The cDgit-tagcA command displays either all existing tags or allows you to + enter a new tag name if a numerical argument of 1 is given by asking for the + tag name and a message. cENOTES cA