mirror of
https://github.com/tj/git-extras.git
synced 2026-09-12 08:26:17 -04:00
quote mod_s and git_s integer vars
This commit is contained in:
parent
311edadd55
commit
42fd8a9e72
|
|
@ -18,8 +18,8 @@ if [ "$1" = "--touch" ]; then
|
|||
for f; do
|
||||
git_s=$(git --no-pager log --no-renames --pretty=format:%ct -1 @ -- "$f" 2>/dev/null)
|
||||
mod_s=$(stat $stat_flags "$f" 2>/dev/null)
|
||||
if [ -n "$git_s" ] && [ -n "$mod_s" ] && [ $mod_s -ne $git_s ]; then
|
||||
if [ $mod_s -gt $git_s ] || [ ! -n "$newer_flag" ]; then
|
||||
if [ -n "$git_s" ] && [ -n "$mod_s" ] && [ "$mod_s" -ne "$git_s" ]; then
|
||||
if [ "$mod_s" -gt "$git_s" ] || [ ! -n "$newer_flag" ]; then
|
||||
t=$(date $date_flags$git_s '+%Y%m%d%H%M.%S')
|
||||
echo "+ touch -h -t $t $f" >&2
|
||||
touch -h -t "$t" "$f"
|
||||
|
|
|
|||
Loading…
Reference in a new issue