`newgit pull` with no arguments updates every mounted tracker

Aperta
#345 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
git, rust
Ambito
backend, cli

Direzione di ricerca

Start with crates/newgit-core/src/manager.rs and trace how move_pin and follow_commit resolve and update pins. The proposal still leaves decisions open around trackers outside Git, upstream updates, and selecting specific trackers. Define those behaviors before implementation; done means a no-argument newgit pull updates eligible pins in one commit, reports when nothing moved, and preserves the stated branch and merge behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

An equivalent to nix flake update: one command that brings every mounted tracker up to date.

Proposal

newgit pull with no arguments (an error today) moves every mounted tracker's pin to its follow ref, in one commit, for example Update trackers: t3code (14 commits), ui-kit (2 commits). If nothing moved, it makes no commit and says so.

Not newgit pull *: the shell expands * into filenames first.

Branches

A pin is part of a commit, so the update belongs to the branch it ran on, as flake.lock does.

  • In an instance: the update lands on that instance's branch. main and other instances stay on their pins until it's merged.
  • In the project root: it lands on main, and git push publishes it.
  • Two instances that both update: the same pin merges clean, and if one is ahead, the merge takes the newer commit. Truly diverged pins are a real merge inside the tracker, as with any other, which fetches that tracker's history once.
  • Merging main into an instance brings the pins with it.

To decide

  1. Trackers outside Git have no pins, so updating them is a different operation (newgit tracker pull), and it can overwrite instance files. Suggested: leave them out at first; --outside-git could opt in later.
  2. Upstream: this moves pins to the tracker's main on the remote, not to what's newest on its GitHub repo. Suggested: for a tracker with a rooted export target (Spheroman/t3code), plain newgit pull first does what newgit pull --remote <target> does, since that's what "update" means to people. That's one more fetch per tracker.
  3. Selecting some: newgit pull t3code ui-kit is a natural extension.

Building it

It's mostly a loop over move_pin (crates/newgit-core/src/manager.rs) that makes one commit, not one per tracker, plus resolving the follow refs with follow_commit. A pin-only commit is dropped from a mirror that withholds the tracker, so this adds no noise to Spheroman/newgit.

🤖 Generated with Claude Code

Lingua principale
Rust
Stelle
0
Fork
0
Merge medio
7h 27m
PR unite (30g)
140

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Spheroman/newgit

Tutte le issue di Spheroman/newgit

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.