Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4e0dd91e6d
Fetching contributors…

Cannot retrieve contributors at this time

executable file 18 lines (15 sloc) 0.583 kB
#!/bin/sh
# git-restore-dirs
# File ID: 14434f48-6be7-11df-904a-90e6ba3022ac
# Restore empty directories created by git-store-dirs(1)
tmppref=$(date -u +"%Y%m%dT%H%M%SZ").$$
bef_file=/tmp/grd.$tmppref.before.tmp
aft_file=/tmp/grd.$tmppref.after.tmp
dirfile=.emptydirs
test -d .git/. || { echo $0: Has to be run from the toplevel of the working tree >&2; exit 1; }
test -e $dirfile || { echo $0: No $dirfile file found >&2; exit 1; }
emptydirs >$bef_file
xargs -0 mkdir -p <$dirfile
emptydirs >$aft_file
diff -u $bef_file $aft_file | grep '^+\./' | cut -c 2-
rm $bef_file $aft_file
Jump to Line
Something went wrong with that request. Please try again.