]> git.friedersdorff.com Git - max/saltfiles.git/blobdiff - states/git/init.sls
Add 'changes' alias
[max/saltfiles.git] / states / git / init.sls
index 3d1e0df74dcd6697767e7c98978a629ad4e44cd0..a7ef7c3bcb6c84d79e0f7db69064e9f26d612f32 100644 (file)
@@ -14,25 +14,59 @@ include:
   'core.editor': 'vim',
   'core.excludesfile': '/home/' + grains['user'] + '/.gitignore',
   'merge.tool': 'diffuse',
-  'merge.ff': 'true',
+  'merge.ff': 'false',
+  'pull.rebase': 'true',
+  'pull.ff': 'true',
   'push.default': 'simple',
-  'alias.lg': 'lg = log --graph --pretty=format:\'%Cred%h%Creset %G? %ad %s %C(bold blue)<%an>%Creset %C(yellow)%d%Creset\' --date=short',
+  'alias.lg': 'log --graph --pretty=format:\'%Cred%h%Creset %G? %ad %s %C(bold blue)<%an>%Creset %C(yellow)%d%Creset\' --date=short',
   'alias.hist': 'log --graph --full-history --all --pretty=format:\'%Cred%h%Creset %G? %ad %s %C(bold blue)<%an>%Creset %C(yellow)%d%Creset\' --date=short',
-  'alias.struct': 'struct = log --graph --full-history --all --pretty=format:\'%ad %s %Creset %C(yellow)%d%Creset\' --date=short --simplify-by-decoration',
+  'alias.struct': 'log --graph --full-history --all --pretty=format:\'%ad %s %Creset %C(yellow)%d%Creset\' --date=short --simplify-by-decoration',
   'alias.co': 'checkout',
   'alias.ci': 'commit',
   'alias.st': 'status',
+  'alias.vh': 'verify-commit HEAD',
+  'alias.vc': 'verify-commit',
+  'alias.vt': 'tag -v',
+  'alias.tag': 'tag -s',
+  'alias.t': 'tag -s',
+  'alias.alias': '!req=$\'\\033[0;31m=\\033[0m\'; git config --get-regexp ^alias\. | sed -e s/^alias\.// -e "s/\ /\t$req\ /"',
+  'alias.pa': '!git remote | xargs -L1 git push --all',
+  'alias.fi': 'flow feature finish --push --no-ff',
+  'alias.changes': '!git log $(git tag -l --sort=taggerdate | tail -n 1)..HEAD --pretty=format:"* %s" --no-merges --reverse',
+  'sendemail.smtpserver': 'mail.friedersdorff.com',
+  'sendemail.smtpuser': 'max',
+  'sendemail.smtpencryption': 'tls',
+  'sendemail.smtpserverport': '587',
 }
 %}
 
 {% for var,val in git_confs.items() %}
 {{ var }}:
   git.config_set:
-    - value: {{ val }}
+    - value: >-
+        {{ val }}
     - global: True
     - user: {{ grains['user'] }}
 {% endfor %}
 
+{% if grains['host'] in ["barium", "baryte"] %}
+work_email:
+  git.config_set:
+    - name: user.email
+    - value: >-
+        maximilian.friedersdorff@envsys.co.uk
+    - global: True
+    - user: {{ grains['user'] }}
+
+work_gpg:
+  git.config_set:
+    - name: user.signingkey
+    - value: >-
+        B3030EB2
+    - global: True
+    - user: {{ grains['user'] }}
+{% endif %}
+
 global gitignore:
   file.managed:
     - name: {{ grains['homedir'] }}/.gitignore
@@ -40,3 +74,14 @@ global gitignore:
     - mode: 644
     - user: {{ grains['user'] }}
     - group: {{ grains['user'] }}
+
+git-prompt:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.git-prompt.sh
+    - source: https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
+    - mode: 644
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - skip_verify: True
+
+