Commit 4bd1fb89 authored by Michal Sojka's avatar Michal Sojka

Properly reindent the code

Store the whole match pattern in a variable so that Emacs indenting
code is not confused.
parent 29d4be72
......@@ -45,7 +45,7 @@ if [ -z "$glob" ]; then glob='*/ae|*/auto_evaluation'; fi
handle_commit() {
local commit=${1:?}
local branch=${2:?}
local glob=${3:?}
local glob="+(${3:?})"
new_tree=$(
git ls-tree -r -d "$commit" | tac | \
......@@ -54,7 +54,7 @@ handle_commit() {
while read -r mode type hash path; do
path="./$path"
case "$path" in
+($glob))
$glob)
upper_path="${path%/*}"
trees[$upper_path]+="$(echo -e "$mode tree $hash\t${path##*/}")"$'\n'
;;
......@@ -64,8 +64,8 @@ handle_commit() {
trees[$upper_path]+="$(echo -e "040000 tree $new_hash\t${path##*/}")"$'\n'
;;
esac
done
echo -n "${trees[.]}" | git mktree ))
done
echo -n "${trees[.]}" | git mktree ))
local ae=$(git rev-parse --verify --quiet "refs/heads/$branch") || :
if [ -z "$ae" ] || ! git diff-tree --quiet $ae $new_tree; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment