Charles Bailey, 02.04.2009: > On Thu, Apr 02, 2009 at 12:54:22AM +0200, Markus Heidelberg wrote: > > David Aguilar, 01.04.2009: > > > + present=false > > > + base_present && > > > + present=true > > > + > > > + run_mergetool "$merge_tool" "$present" > > > + status=$? > > > > This last line has to be deleted, because the variable 'status' set in > > run_mergetool would be overwritten then. In this case the merge will > > succeed even if it didn't and the file will be staged. > > I think that it would be better if $status stayed as local as > possible. If run_mergetool returned the value of $status as its exit > code then the function will properly return whether the merge > succeeded or not. > > This way run_mergetool's clients can just use its exit code, without > having to know about a magic $status global variable. Sure. Next time I have to think about the right solution before spreading workarounds. And shouldn't also check_unchanged() move from git-mergetool.sh to git-mergetool--lib.sh, since it is only used there? Huh, it seems as if some editors for difftool cannot work correctly currently, because this function is used, but defined in git-mergetool.sh. Markus -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html