Index: ports/Justfile ================================================================== --- ports/Justfile +++ ports/Justfile @@ -40,20 +40,49 @@ ./lib/make-worktree.sh {{name}} _ports-git: @./lib/checkout-ports.sh +branches: _ports-git + cd freebsd-ports.git/main && git branch + +log branch *args: _ports-git + cd freebsd-ports.git/{{branch}} && git log {{args}} + pull: _ports-git @cd freebsd-ports.git/main && git pull --ff-only -push: _ports-git - @cd freebsd-ports.git/main && git push --branches patmaddox +push *branches: _ports-git + #!/bin/sh + if [ -z "{{branches}}" ]; then + branches="patmaddox-ports $(cat merge-branches)" + else + branches="{{branches}}" + fi + cd freebsd-ports.git/main + git push --atomic patmaddox $branches merge: _myports - @./lib/merge.sh + #!/bin/sh + branches=$(cat merge-branches) + cd freebsd-ports.git/patmaddox-ports + git merge --no-ff --no-edit $branches _myports: _ports-git #!/bin/sh if [ ! -d freebsd-ports.git/patmaddox-ports ]; then cd freebsd-ports.git/main git worktree add ../patmaddox-ports fi + +scratch +branches: _scratch + #!/bin/sh + cd freebsd-ports.git/scratch + git reset --hard main + git merge --no-ff --no-edit {{branches}} + +_scratch: _ports-git + #!/bin/sh + if [ ! -d freebsd-ports.git/scratch ]; then + cd freebsd-ports.git/main + git worktree add ../scratch + fi DELETED ports/lib/merge.sh Index: ports/lib/merge.sh ================================================================== --- ports/lib/merge.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cd freebsd-ports.git/patmaddox-ports -branches=$(git branch --format '%(refname:short)' | grep -v '^main$' | grep -v '^patmaddox-ports$' | grep -v '^scratch$) -git merge main $branches --no-ff --no-edit ADDED ports/merge-branches Index: ports/merge-branches ================================================================== --- /dev/null +++ ports/merge-branches @@ -0,0 +1,3 @@ +main +lang-elixir-mode.el +ports-mgmt-poudriere-devel