From 1bbca8c7216ee9121008fab8734e200ffdf4dfe5 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Thu, 27 Nov 2025 21:42:41 +0100 Subject: [PATCH] Change one branch from master to main --- .gitmodules | 1 + index.org | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4aa5ef9..be6d265 100644 --- a/.gitmodules +++ b/.gitmodules @@ -160,3 +160,4 @@ [submodule "dehaeze26_decoupling_parallel_manipulators"] path = dehaeze26_decoupling_parallel_manipulators url = https://git.tdehaeze.xyz/tdehaeze/dehaeze26_decoupling_parallel_manipulators + branch = main diff --git a/index.org b/index.org index da14727..458b752 100644 --- a/index.org +++ b/index.org @@ -13,12 +13,13 @@ Welcome to my research pages. * Add a submodule :noexport: #+begin_src emacs-lisp :results none - (let* ((url (read-string "Add submodule (remote url) ")) - (url-match (string-match "\\([^./]+\\)\\(\\.git\\)?$" url)) - (path (match-string 1 url)) - (path (read-string "Submodule directory " path))) - (shell-command (concat "git submodule add " url " " path)) - (shell-command (concat "git submodule deinit -f " path))) +(let* ((url (read-string "Add submodule (remote url): ")) + (url-match (string-match "\\([^./]+\\)\\(\\.git\\)?$" url)) + (default-path (match-string 1 url)) + (path (read-string "Submodule directory: " default-path)) + (branch (read-string "Branch to use (default: main): " nil nil "main"))) + (shell-command (format "git submodule add --branch %s %s %s" branch url path)) + (shell-command (format "git submodule deinit -f %s" path))) #+end_src * Change submodule url :noexport: