Sfoglia il codice sorgente

Merge branch 'master' into cray

cray
Mitch Tishmack 6 anni fa
parent
commit
36ecd14a4d
5 ha cambiato i file con 51 aggiunte e 3 eliminazioni
  1. +0
    -1
      dotprofile.org
  2. +1
    -1
      emacs.org
  3. +24
    -1
      git.org
  4. +13
    -0
      options/mb.el
  5. +13
    -0
      options/mbp.el

+ 0
- 1
dotprofile.org Vedi File

@@ -219,7 +219,6 @@ Example:
try_git git://example.tld/some/random/path.git checks out to
~/src/example.tld/some/random/path


#+BEGIN_SRC sh :tangle (tangle/file ".profile" (bound-and-true-p git-p))
try_git()
{


+ 1
- 1
emacs.org Vedi File

@@ -745,7 +745,7 @@ Org-mode keybindings and settings, pretty sparse really.
:hook
(after-init . org-roam-mode)
:init
(custom-set-variables '(org-roam-directory "~/src/github.com/mitchty/dotfiles/"))
(custom-set-variables '(org-roam-directory "~/.emacs.d"))
:bind (:map org-roam-mode-map
(("C-c n l" . org-roam)
("C-c n f" . org-roam-find-file)


+ 24
- 1
git.org Vedi File

@@ -14,13 +14,15 @@ General git configuration split out into sections mostly.
* ~/.gitconfig
** pager

All pager, all the time.
All pager, all the time, always use color with it too.

#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p))
[pager]
color = true
#+END_SRC

** color

#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p))
[color]
status = auto
@@ -97,12 +99,22 @@ Aliases so I can be lay zee.
# My defremote hack depends on $remote/HEAD to point to somewhere
# which it may not if the git repo wasn't cloned
fixhead = !sh -c "rem=${0:-origin} && branch=${1:-master} && git symbolic-ref refs/remotes/$rem/HEAD refs/remotes/$rem/${branch}"
#+END_SRC

Some aliases to help with determining which commit(s) are(n't) present in the
left/right hand branch.

#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p))
[alias]
cpd = log --no-merges --left-right --graph --cherry-pick --oneline
cmd = log --no-merges --left-right --graph --cherry-mark --oneline
bcs = log --pretty="%H" --first-parent --no-merges
#+END_SRC

Some helpers for pruning a git repo or maintentance of things that has come in
handy over the years.

#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p))
[alias]
# kinda/sorta git pull -r without the git pull nonsense
# cleanmerged = !sh -c "git branch --merged | grep -Ev '^(. master|\*)' | xargs -n1 git branch -d"
@@ -112,19 +124,24 @@ Aliases so I can be lay zee.
# I don't remember what I used these for tbh, future mitch figure it out.
find-merge = !sh -c "commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 | uniq -f1 -d | sort -n | tail -1 | cut -f2"
show-merge = !sh -c "merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge"
#+END_SRC

#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p))
[alias]
# create a pull request branch based off a pull request, lets you git diff
# even if someone rebases a pull request.
p = !sh -c 'git branch ${1:-$(git defremote)}pr$0@$(iso8601 -s) $(git ls-remote -q ${1:-$(git defremote)} | grep refs/pull-requests/$0/from | cut -c1-8)'
rvers = !sh -c 'commitish=${0:-HEAD} && git describe --first-parent --tags --long --match="cray-*" $commitish | sed -e "s/^cray-//" -e "s/-/./" -e "s/-g.*//"'
#+END_SRC

#+BEGIN_SRC conf :tangle (tangle/file ".gitconfig" (bound-and-true-p git-p))
[alias]
rembranch = !sh -xc "remote=${1:-origin} && git ls-remote --symref -q $remote HEAD | head -n1 | awk '{print $2}' | sed -e 's|refs/heads/||'"
merged-remote = !sh -c 'remote=${0:-origin} && git branch --all --merged remotes/$remote/master | grep remotes/$remote | grep -E --invert-match \"(master|HEAD)\" | cut -d \"/\" -f 3-'
merged-local = !sh -c 'git branch --all --merged master | grep -E --invert-match \"(master|HEAD|remotes/)\" | cut -b 3-'
merged = !sh -c "remote=${0:-origin}; printf 'remote branches: %s\n' $remote >&2; git merged-remote $remote; printf 'local branches\n' >&2 && git merged-local"
#+END_SRC

** github

My username for github.
@@ -133,6 +150,7 @@ My username for github.
[github]
user = mitchty
#+END_SRC

** credential

Use a gpg encrypted .netrc file.
@@ -141,6 +159,7 @@ Use a gpg encrypted .netrc file.
[credential]
helper = netrc -v -f ~/.netrc.gpg -f ~/.netrc
#+END_SRC

** advice

Shut up already, I don't need hints.
@@ -149,6 +168,7 @@ Shut up already, I don't need hints.
[advice]
statushints = false
#+END_SRC

** gui

If I ever use the stupid gui, make it a little less derp.
@@ -158,6 +178,7 @@ If I ever use the stupid gui, make it a little less derp.
fontui = -family Monaco -size 8 -weight normal -slant roman -underline 0 -overstrike 0
fontdiff = -family Monaco -size 8 -weight normal -slant roman -underline 0 -overstrike 0
#+END_SRC

** http

Make large git repos work better by increasing the post buffer.
@@ -166,6 +187,7 @@ Make large git repos work better by increasing the post buffer.
[http]
postBuffer = 209715200
#+END_SRC

** push

Forgot why this was here, some version git changed the default push behavior.
@@ -174,6 +196,7 @@ Forgot why this was here, some version git changed the default push behavior.
[push]
default = simple
#+END_SRC

** url rewrites

Don't use git:// (ssh) to connect to github.


+ 13
- 0
options/mb.el Vedi File

@@ -0,0 +1,13 @@
;;-*-mode: emacs-lisp; coding: utf-8;-*-
;; File: mbp.el
;; Copyright: 2017 Mitch Tishmack
;; Description: Options for mb laptop
;;(setq testing t)
(setq macos-p t)
(setq nix-p t)
(setq tmux-p t)
(setq git-p t)
(setq emacs-p t)
(setq zsh-p t)
(setq mosh-p t)
(setq perl-p t)

+ 13
- 0
options/mbp.el Vedi File

@@ -0,0 +1,13 @@
;;-*-mode: emacs-lisp; coding: utf-8;-*-
;; File: mbp.el
;; Copyright: 2017 Mitch Tishmack
;; Description: Options for mbp laptop
;;(setq testing t)
(setq macos-p t)
(setq nix-p t)
(setq tmux-p t)
(setq git-p t)
(setq emacs-p t)
(setq zsh-p t)
(setq mosh-p t)
(setq perl-p t)

Caricamento…
Annulla
Salva