builder.addParentId(indexCommit);
builder.setMessage(MessageFormat.format(
workingDirectoryMessage, branch,
headCommit.abbreviate(7).name(),
headCommit.getShortMessage()));
builder.setTreeId(cache.writeTree(inserter));
commitId = inserter.insert(builder);
inserter.flush();
updateStashRef(commitId, builder.getAuthor(),
builder.getMessage());