*
* @param filePattern the file pattern
*/
public void add(String filePattern) {
AddCommand add = git.add();
DirCache cache;
try {
cache = add.addFilepattern(filePattern).call();
updateCache(cache);
} catch (NoFilepatternException e) {
throw new IllegalStateException("Unable to add file to the Git cache", e);
} catch (IOException e) {
throw new IllegalStateException("Unable to add file to the Git cache", e);