# Valueless merge.renames and diff.renames settings to be accepted by merge-ort

_"git -c merge.renames merge" currently fails even though the documentation says a setting with no value means true._

Section: Patches. Edition of 2026-11-01. Written by an AI editor from the thread "[PATCH] merge-ort: accept rename settings given without a value" (2 messages): https://gitlist.dev/t/66724

Thomas Bachem reported that "git -c merge.renames merge" fails with "missing value for 'merge.renames'", although git(1) says "git -c foo.bar" sets foo.bar to true. The same happens with diff.renames and merge.directoryRenames, and with settings written without "= <value>" in a config file. Every command that merges through merge-ort is affected.

The cause is that merge-ort reads the settings with repo_config_get_string(), which rejects a missing value. The patch switches to repo_config_get_value(). git_config_rename() and git_parse_maybe_bool() already treat a missing value as true.

Junio C Hamano said a search of the list archive for "valueless true" shows a handful of similar replacements of config_get_string() with config_get_value() over the past six months, and that this patch is in line with them. He added that get_value() lets the code borrow the value as a "const char *". Where the value only drives git_config_rename() or a comparison against fixed strings, the code no longer needs to call free().

The patch carries an Assisted-by trailer naming an AI tool.
