Commit Diff


commit - c151c257bb0f660fb7b52a1b7823c0831d320a2c
commit + 67e0b4d2d00aff499b4d4b46d4f023e7c0c95d58
blob - 6bf63b7c7e37a64fe428825cf2c30023ccb18005
blob + 01f2e5142f2221421705a53decbde7095bcad7e0
--- vc-got.el
+++ vc-got.el
@@ -608,6 +608,17 @@ If REV is t, checkout from the head."
                                                   nil))))
       (vc-set-async-update buffer))))
 
+;; TODO: this can be expanded.  See whan omyksh does:
+;; function got-sync {
+;; 	local _remote _info _branch
+;; 	_remote=$1
+;; 	_info="$(got info)"
+;; 	_branch="$(echo "$_info" | awk '/branch reference:/ {l = split($NF, a, "/"); print a[l]}')"
+;; 	[ -z $_remote ] && _remote="origin"
+;; 	[ -z $_branch ] && _branch="main"
+;; 	got fetch "$_remote" && got update -b "$_remote/$_branch" && \
+;; 		got rebase $_branch
+;; }
 (defun vc-got-pull (prompt)
   "Execute got pull, prompting the user for the full command if PROMPT is not nil."
   (let ((default-directory (vc-got-root default-directory)))