check status before merge v3

  * clean up some unused variables from git-cms-addpkg
  * limit the check of the local tree to the index (staged but not committed files)