Skip to content

Commit

Permalink
Merge pull request #405 from nicolaiskogheim/fix-filenames-with-spaces
Browse files Browse the repository at this point in the history
Make git effort not crash when passed file names with spaces
  • Loading branch information
hemanth committed Jul 29, 2015
2 parents 46db569 + 526fb77 commit 371dcdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/git-effort
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ color=
# get dates for the given <commit>
#
dates() {
eval "git log --pretty='format: %ad' --date=short $args_to_git_log "$1""
eval "git log --pretty='format: %ad' --date=short $args_to_git_log \"$1\""
}

#
Expand Down Expand Up @@ -60,7 +60,7 @@ color_for() {
effort() {
file=$1
local commit_dates
commit_dates=`dates $file`
commit_dates=`dates "$file"`
[ $? -gt 0 ] && exit 255

# Ensure it's not just an empty line
Expand All @@ -85,7 +85,7 @@ effort() {
i=$(($i+1))
done

msg=$(printf " \033[${color}m%s %-10d" $f_dot $commits)
msg=$(printf " \033[${color}m%s %-10d" "$f_dot" $commits)

# active days
active=`active_days "$commit_dates"`
Expand Down

0 comments on commit 371dcdf

Please sign in to comment.