mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
fix(overleaf-sync): push after commit editor closes
Assisted-by: pi (gpt-5.6-sol)
This commit is contained in:
@@ -17,9 +17,9 @@
|
|||||||
# old remote tree is removed first, newly ignored tracked files are deleted.
|
# old remote tree is removed first, newly ignored tracked files are deleted.
|
||||||
# Local symlinks are dereferenced because their targets may live outside the
|
# Local symlinks are dereferenced because their targets may live outside the
|
||||||
# Overleaf project. Its commit message is written in Git's editor, with the
|
# Overleaf project. Its commit message is written in Git's editor, with the
|
||||||
# staged diff included for review. The temporary commit is then shown and
|
# staged diff included for review. Closing the editor with an empty message
|
||||||
# pushed only after confirmation; if there is no diff, nothing is committed
|
# aborts the operation; a successful commit is pushed immediately. If there
|
||||||
# or pushed.
|
# is no diff, nothing is committed or pushed.
|
||||||
# - `pull` requires Jujutsu. It applies non-ignored remote additions, changes,
|
# - `pull` requires Jujutsu. It applies non-ignored remote additions, changes,
|
||||||
# and deletions in an isolated jj workspace while leaving ignored local files
|
# and deletions in an isolated jj workspace while leaving ignored local files
|
||||||
# untouched. If a remote regular file matches the resolved contents of an
|
# untouched. If a remote regular file matches the resolved contents of an
|
||||||
@@ -177,7 +177,7 @@ clone_overleaf() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
push_project() {
|
push_project() {
|
||||||
local temp_root overleaf_dir matcher_dir manifest confirm
|
local temp_root overleaf_dir matcher_dir manifest
|
||||||
temp_root="$(mktemp -d -t overleaf-sync.XXXXXXXX)"
|
temp_root="$(mktemp -d -t overleaf-sync.XXXXXXXX)"
|
||||||
overleaf_dir="$temp_root/overleaf"
|
overleaf_dir="$temp_root/overleaf"
|
||||||
matcher_dir="$temp_root/matcher"
|
matcher_dir="$temp_root/matcher"
|
||||||
@@ -200,12 +200,7 @@ push_project() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
git -C "$overleaf_dir" -c commit.gpgsign=false commit --verbose
|
git -C "$overleaf_dir" -c commit.gpgsign=false commit --verbose
|
||||||
git -C "$overleaf_dir" show
|
overleaf_git -C "$overleaf_dir" push
|
||||||
|
|
||||||
read -r -p "Push to Overleaf? [y/N] " confirm || true
|
|
||||||
if [[ "${confirm:-}" =~ ^[Yy]$ ]]; then
|
|
||||||
overleaf_git -C "$overleaf_dir" push
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pull_project() {
|
pull_project() {
|
||||||
|
|||||||
Reference in New Issue
Block a user