diff --git a/opencode/Dockerfile b/opencode/Dockerfile index d5460f9..24c9ec8 100644 --- a/opencode/Dockerfile +++ b/opencode/Dockerfile @@ -45,11 +45,12 @@ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed j RUN useradd -m -d /var/lib/opencode opencode RUN mkdir /workspace RUN chown opencode:opencode /workspace +ADD --chown=root:root ./opencode.json /etc/opencode/opencode.json +ADD --chown=opencode:opencode ./gitconfig /var/lib/opencode/.gitconfig USER opencode RUN pipx install pyright RUN pipx install pip-tools USER root -ADD --chown=opencode:opencode ./opencode.json /etc/opencode/opencode.json RUN mkdir -p /usr/lib/opencode/addons ADD --chmod=644 https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.46/lombok-1.18.46.jar /usr/lib/opencode/addons/lombok.jar ENV OPENCODE_CONFIG=/etc/opencode/opencode.json diff --git a/opencode/gitconfig b/opencode/gitconfig new file mode 100644 index 0000000..91e64ab --- /dev/null +++ b/opencode/gitconfig @@ -0,0 +1,60 @@ +[user] + email = oggioni.walter@gmail.com + name = Walter Oggioni +[push] + default = simple +[http] + sslVerify = true + +[difftool] + prompt = false + +[alias] +# to save a few keystrokes + br = branch -avv + co = checkout + st = status --column + dt = difftool + dtg = difftool -- + cm = commit -m +## new 'features' +## pretty logging: full tree + lg = log --all --graph --abbrev-commit --date=relative +# pretty logging: only commits leading to HEAD + lol = log --pretty=oneline --abbrev-commit --graph --decorate +# interactive apply patch (hunks) + ipatch = "!f() { git apply $1; git add -p; }; f" +# unstage everything + unstage = reset HEAD +# set the working tree as if the last comit hadn't been commited + undo = reset --soft HEAD^ cosmetics = commit -m 'Cosmetics' +# delete all local branches that have been merged but laster + clean-branches = "!f() { git branch --merged | grep -v '^* master$' | grep -v '^ master$' | xargs -r git branch -d ; }; f" +# Interactive rebase with the given number of latest commits + reb = "!r() { git rebase -i --autosquash HEAD~$1; }; r" +# Commit current stage area, in a commit that will automatically be a fixup in the next interactive rebase + tobesquashed = commit --fixup HEAD + +[status] + relativePaths = true +[format] + pretty = %Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset + +[core] + excludesfile = ~/.gitignore + +[color "status"] + header = white dim + branch = yellow bold + added = green bold + changed = red bold + untracked = cyan + +[color "diff"] + meta = yellow + commit = green + frag = magenta + old = red + new = green + whitespace = red reverse +