modify index,refer to /plugin/git/index