File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/main/java/com/symplegit/api Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 67
67
68
68
// Test all is OK:
69
69
if (gitCommander.isResponseOk()) {
70
- System.out.println("Branch " + branchName + " successfully created!");
70
+ System.out.println("Branch: " + branchName + " successfully created!");
71
71
}
72
72
else {
73
73
String error = gitCommander.getProcessError();
74
- System.out.println("Could not create branch: " +error);
74
+ System.out.println("Could not create branch: " + error);
75
75
}
76
76
77
77
// Example of output: Get the active branch name
78
78
gitCommander.executeGitCommand("git", "branch");
79
79
if (gitCommander.isResponseOk()) {
80
- System.out.println("Active Branch " + gitCommander.getProcessOutput());
80
+ System.out.println("Active Branch: " + gitCommander.getProcessOutput());
81
81
}
82
82
}
83
83
* </code>
Original file line number Diff line number Diff line change 19
19
*/
20
20
21
21
package com .symplegit .api ;
22
+
22
23
/**
23
24
* The GitWrapper interface defines the essential functionalities that a wrapper
24
25
* class for Git operations should implement. This interface ensures a
@@ -36,13 +37,15 @@ public interface GitWrapper {
36
37
* 0), false otherwise.
37
38
*/
38
39
public boolean isResponseOk ();
40
+
39
41
/**
40
42
* Retrieves the error message from the last executed Git command, if any.
41
43
*
42
44
* @return A String containing the error message from the last Git command
43
45
* execution. Returns null or an empty string if there was no error.
44
46
*/
45
47
public String getError ();
48
+
46
49
/**
47
50
* Gets the exception that was thrown during the last executed Git command, if
48
51
* any.
You can’t perform that action at this time.
0 commit comments