diff options
author | Ben Sima <bsima@groq.com> | 2022-11-15 07:33:21 -0800 |
---|---|---|
committer | Ben Sima <bsima@groq.com> | 2024-04-17 13:01:43 -0700 |
commit | afb5e136f1a4b74de6656c49baab59cfcc4d1aa5 (patch) | |
tree | f6bd4afc203e15fadc3b399299c5ae4ce0a4989a /lib | |
parent | ba9270d2733e110071fa131fdcdbe80b91a134ca (diff) |
add some useful git aliases
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/common.nix b/lib/common.nix index f482bc6..a16d2da 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -132,6 +132,17 @@ in { authors = "shortlog -s -n"; slog = "log --stat"; glog = ''log --decorate --all --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative''; + logbr = "log -r origin/HEAD..HEAD"; + mrd = "!cat <(git shortlog origin/HEAD..HEAD) <(git diff --stat origin/HEAD...HEAD)"; + extend = "!git commit --fixup $1 && git rebase --autosquash $1~"; + mr = lib.concatStringsSep " " [ + "!git push" + "-o merge_request.create" + "-o merge_request.label=ReleaseUpdate::NotRequired" + "-o merge_request.assign=$USER" + ''-o merge_request.title="$(git log -n1 --format=%s)"'' + ''-o merge_request.description="$(git log -n1 --format=%b | tr "\n" " ")"'' + ]; }; extraConfig = { commit.template = "${./git-commit-template}"; |