The only thing that `imerge.default` is used for is to record the name of the incremental merge that is "active"; that is, if the users runs a `git imerge` without the `--name` parameter, then this is the name of the incremental merge that is affected by the command.  So there is only one `imerge.default` setting at any time, not one per imerge.

Otherwise, nothing has been stored in the configuration for imerges; instead, the rest of the state was recorded in the object database as commits and blobs and references.  The main information for an imerge is stored in a blob referred to by `refs/imerge/$NAME/state`.

If you want to store a command in the configuration as a string for the imerge named `name`, you need to do something like

    check_call(['git', 'config', 'imerge.%s.command' % (name,), command])

and to retrieve it again,

    command = check_output(['git', 'config', 'imerge.%s.command' % (name,)]).rstrip()

Hope that helps!