diff --git a/CLAUDE.md b/CLAUDE.md index 2cf4ef7..42bc4e5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,10 +1,10 @@ -# Grove (working name: gitsync) +# Grove ## Overview Linux tool that keeps chosen git repos continuously in sync across machines, including uncommitted work, via snapshot refs (`refs/sync//`) on a primary remote. Planned as a Rust workspace (core, providers, daemon, CLI, Tauri GUI). Currently in -**Phase 0 done, Phase 1 implemented (pending real two-PC validation and review)**: `gitsync-core` + `gitsync` CLI (`status`, `snapshot`, `add`, `sync`, `doctor`); daemon, GUI and providers do not exist yet. Do not start a +**Phase 0 done, Phase 1 implemented (pending real two-PC validation and review)**: `grove-core` + `grove` CLI (`status`, `snapshot`, `add`, `sync`, `doctor`); daemon, GUI and providers do not exist yet. Do not start a new phase before its predecessor's results are written to `docs/`. ## Commands diff --git a/Cargo.lock b/Cargo.lock index 1fe58ae..a5a2423 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,16 +111,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] -name = "gitsync" +name = "grove" version = "0.1.0" dependencies = [ "anyhow", "clap", - "gitsync-core", + "grove-core", ] [[package]] -name = "gitsync-core" +name = "grove-core" version = "0.1.0" dependencies = [ "serde", diff --git a/Cargo.toml b/Cargo.toml index e61f46a..b734370 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [workspace] resolver = "3" -members = ["crates/gitsync-core", "crates/gitsync"] +members = ["crates/grove-core", "crates/grove"] [workspace.package] edition = "2024" version = "0.1.0" -license = "MIT OR Apache-2.0" +license = "MIT" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3ceed4b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Darío + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7594380..f66ecd5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # Grove Keeps your git repos in sync across machines without manual commit/push/pull, including -work in progress. Early stage (spikes only). See `docs/` for details. +work in progress. Early stage (Phase 1: core library and CLI). See `docs/` for details. + +## License + +MIT, see `LICENSE`. diff --git a/crates/gitsync-core/Cargo.toml b/crates/grove-core/Cargo.toml similarity index 60% rename from crates/gitsync-core/Cargo.toml rename to crates/grove-core/Cargo.toml index 9ec136c..cb10add 100644 --- a/crates/gitsync-core/Cargo.toml +++ b/crates/grove-core/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "gitsync-core" -description = "Sync engine for gitsync: snapshots, state classification" +name = "grove-core" +description = "Sync engine for grove: snapshots, state classification" edition.workspace = true version.workspace = true diff --git a/crates/gitsync-core/src/config.rs b/crates/grove-core/src/config.rs similarity index 96% rename from crates/gitsync-core/src/config.rs rename to crates/grove-core/src/config.rs index 647c80e..f0ee5c6 100644 --- a/crates/gitsync-core/src/config.rs +++ b/crates/grove-core/src/config.rs @@ -130,20 +130,20 @@ impl Config { Config::parse(&text) } - /// Default location: `$XDG_CONFIG_HOME/gitsync/config.toml` or `~/.config/...`. + /// Default location: `$XDG_CONFIG_HOME/grove/config.toml` or `~/.config/...`. pub fn default_path() -> Option { let base = std::env::var_os("XDG_CONFIG_HOME") .map(PathBuf::from) .or_else(|| std::env::var_os("HOME").map(|h| PathBuf::from(h).join(".config")))?; - Some(base.join("gitsync/config.toml")) + Some(base.join("grove/config.toml")) } - /// Local state directory: `$XDG_STATE_HOME/gitsync` or `~/.local/state/gitsync`. + /// Local state directory: `$XDG_STATE_HOME/grove` or `~/.local/state/grove`. pub fn state_dir() -> Option { let base = std::env::var_os("XDG_STATE_HOME") .map(PathBuf::from) .or_else(|| std::env::var_os("HOME").map(|h| PathBuf::from(h).join(".local/state")))?; - Some(base.join("gitsync")) + Some(base.join("grove")) } /// `root.path` with a leading `~` expanded. @@ -224,7 +224,7 @@ mirror_to = ["github"] fetch_interval_s = 30 [config_repo] provider = "gitea-main" -name = "gitsync-config" +name = "grove-config" "#; #[test] diff --git a/crates/gitsync-core/src/git.rs b/crates/grove-core/src/git.rs similarity index 100% rename from crates/gitsync-core/src/git.rs rename to crates/grove-core/src/git.rs diff --git a/crates/gitsync-core/src/inspect.rs b/crates/grove-core/src/inspect.rs similarity index 100% rename from crates/gitsync-core/src/inspect.rs rename to crates/grove-core/src/inspect.rs diff --git a/crates/gitsync-core/src/layout.rs b/crates/grove-core/src/layout.rs similarity index 97% rename from crates/gitsync-core/src/layout.rs rename to crates/grove-core/src/layout.rs index 5df1787..f23f85c 100644 --- a/crates/gitsync-core/src/layout.rs +++ b/crates/grove-core/src/layout.rs @@ -70,7 +70,7 @@ mod tests { fn invariants_hold_for_random_names() { let alphabet: Vec = "ab/._- é\\:*?\"<>|0Z".chars().collect(); let mut seed = 0x1234_5678_u64; - let mut taken: Vec = vec![".bare".into(), ".gitsync-stage".into()]; + let mut taken: Vec = vec![".bare".into(), ".grove-stage".into()]; for _ in 0..2000 { let len = { seed = seed diff --git a/crates/gitsync-core/src/lib.rs b/crates/grove-core/src/lib.rs similarity index 100% rename from crates/gitsync-core/src/lib.rs rename to crates/grove-core/src/lib.rs diff --git a/crates/gitsync-core/src/migrate.rs b/crates/grove-core/src/migrate.rs similarity index 99% rename from crates/gitsync-core/src/migrate.rs rename to crates/grove-core/src/migrate.rs index 64421f8..ce4ab0f 100644 --- a/crates/gitsync-core/src/migrate.rs +++ b/crates/grove-core/src/migrate.rs @@ -13,7 +13,7 @@ use std::path::{Path, PathBuf}; use std::process::Command; const BARE: &str = ".bare"; -const STAGE: &str = ".gitsync-stage"; +const STAGE: &str = ".grove-stage"; #[derive(Debug)] pub enum MigrateError { diff --git a/crates/gitsync-core/src/receive.rs b/crates/grove-core/src/receive.rs similarity index 100% rename from crates/gitsync-core/src/receive.rs rename to crates/grove-core/src/receive.rs diff --git a/crates/gitsync-core/src/snapshot.rs b/crates/grove-core/src/snapshot.rs similarity index 87% rename from crates/gitsync-core/src/snapshot.rs rename to crates/grove-core/src/snapshot.rs index 0d67c7b..3717947 100644 --- a/crates/gitsync-core/src/snapshot.rs +++ b/crates/grove-core/src/snapshot.rs @@ -36,7 +36,7 @@ fn temp_index_path() -> PathBuf { .duration_since(UNIX_EPOCH) .map(|d| d.as_nanos()) .unwrap_or(0); - std::env::temp_dir().join(format!("gitsync-index-{}-{nanos}", std::process::id())) + std::env::temp_dir().join(format!("grove-index-{}-{nanos}", std::process::id())) } /// Take a snapshot of `worktree` for `machine`. `message_stamp` is embedded in the @@ -58,10 +58,10 @@ pub fn take(worktree: &Path, machine: &str, message_stamp: &str) -> Result Result = vec!["commit-tree", &tree]; if let Some(h) = &head { args.extend(["-p", h]); diff --git a/crates/gitsync-core/src/state.rs b/crates/grove-core/src/state.rs similarity index 100% rename from crates/gitsync-core/src/state.rs rename to crates/grove-core/src/state.rs diff --git a/crates/gitsync-core/src/sync.rs b/crates/grove-core/src/sync.rs similarity index 100% rename from crates/gitsync-core/src/sync.rs rename to crates/grove-core/src/sync.rs diff --git a/crates/gitsync-core/tests/common/mod.rs b/crates/grove-core/tests/common/mod.rs similarity index 96% rename from crates/gitsync-core/tests/common/mod.rs rename to crates/grove-core/tests/common/mod.rs index f31c606..af7ccad 100644 --- a/crates/gitsync-core/tests/common/mod.rs +++ b/crates/grove-core/tests/common/mod.rs @@ -1,11 +1,11 @@ #![allow(dead_code)] -use gitsync_core::git::Git; +use grove_core::git::Git; use std::fs; use std::path::{Path, PathBuf}; pub fn tmpdir(tag: &str) -> PathBuf { let p = std::env::temp_dir().join(format!( - "gitsync-test-{tag}-{}-{}", + "grove-test-{tag}-{}-{}", std::process::id(), std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) diff --git a/crates/gitsync-core/tests/inspect.rs b/crates/grove-core/tests/inspect.rs similarity index 95% rename from crates/gitsync-core/tests/inspect.rs rename to crates/grove-core/tests/inspect.rs index d07d885..527ac16 100644 --- a/crates/gitsync-core/tests/inspect.rs +++ b/crates/grove-core/tests/inspect.rs @@ -1,12 +1,12 @@ -use gitsync_core::git::Git; -use gitsync_core::inspect::{state, worktrees}; -use gitsync_core::state::State; +use grove_core::git::Git; +use grove_core::inspect::{state, worktrees}; +use grove_core::state::State; use std::fs; use std::path::{Path, PathBuf}; fn tmpdir(tag: &str) -> PathBuf { let p = std::env::temp_dir().join(format!( - "gitsync-test-{tag}-{}-{}", + "grove-test-{tag}-{}-{}", std::process::id(), std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) diff --git a/crates/gitsync-core/tests/migrate.rs b/crates/grove-core/tests/migrate.rs similarity index 97% rename from crates/gitsync-core/tests/migrate.rs rename to crates/grove-core/tests/migrate.rs index fd31141..4134b97 100644 --- a/crates/gitsync-core/tests/migrate.rs +++ b/crates/grove-core/tests/migrate.rs @@ -1,7 +1,7 @@ mod common; use common::*; -use gitsync_core::git::Git; -use gitsync_core::migrate::{MigrateError, Step, migrate, migrate_failing_after}; +use grove_core::git::Git; +use grove_core::migrate::{MigrateError, Step, migrate, migrate_failing_after}; use std::fs; fn names(dir: &std::path::Path) -> Vec { @@ -136,7 +136,7 @@ fn every_failure_point_rolls_back_to_the_original_layout() { } } -fn refused(r: Result) -> String { +fn refused(r: Result) -> String { match r { Err(MigrateError::Refused(m)) => m, other => panic!("expected Refused, got {other:?}"), diff --git a/crates/gitsync-core/tests/receive.rs b/crates/grove-core/tests/receive.rs similarity index 98% rename from crates/gitsync-core/tests/receive.rs rename to crates/grove-core/tests/receive.rs index bd400c0..d3f252d 100644 --- a/crates/gitsync-core/tests/receive.rs +++ b/crates/grove-core/tests/receive.rs @@ -1,10 +1,10 @@ mod common; use common::*; -use gitsync_core::git::Git; -use gitsync_core::migrate::migrate; -use gitsync_core::receive::*; -use gitsync_core::snapshot::take; -use gitsync_core::state::State; +use grove_core::git::Git; +use grove_core::migrate::migrate; +use grove_core::receive::*; +use grove_core::snapshot::take; +use grove_core::state::State; use std::fs; use std::path::PathBuf; @@ -277,7 +277,7 @@ fn gone_branch_with_local_changes_is_kept_and_flagged() { } fn state_of(p: &std::path::Path) -> State { - gitsync_core::inspect::state(p) + grove_core::inspect::state(p) } // ---- regression tests for the review findings ---- @@ -372,7 +372,7 @@ fn snapshot_apply_declines_instead_of_overwriting_local_ignored_file() { #[test] fn archive_and_receive_in_one_pass_do_not_collide_on_backup_refs() { - use gitsync_core::sync::{Options, sync_repo}; + use grove_core::sync::{Options, sync_repo}; let w = world(); migrate(&w.d2, "m2", &w.base.join("bk"), "1").unwrap(); let root = w.d2.canonicalize().unwrap(); diff --git a/crates/gitsync-core/tests/snapshot.rs b/crates/grove-core/tests/snapshot.rs similarity index 97% rename from crates/gitsync-core/tests/snapshot.rs rename to crates/grove-core/tests/snapshot.rs index f69b95e..4c62007 100644 --- a/crates/gitsync-core/tests/snapshot.rs +++ b/crates/grove-core/tests/snapshot.rs @@ -1,11 +1,11 @@ -use gitsync_core::git::Git; -use gitsync_core::snapshot::{Outcome, take}; +use grove_core::git::Git; +use grove_core::snapshot::{Outcome, take}; use std::fs; use std::path::{Path, PathBuf}; fn tmpdir(tag: &str) -> PathBuf { let p = std::env::temp_dir().join(format!( - "gitsync-test-{tag}-{}-{}", + "grove-test-{tag}-{}-{}", std::process::id(), std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) diff --git a/crates/gitsync-core/tests/sync.rs b/crates/grove-core/tests/sync.rs similarity index 96% rename from crates/gitsync-core/tests/sync.rs rename to crates/grove-core/tests/sync.rs index e0d6391..594329a 100644 --- a/crates/gitsync-core/tests/sync.rs +++ b/crates/grove-core/tests/sync.rs @@ -1,9 +1,9 @@ mod common; use common::*; -use gitsync_core::git::Git; -use gitsync_core::receive::Applied; -use gitsync_core::state::State; -use gitsync_core::sync::{Options, sync_repo}; +use grove_core::git::Git; +use grove_core::receive::Applied; +use grove_core::state::State; +use grove_core::sync::{Options, sync_repo}; use std::fs; use std::path::Path; diff --git a/crates/gitsync/Cargo.toml b/crates/grove/Cargo.toml similarity index 54% rename from crates/gitsync/Cargo.toml rename to crates/grove/Cargo.toml index 92a0a9c..917c3ca 100644 --- a/crates/gitsync/Cargo.toml +++ b/crates/grove/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "gitsync" -description = "gitsync command line client" +name = "grove" +description = "grove command line client" edition.workspace = true version.workspace = true [dependencies] anyhow = "1.0.104" clap = { version = "4.6.7", features = ["derive"] } -gitsync-core = { version = "0.1.0", path = "../gitsync-core" } +grove-core = { version = "0.1.0", path = "../grove-core" } diff --git a/crates/gitsync/src/main.rs b/crates/grove/src/main.rs similarity index 94% rename from crates/gitsync/src/main.rs rename to crates/grove/src/main.rs index fb8ccde..afa81e8 100644 --- a/crates/gitsync/src/main.rs +++ b/crates/grove/src/main.rs @@ -1,22 +1,19 @@ use anyhow::{Context, Result, bail}; use clap::{Parser, Subcommand}; -use gitsync_core::config::Config; -use gitsync_core::git::Git; -use gitsync_core::inspect::{state, worktrees}; -use gitsync_core::migrate::migrate; -use gitsync_core::receive::{Applied, Archived, Received}; -use gitsync_core::snapshot::{Outcome, take}; -use gitsync_core::sync::{Options, SyncReport, git_dir_for, sync_repo}; +use grove_core::config::Config; +use grove_core::git::Git; +use grove_core::inspect::{state, worktrees}; +use grove_core::migrate::migrate; +use grove_core::receive::{Applied, Archived, Received}; +use grove_core::snapshot::{Outcome, take}; +use grove_core::sync::{Options, SyncReport, git_dir_for, sync_repo}; use std::path::{Path, PathBuf}; use std::time::{SystemTime, UNIX_EPOCH}; #[derive(Parser)] -#[command( - name = "gitsync", - about = "Keep git workspaces in sync across machines" -)] +#[command(name = "grove", about = "Keep git workspaces in sync across machines")] struct Cli { - /// Path to config.toml (default: $XDG_CONFIG_HOME/gitsync/config.toml) + /// Path to config.toml (default: $XDG_CONFIG_HOME/grove/config.toml) #[arg(long, global = true)] config: Option, #[command(subcommand)] diff --git a/crates/gitsync/tests/cli.rs b/crates/grove/tests/cli.rs similarity index 95% rename from crates/gitsync/tests/cli.rs rename to crates/grove/tests/cli.rs index a7be61b..0598bd8 100644 --- a/crates/gitsync/tests/cli.rs +++ b/crates/grove/tests/cli.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; use std::process::{Command, Output}; fn tmp(tag: &str) -> PathBuf { - let p = std::env::temp_dir().join(format!("gitsync-cli-{tag}-{}", std::process::id())); + let p = std::env::temp_dir().join(format!("grove-cli-{tag}-{}", std::process::id())); let _ = fs::remove_dir_all(&p); fs::create_dir_all(&p).unwrap(); p @@ -24,7 +24,7 @@ fn git(dir: &Path, args: &[&str]) -> String { } fn gs(cfg: &Path, dir: &Path, args: &[&str]) -> Output { - Command::new(env!("CARGO_BIN_EXE_gitsync")) + Command::new(env!("CARGO_BIN_EXE_grove")) .current_dir(dir) .arg("--config") .arg(cfg) diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 3d589c4..bce011b 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -3,4 +3,5 @@ 1. Custom refs on Gitea/Forgejo: supported on Forgejo 11, no fallback needed (see `phase0-spike.md`). Also confirmed on git.zenvairo.es (Gitea 1.25.4); mirror exclusion still to verify there. 2. Snapshots are auto-applied only when the target worktree is clean, has no unpushed commits and HEAD can fast-forward to the snapshot's base; otherwise declined and reported (implemented in `receive::apply_snapshot`). 3. Config: TOML for user intent (implemented); runtime state storage still open. -4-5. Open. +4. License: MIT (decided). +5. Final name: Grove (decided; binary `grove`, crates `grove-core` and `grove`). diff --git a/docs/phase1.md b/docs/phase1.md index a58b169..dc6fe0c 100644 --- a/docs/phase1.md +++ b/docs/phase1.md @@ -1,18 +1,18 @@ # Phase 1: core + CLI -Crates: `gitsync-core` (library) and `gitsync` (CLI). Everything shells out to the system `git`. +Crates: `grove-core` (library) and `grove` (CLI). Everything shells out to the system `git`. ## CLI | Command | What it does | |---|---| -| `gitsync status [path]` | State of every worktree (`Synced`, `Dirty`, `Ahead`, `Behind`, `BehindDirty`, `Diverged`, `Error`) | -| `gitsync snapshot [path]` | Snapshot the worktree into `refs/sync//` (local only) | -| `gitsync add ` | Migrate a plain clone to `.bare/` + one worktree per branch, in place | -| `gitsync sync [path] [--offline]` | One full pass (below) | -| `gitsync doctor` | Checks git, config, root, repo remotes and refspecs, inotify limit | +| `grove status [path]` | State of every worktree (`Synced`, `Dirty`, `Ahead`, `Behind`, `BehindDirty`, `Diverged`, `Error`) | +| `grove snapshot [path]` | Snapshot the worktree into `refs/sync//` (local only) | +| `grove add ` | Migrate a plain clone to `.bare/` + one worktree per branch, in place | +| `grove sync [path] [--offline]` | One full pass (below) | +| `grove doctor` | Checks git, config, root, repo remotes and refspecs, inotify limit | -Config: `~/.config/gitsync/config.toml` (or `--config`). Machine names are embedded in ref names, so +Config: `~/.config/grove/config.toml` (or `--config`). Machine names are embedded in ref names, so they may only contain letters, digits, `-` and `_`. ## Sync pass (`sync_repo`) @@ -50,7 +50,7 @@ they may only contain letters, digits, `-` and `_`. ## Known limitations - Nested untracked git repos are snapshotted only as gitlinks (their content is not synced). -- No crash-resume: a hard kill in the middle of `add` leaves `.gitsync-stage`; the error says where +- No crash-resume: a hard kill in the middle of `add` leaves `.grove-stage`; the error says where the files are, but recovery is manual (the backup tar and ref exist). - Machine-name uniqueness across machines is not enforced. - Split-index repos are untested. diff --git a/spikes/forgejo-up.sh b/spikes/forgejo-up.sh index 6c1e2af..302efa1 100755 --- a/spikes/forgejo-up.sh +++ b/spikes/forgejo-up.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # Start a throwaway Forgejo (dev only) on localhost:3300 with an admin user. set -euo pipefail -podman rm -f gitsync-forgejo >/dev/null 2>&1 || true -podman run -d --name gitsync-forgejo -p 3300:3000 \ +podman rm -f grove-forgejo >/dev/null 2>&1 || true +podman run -d --name grove-forgejo -p 3300:3000 \ -e FORGEJO__security__INSTALL_LOCK=true \ -e FORGEJO__server__ROOT_URL=http://localhost:3300/ \ -e FORGEJO__server__DISABLE_SSH=true \ @@ -10,5 +10,5 @@ podman run -d --name gitsync-forgejo -p 3300:3000 \ -e FORGEJO__mirror__ENABLED=true -e FORGEJO__migrations__ALLOW_LOCALNETWORKS=true -e FORGEJO__migrations__ALLOWED_DOMAINS=localhost \ codeberg.org/forgejo/forgejo:11 >/dev/null for i in $(seq 60); do curl -fs localhost:3300/api/healthz >/dev/null && break; sleep 1; done -podman exec --user git gitsync-forgejo forgejo admin user create --admin \ +podman exec --user git grove-forgejo forgejo admin user create --admin \ --username spike --password spike-pass-123 --email spike@example.invalid --must-change-password=false diff --git a/spikes/snapshot.sh b/spikes/snapshot.sh index 1fe9e4a..3e5887b 100755 --- a/spikes/snapshot.sh +++ b/spikes/snapshot.sh @@ -16,6 +16,6 @@ tree=$(git write-tree) prev=$(git rev-parse -q --verify "$ref" || true) if [ -n "$prev" ] && [ "$(git rev-parse "$prev^{tree}")" = "$tree" ]; then echo "unchanged $prev"; exit 0; fi parents=(-p HEAD); [ -n "$prev" ] && parents+=(-p "$prev") -commit=$(git commit-tree "$tree" "${parents[@]}" -m "gitsync snapshot $machine $(date -u +%FT%TZ)") +commit=$(git commit-tree "$tree" "${parents[@]}" -m "grove snapshot $machine $(date -u +%FT%TZ)") git update-ref "$ref" "$commit" echo "$commit"