git-wad

Manage files via git but not their content
git clone git://git.meso-star.com/git-wad.git
Log | Files | Refs | README | LICENSE

commit 66cde9a93398aded956bed1c61449f030a50ebce
parent 79c1d2a2bee2fc11c9d25c952296e509196f1f1b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Sat, 23 May 2026 14:40:00 +0200

Fix for the "checkout" when files are being deleted

The files listed in the git index were expected to be present on the
disk and were therefore checked for restoration. However, they may have
been deleted and no longer exist.

Diffstat:
Mgit-wad | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/git-wad b/git-wad @@ -566,6 +566,14 @@ checkout() git ls-files -z "${working_tree}" \ | tr__ '\0' '\n' \ | while read -r i; do + + # Do not attempt to restore a file that does not exist. This can + # happen in a repository where files have been deleted but the + # deletions have not yet been committed. + if [ ! -e "${i}" ]; then + continue + fi + # Search for the git-wad header only in the first few bytes of the # file to avoid unnecessarily processing all of the data; the # git-wad header appears at the very beginning of the file, and once