patch-id.c: use strbuf instead of a fixed buffer