git-wad

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

commit 3cc05f446024ac5b7f648bb33cfc2d033e27af7b
parent 3544ac8520f181eaea8b0bbf932b4757121d201b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 24 Jun 2025 18:37:08 +0200

Fix the status sub-command

The subroutine that prints the hash of WAD files is based on a sed
command that was not POSIX-compliant, and therefore fails with some
shells. It executes a list of editing commands enclosed in braces. In
this case, the standard states that :

  "The <right-brace> shall be preceded by a <newline> or <semicolon>"

Neither a new line nor a semicolon preceded the right brace. Hence this
commit, which adds a semicolon before closing the list of editing
commands.

Diffstat:
Mgit-wad | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-wad b/git-wad @@ -136,7 +136,7 @@ wad_hashes() | git cat-file --batch-check \ | sed__ -n 's/\(^[a-z0-9]\{40\}\) blob [0-9]\{1,\}$/\1/p' \ | git cat-file --batch='%(objectname)' \ - | sed__ -n "/^[0-9a-z]\{40\}$/{N;s/^\([0-9a-z]\{40\}\)\n${wad_re}$/\1/p}" + | sed__ -n "/^[0-9a-z]\{40\}$/{N;s/^\([0-9a-z]\{40\}\)\n${wad_re}$/\1/p;}" } # List paths of WAD file from the current commit