File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ g_local_rc=
1515
1616g_cached_opt=
1717
18- gf_debug=
18+ gf_debug=0
1919gf_no_term=
2020gf_use_color=
2121
@@ -38,7 +38,7 @@ abspath () (
3838)
3939
4040debug () (
41- [ " $3 " != " --" ] && [ " $gf_debug " != 1 ] && return
41+ [ " $3 " != " --" ] && [ " $gf_debug " -eq 0 ] && return
4242 >&2 printf " [debug] %s @ %s:%d # " " $( basename " $0 " ) " " $1 " " $2 "
4343 shift 2
4444 >&2 echo " $@ "
@@ -50,7 +50,7 @@ pat_list_to_case () (
5050)
5151
5252rm_ () (
53- [ " $gf_debug " = 1 ] && return
53+ [ " $gf_debug " -eq 2 ] && return
5454 if [ " $1 " = " -d" ]; then
5555 shift
5656 rmdir " $@ "
@@ -277,10 +277,12 @@ git_changes_formatted () (
277277 diff_fmt=" $tempdir " /diff_fmt
278278 temp=" $tempdir " /temp
279279
280+ trap ' rm_ "$temp"' EXIT
281+
280282 if git diff -s " $cur_fmt " " $old_fmt " ; then
281283 merge --our " $cur " " $old " " $cur_fmt " > " $temp "
282- merge " $cur " " $temp " " $cur_fmt "
283- rm_ " $temp "
284+ merge " $cur " " $temp " " $cur_fmt " > " $diff_fmt "
285+ echo " $diff_fmt "
284286 return
285287 fi
286288
@@ -298,8 +300,6 @@ git_changes_formatted () (
298300 else
299301 rm_ " $diff_fmt "
300302 fi
301-
302- rm_ " $temp "
303303)
304304
305305git_diff () (
@@ -440,6 +440,9 @@ parse_options () {
440440 --debug)
441441 gf_debug=1
442442 ;;
443+ --debug=* )
444+ gf_debug=" ${1# --debug=} "
445+ ;;
443446 -c|--config)
444447 g_config=" $2 "
445448 if [ -z " $g_config " ]; then
You can’t perform that action at this time.
0 commit comments