From b53fc78fd73b86cc7e8e29cb0c20a8f2b308739f Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 8 Jan 2018 16:06:12 +1100 Subject: [PATCH] Consolidate Git configuration Another 72-column wide game of "typography tetris" follows, interspersed with TODOs and rambling self-reminders that I'm probably going to forget later anyway: git-config(1) ------------- * Replace each different `textconv` handler with a call to a shellscript which unifies this whole mess. That one-line wrapper for `docx2txt` is retarded and should never have existed in the first place (if only the author had defaulted to using STDOUT instead of a .txt file, eh?). * Add to aforementioned script a diffing helper for comparing compressed archives. Make sure to use `bsdtar -vtf` first before trying any other solution. less(1), lynx(1) ---------------- * Leverage `LESSOPEN` to prettyprint JSON and anything quacking like XML or SGML. Follow sketchy conventions and name the script `.lessfilter`. * Configure Lynx's keybindings so it feels like an actual pager program. * Figure out why Lynx's source-view isn't being reformatted, and fix the startpage to show recent browsing history (or at least bookmarks). Darwinisms ---------- * Separate the macOS-specific crap from the shared stuff so we keep this repository DRY and free of copy+pasta. Organise `./etc/install/` so we can add OpenBSD-related installer files for quicker station setup. * Find a way to always extract archives to a single directory unless the only top-level file *is* a directory. Kind of like Apple's Finder, but without all the "Darwinisms" (__MACOSX, .DS_Store, ._*, etc). --- .gitconfig | 36 +++++++++++++++++++++++------------- etc/.gitattributes-global | 5 +++-- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/.gitconfig b/.gitconfig index e41c736..cb03a39 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,19 +1,7 @@ [user] name = Alhadis email = gardnerjohng@gmail.com - signingkey = 895D24EE -[credential] - helper = osxkeychain -[diff] - renames = copies -[diff "word"] - textconv = docx2txt -[diff "exif"] - textconv = exiftool -x FileName -x Directory -[diff "bin"] - textconv = hexdump -v -C -[push] - default = simple + signingkey = C57044A83594344A [core] editor = /usr/local/bin/emacs excludesfile = ~/.files/etc/.gitignore-global @@ -25,7 +13,29 @@ co = checkout r = remote --verbose s = status +[credential] + helper = osxkeychain +[diff] + renames = copies +[diff "bin"] + textconv = hexdump -v -C + cachetextconv = true +[diff "exif"] + textconv = exiftool -x FileName -x Directory + cachetextconv = true +[diff "ps"] + textconv = ps2ascii + cachetextconv = true + binary = true +[diff "odt"] + textconv = odt2txt + cachetextconv = true +[diff "docx"] + textconv = docx2txt + cachetextconv = true [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f required = true +[gpg] + program = gpg2 diff --git a/etc/.gitattributes-global b/etc/.gitattributes-global index 3807b9f..6cc7cc6 100644 --- a/etc/.gitattributes-global +++ b/etc/.gitattributes-global @@ -8,5 +8,6 @@ *.psd diff=exif # Document diffs -*.docx diff=word -*.doc diff=word +*.docx diff=docx +*.doc diff=docx +*.odt diff=odt