Paul's Blog Google Summer of Code 2018

Week 12

Hello, everybody!

Since last week I started to work on converting git stash push. Yay. Bad news is that there are some problems with it. I hope I will solve them as soon as possible and come back with an update.

One of the problems I encountered and solved was very werid.

cmd_foo_1 &&
cmd_foo_2 &&
cmd_foo_3 &&
cmd_foo_4 &&
echo "Success!"
cmd_bar_1 || err="err"
cmd_bar_2 || err="err"
cmd_bar_3 || err="err"
cmd_bar_4 || err="err"
test -n $err && echo "Success!"

Both of these two code hunks displayed “Succes”, but only the second one worked properly. Briefly, this was caused because I did not pay attention to the way the memory was freed.