ロジック実装

This commit is contained in:
r-ca 2023-12-16 14:23:44 +09:00
parent 132991122f
commit 3d7fbf8a95
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -71,16 +71,31 @@ public class ActionRepoImpl implements ActionRepo{
@Override @Override
public void stageFile(String path) { public void stageFile(String path) {
Git git = getGit();
try {
git.add().addFilepattern(path).call();
} catch (Exception e) { // TODO-rca: エラーハンドリング
logger.error(TAG, "stageFile: " + e.getMessage());
}
} }
@Override @Override
public void unstageFile(String path) { public void unstageFile(String path) {
Git git = getGit();
try {
git.reset().addPath(path).call();
} catch (Exception e) { // TODO-rca: エラーハンドリング
logger.error(TAG, "unstageFile: " + e.getMessage());
}
} }
@Override @Override
public void commit(String message) { public void commit(String message) {
Git git = getGit();
try {
git.commit().setMessage(message).call();
} catch (Exception e) { // TODO-rca: エラーハンドリング
logger.error(TAG, "commit: " + e.getMessage());
}
} }
} }