]> git.madduck.net Git - etc/git.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add toni master
authormartin f. krafft <madduck@madduck.net>
Thu, 26 Oct 2023 20:15:29 +0000 (22:15 +0200)
committermartin f. krafft <madduck@madduck.net>
Thu, 26 Oct 2023 20:15:29 +0000 (22:15 +0200)
.gitconfig
.zsh/zshrc/parts.d/50-git

index 170d504461a21f720a53e343b5dcd1e6937730f0..dded6a955a69fdc68b1fe1a2c878a233e1834d2c 100644 (file)
@@ -5,6 +5,9 @@
 [core]
        pager = "less --quit-if-one-screen --raw-control-chars --no-init --hilite-search --SILENT"
        quotePath = false
+       editor = sensible-editor +start
+[init]
+       defaultBranch = main
 [diff]
        renames = copies
 [alias]
        driver = dpkg-mergechangelogs -m %O %A %B %A
 [diff]
        tool = vimdiff
-[gui]
-       fontui = -family rotissansserif -size 10 -weight bold -slant roman -underline 0 -overstrike 0
 [color]
        branch = auto
        diff = auto
        interactive = auto
        status = auto
        ui = auto
-[url "ssh://git.debian.org/git/"]
-       insteadOf = alioth:
 [url "ssh://git@git.madduck.net/madduck/"]
        insteadOf = madduck:
 [url "git://git.madduck.net/madduck/pub/"]
@@ -52,6 +51,8 @@
        insteadOf = gitolite-admin:
 [url "ssh://git@admin.madduck.net/"]
        insteadOf = sysadmin:
+[url "ssh://git@git.int.toni.immo/"]
+       insteadOf = toni:
 [push]
        default = matching
 [sendemail]
index da11bf80a96942309961035ff0dd75f872ee81e2..9419e15afc9ff72fc365513b97bb634489276982 100644 (file)
@@ -60,6 +60,13 @@ __git_set_prompt_variable() {
 add-zsh-hook chpwd __git_set_prompt_variable
 __git_set_prompt_variable
 
+__update_git_prompt_vars_if_git_ran() {
+  case "$(history $(($HISTCMD - 1)))" in
+    *git*) __git_set_prompt_variable
+  esac
+}
+add-zsh-hook precmd __update_git_prompt_vars_if_git_ran
+
 __git_print_preprompt()
 {
   [[ $? -eq 0 ]] || return