git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
2024-05-25 12:44:14 +020mail_redacted_for_web 2024-05-25 12:44:14 +0200 co2024-07-14 12:12:21 +0200 commite60e29cb6c941223768634413e7ffa13cc5b0b19 (patch) tree4c49b1dfe3a6e6ed5deb05dfdf8da91cfc74007b parent738ecb82e946043914fc822d8fb877a655e5ad4f (diff)downloaddotfiles-e60e29cb6c941223768634413e7ffa13cc5b0b19.tar.bz2
move submodule git-prompt to post-checkout
-rwxr-xr-x.githooks/post-checkout13
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules6
m---------git-prompt0
4 files changed, 14 insertions, 6 deletions
diff --git a/.githooks/post-checkout b/.githooks/post-checkout
new file mode 100755
index 0000000..d4bbbd7
--- /dev/null
+++ b/.githooks/post-checkout
@@ -0,0 +1,13 @@
+#!/usr/bin/env sh
+# client-side
+install -dvm 0750 .git/modules
+install -dvm 0750 .git/modules/git-prompt
+install -dvm 0750 .git/modules/git-prompt/info
+cat > .git/modules/git-prompt/info/sparse-checkout <<EOF
+contrib/completion/git-prompt.sh
+EOF
+rm -rf ./git-prompt
+git -c submodule.sha1collisiondetection.update=none clone --depth=1 --no-checkout https://github.com/git/git.git git-prompt &&\
+git submodule add https://github.com/git/git.git git-prompt &&\
+git -C git-prompt config core.sparseCheckout true &&\
+git submodule update --force --checkout git-prompt
diff --git a/.gitignore b/.gitignore
index fccf319..64410c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@
!/.ssh/config
!/.ssh/config.d/0000-all.conf
!/git-prompt
+!/.githooks
diff --git a/.gitmodules b/.gitmodules
index acec308..d2a5366 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -6,9 +6,3 @@
path = tmux-yank
url = https://github.com/tmux-plugins/tmux-yank
branch = master
-[submodule "git-prompt"]
- path = git-prompt
- url = https://github.com/git/git.git
- shallow = true
- sparsecheckout = true
- branch = maint
diff --git a/git-prompt b/git-prompt
-Subproject c2b3f2b3cdbf5ad9feb978dd367d77561a1271f
+Subproject a7dae3bdc8b516d36f630b12bb01e853a667e0d
iv class='add'>+ debian)
+ if [ "$OSMAJVER" -ge 12 ];then
+ FGC1="fgtcolor 155 15 64";FGC3="fgcolor 36"
+ else
+ FGC1="fgtcolor 155 15 64";FGC3="fgcolor 38"
+ fi
+ ;;
arch) FGC1="fgcolor 24";FGC3="fgcolor 239";;
redhat) FGC1="fgcolor 23";FGC3="fgcolor 88";;
fedora) FGC1="fgcolor 88";FGC3="fgcolor 203";;
#*suse|aix) FGC1="fgcolor 22";FGC3="fgcolor 41";;
*sles*) FGC1="fgcolor 22";FGC3="fgcolor 83";;
- *suse) FGC1="fgcolor 30";FGC3="fgcolor 83";;
+ *suse*) FGC1="fgcolor 30";FGC3="fgcolor 83";;
aix) FGC1="fgcolor 238";FGC3="fgcolor 83";;
*centos*) FGC1="fgcolor 25";FGC3="fgcolor 208";;
*solaris) FGC1="fgcolor 31";FGC3="fgcolor 124";;
- ubuntu) FGC1="fgcolor 130";FGC3="fgcolor 215";;
+ ubuntu)
+ if [ "$OSMAJVER" -ge 22 ];then
+ if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then
+ FGC1="fgcolor 89";FGC3="fgcolor 208"
+ else
+ FGC1="fgcolor 53";FGC3="fgcolor 184"
+ fi
+ else
+ FGC1="fgcolor 130";FGC3="fgcolor 215"
+ fi
+ ;;
rasp*) FGC1="fgcolor 53";FGC3="fgcolor 126";;
rocky) FGC1="fgcolor 22";FGC3="fgcolor 41";;
*) FGC1="fgcolor 240";FGC3="fgcolor 244";;
esac
+ if [ -n "$TERMUX_APK_RELEASE" ]; then
+ if [ "$TERMUX_APK_RELEASE" == "F_DROID" ]; then
+ FGC1="fgcolor 27";FGC3="fgcolor 35"
+ fi
+ fi
;;
esac
# HYPERVISOR LAYER 8 SOFTWARE
diff --git a/.flake8 b/.flake8
index 383ed7b..d0281bb 100644
--- a/.flake8
+++ b/.flake8
@@ -9,8 +9,9 @@ max-line-length = 100
# Do test for docstrings. Laziness sucks.
doctests = True
# use only if flake8-colors is installed:
-format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}:\\t${red_bold}%(code)s${reset} %(text)s
-
+# format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}:\\t${red_bold}%(code)s${reset} %(text)s
+# Superseding flake8-colors:
+format = %(cyan)s%(path)s%(reset)s:%(yellow)s%(bold)s%(row)d%(reset)s:%(green)s%(bold)s%(col)d%(reset)s: %(red)s%(bold)s%(code)s%(reset)s %(text)s
#per-file-ignores =
# # imported but unused
# __init__.py: F401