git-sync-web 自动提交 2026-09-08 17:31:52
This commit is contained in:
@@ -72,6 +72,12 @@ func remoteRefExists(path, remote, branch string) bool {
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// branchExists 检查本地分支是否存在
|
||||
func branchExists(path, branch string) bool {
|
||||
_, err := gitRun(path, 15*time.Second, "show-ref", "--verify", "-q", "refs/heads/"+branch)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func dirtyCount(path string) int {
|
||||
out, err := gitRun(path, 30*time.Second, "status", "--porcelain")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user