Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(ide): bring back a folder that was sent before its first commit
rubenluetke10-beepcbbf217d3bb8
diff --git a/jarvis/agentic_ide/remote.py b/jarvis/agentic_ide/remote.pyindex 48abe25c79..8fb3344090 100644--- a/jarvis/agentic_ide/remote.py+++ b/jarvis/agentic_ide/remote.py@@ -509,8 +509,14 @@ async def _push_tarball(pool: SshPtyPool, folder: Path, remote: str) -> list[str_PACK = r"""set -ecd {dest}-export GIT_INDEX_FILE="$(mktemp)"; git read-tree HEAD; git add -A; t=$(git write-tree)-c=$(git -c user.name=Jarvis -c user.email=jarvis@localhost commit-tree "$t" -p HEAD \+export GIT_INDEX_FILE="$(mktemp)"; rm -f "$GIT_INDEX_FILE" # a name only: git makes the file+# A folder sent before its first commit has no HEAD here either.+if git rev-parse -q --verify HEAD >/dev/null+then git read-tree HEAD; set -- -p HEAD+else set --+fi+git add -A; t=$(git write-tree)+c=$(git -c user.name=Jarvis -c user.email=jarvis@localhost commit-tree "$t" "$@" \-m "jarvis: work from the server")rm -f "$GIT_INDEX_FILE"; unset GIT_INDEX_FILEgit update-ref {ref} "$c"diff --git a/tests/unit/agentic_ide/test_remote_sync.py b/tests/unit/agentic_ide/test_remote_sync.pyindex a631bd136b..2938dfaec9 100644--- a/tests/unit/agentic_ide/test_remote_sync.py+++ b/tests/unit/agentic_ide/test_remote_sync.py@@ -351,3 +351,22 @@ def test_joined_folder_maps_a_subfolder_into_the_same_copy(tmp_path: Path) -> Noassert from_root == "/h/jw/repo-1/pkg"assert from_sub == "/h/jw/repo-1"+++async def test_a_repo_without_commits_comes_back_too(tmp_path: Path, copies: None) -> None:+ fresh = tmp_path / "fresh"+ fresh.mkdir()+ _git(fresh, "init", "-q", "-b", "main")+ (fresh / "draft.py").write_text("print('draft')\n", encoding="utf-8")+ server = tmp_path / "server-home"+ server.mkdir()+ pool = LocalPool(server)+ placement = await remote.push_code(pool, fresh)+ (Path(placement.remote_folder) / "draft.py").write_text("print('finished')\n", encoding="utf-8")++ outcome = await remote.pull_code(+ pool, fresh, placement.remote_folder, placement.offload_snapshot, "vps"+ )++ assert outcome.applied, outcome.message+ assert (fresh / "draft.py").read_text(encoding="utf-8") == "print('finished')\n"