Skip to content

Commit

Permalink
feat: create a separate move commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hraban committed Jun 4, 2024
1 parent 4d45b3a commit 5478066
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,14 @@ This is the money shot.

git read-tree --prefix "$repopath" "refs/remotes/$reponame/$branch"
tree="$(git write-tree)"
move="$(git commit-tree \
"$tree" \
-p "refs/remotes/$reponame/$branch" \
-m "Move all files to $repopath/")"
commit="$(git commit-tree \
"$tree" \
-p "$branch" \
-p "refs/remotes/$reponame/$branch" \
-p "$move" \
-m "Merge $reponame/$branch")"
git reset -q "$commit"
#+END_SRC
Expand Down
6 changes: 5 additions & 1 deletion tomono
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ while IFS=$'\r'"$IFS" read -r repourl reponame repopath; do

git read-tree --prefix "$repopath" "refs/remotes/$reponame/$branch"
tree="$(git write-tree)"
move="$(git commit-tree \
"$tree" \
-p "refs/remotes/$reponame/$branch" \
-m "Move all files to $repopath/")"
commit="$(git commit-tree \
"$tree" \
-p "$branch" \
-p "refs/remotes/$reponame/$branch" \
-p "$move" \
-m "Merge $reponame/$branch")"
git reset -q "$commit"
done
Expand Down

0 comments on commit 5478066

Please sign in to comment.