git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGit PATCH] Add support for initializing a branch for stgit from Emacs.

From
David Kågedal <davidk@lysator.liu.se>
Date
Sep 9, 2008, 08:47 UTC
Message-ID
<878wu1904l.fsf@lysator.liu.se>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
---
 contrib/stgit.el |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

This diff was taken against kha/experimental, but I don't think the file has changed there.

diff --git a/contrib/stgit.el b/contrib/stgit.el
index 5aaf311..aafefaf 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -130,7 +130,10 @@ Argument DIR is the repository path."
                                     'face 'stgit-description-face)
                  (when (memq patchsym stgit-marked-patches)
                    (replace-match "*" nil nil nil 2)
-                   (setq marked (cons patchsym marked))))))
+                   (setq marked (cons patchsym marked)))))
+              ((looking-at "stg series: Branch \".*\" not initialised")
+               (forward-line 1)
+               (insert "Run M-x stgit-init to initialise")))
         (forward-line 1))
       (setq stgit-marked-patches (nreverse marked)))))
 
@@ -218,6 +221,13 @@ Commands:
       (goto-char p)
       nil)))
 
+(defun stgit-init ()
+  "Run stg init"
+  (interactive)
+  (stgit-capture-output nil
+   (stgit-run "init"))
+  (stgit-refresh))
+
 (defun stgit-mark ()
   "Mark the patch under point"
   (interactive)
-- 
1.6.0.rc2.7.gbf8a


-- 
David Kågedal
Next: Karl Hasselström
Message 1 of 2 in “Add support for initializing a branch for stgit from Emacs.”
  1. Add support for initializing a branch for stgit from Emacs.David Kågedal, Sep 9, 2008
  2. Karl HasselströmSep 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.