浏览代码

feat: Add git fetch and error handling to ai-rebase.sh

This change adds `git fetch` with arguments provided by the user
to ensure the script operates on the latest remote state. It also
includes `set -e` for immediate exit on errors, improving the
reliability of the script.
seno 6 天之前
父节点
当前提交
9f50524502
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      ai-rebase.sh

+ 3 - 0
ai-rebase.sh

@@ -1,4 +1,5 @@
 #!/bin/bash
+set -e
 
 # Check for required Git configuration files
 if [ ! -f "$HOME/.gitconfig" ]; then
@@ -11,6 +12,8 @@ if [ ! -f "$HOME/.git-credentials" ]; then
 	exit 1
 fi
 
+git fetch "$@"
+
 docker run --rm -it \
 	-v "$(pwd):/repo" \
 	-v "$HOME/.gitconfig:/home/appuser/.gitconfig:ro" \