SShortSingh.
Back to feed

Shallow git fetch breaks self-updating installers after the first update

0
·1 views

A self-updater built on a depth-1 git clone fails once upstream adds new commits, because fetching with --depth 1 leaves the update's history unrelated to the installed clone. The author, an AI sysadmin at Pulsed Media, found the failure during an end-to-end test that mimicked a real user's install and update. The fix is to drop --depth from the update fetch, which keeps the clone shallow while letting fast-forward merges succeed. Existing installs can be repaired by deepening the clone or reinstalling, and the post also provides a regression test and a more robust update script that reports failures visibly. The article notes that local-path clones ignore --depth, so tests must use file:// URLs to reproduce the bug accurately.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Kapitan generator releases published to kadet-hub, 12 to 18 October 2026

Between 12 and 18 October 2026, new versions of numerous Kapitan generators were published to kadet-hub, each passing through the gate and signed. Each generator page now shows the output diff against the prior version, its SBOM, and the command used to verify it. Several generators are new to the hub, including cloudnative-pg, crossplane, flux, kind, and talos, while many existing ones such as argocd, calico, cilium, and kubernetes received incremental updates. Most releases note that rendered output is unchanged, and several add CRD schemas so the gate can dry-run them against a kube-apiserver. Some changes also alter behaviour, such as Calico namespace handling and a new compile-time check rejecting metadata names longer than 63 characters.

0
ProgrammingDEV Community ·

Corami keeps a synced project copy on laptop and server so coding agents can work remotely

The author describes a workflow where a coding agent runs on a server while the developer edits and reviews on a laptop. Corami maintains a normal project directory on both machines, synchronized in both directions with Mutagen over Tailscale SSH, so local builds, editors and caches work without a network filesystem. Uncommitted work travels between the machines, and the agent's edits return to the same folder for review with git diff. Developers can run a dev server on the server with a stable HTTPS address reachable within their tailnet, and commands run on the server require an approval dialog. The article also lists limitations, including conflicts with concurrent git operations, unsuitability for large binaries, and sync stopping on unsafe merges.

0
ProgrammingDEV Community ·

Isolating Rule Panics with catch_unwind to Keep Cloud Scans Running

A cloud cost analyzer runs 92 independent rules during each scan, and each rule depends on third-party libraries that could panic on unexpected input. The author argues that Result handles anticipated failures, but panics from unforeseen bugs in dependencies need a separate safeguard. Using std::panic::catch_unwind, each rule's evaluation is wrapped so a panic is logged with its rule and resource IDs and yields no finding, while the scan continues. The approach requires AssertUnwindSafe, justified because the partial state after a panic is discarded rather than read. The technique also depends on panics unwinding, which is disabled under panic = "abort" in release profiles.

0
ProgrammingDEV Community ·

EEPROM Flasher Brings TL866 and T48/T56 Chip Programming to Android Without Root

An open-source Android app called EEPROM Flasher lets users program chips with TL866, T48, and T56 universal programmers over USB-OTG without root access. It uses a custom JNI bridge that passes the USB file descriptor from the Android USB Host API to a native libusb layer running the minipro engine. Features include automatic chip detection, a pinout viewer for multiple socket types, a hex viewer with binary diff comparison, and Storage Access Framework support for saving and loading dumps. The developer has published the code on GitHub, where feedback and chip testing on T48 and T56 hardware are requested.

Shallow git fetch breaks self-updating installers after the first update · ShortSingh