Commit merge function