How about an incremental approach like this? On top of 1/1. [PATCH 01/10] Allow resolve_ref() caller to decide whether to receive static buffer [PATCH 02/10] cmd_merge: convert to single exit point [PATCH 03/10] merge: do not point "branch" to a resolve_ref()'s static buffer [PATCH 04/10] commit: move resolve_ref() closer to where the return value is used [PATCH 05/10] checkout: do not try xstrdup() on NULL [PATCH 06/10] reflog-walk.c: request allocated buffer from resolve_ref() [PATCH 07/10] receive-pack: request resolve_ref() to allocate new buffer [PATCH 08/10] notes: request resolve_ref() to allocate new buffer [PATCH 09/10] fmt-merge-msg: request resolve_ref() to allocate new buffer [PATCH 10/10] branch: request resolve_ref() to allocate new buffer -- 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