Now quite sure why this is a `strcmp` - do you just want to determine if `tdir` is using the value from `template_buf`? If so, I think just a simple `tdir == template_buf.ptr` is what you're looking for. Since `git_buf_free` and `git_config_free` will both work correctly on empty values, I think you can just call them without an `if` and just focus on "if there was an error and `tdir == template_buf.ptr` then fall back on the internal template" logic.