agent: move "sketch-base" into git
The agent's notion of "initial commit" is kind of special, in that it
is used as the "base" for a bunch of git operations. It's hard for
the user to change (we only provide a workflow via restart), yet
sometimes you want to do just that.
So, instead we put it as data inside of it, named as a tag sketch-base.
It's abusing tags, but branches are no better.
diff --git a/loop/server/loophttp_test.go b/loop/server/loophttp_test.go
index cb50642..d68928e 100644
--- a/loop/server/loophttp_test.go
+++ b/loop/server/loophttp_test.go
@@ -192,6 +192,12 @@
return m.initialCommit
}
+func (m *mockAgent) SketchGitBase() string {
+ m.mu.RLock()
+ defer m.mu.RUnlock()
+ return m.initialCommit
+}
+
func (m *mockAgent) Title() string {
m.mu.RLock()
defer m.mu.RUnlock()