You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Checks if the Git repository in the specified target folder needs an update by inspecting the modification time of
17
-
* a magic file.
19
+
* Checks if the Git repository in the specified target folder needs an update by inspecting the modification time of a magic file.
18
20
*
19
21
* @param repoUrl the git remote URL to clone from.
20
22
* @param branch the explicit name of the branch to checkout e.g. "main" or {@code null} to use the default branch.
21
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
22
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
23
-
* final folder that will contain the ".git" subfolder.
23
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
24
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
24
25
* @throws CliOfflineException if offline and cloning is needed.
* @param repoUrl the git remote URL to clone from.
32
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
33
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
34
-
* final folder that will contain the ".git" subfolder.
33
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
34
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
35
35
* @throws CliOfflineException if offline and cloning is needed.
* @param repoUrl the git remote URL to clone from.
46
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
47
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
48
-
* final folder that will contain the ".git" subfolder.
46
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
47
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
49
48
* @param branch the explicit name of the branch to checkout e.g. "main" or {@code null} to use the default branch.
50
49
* @throws CliOfflineException if offline and cloning is needed.
* @param repoUrl the git remote URL to clone from.
61
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
62
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
63
-
* final folder that will contain the ".git" subfolder.
60
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
61
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
64
62
* @param branch the explicit name of the branch to checkout e.g. "main" or {@code null} to use the default branch.
65
63
* @param remoteName the remote name e.g. origin.
66
64
* @throws CliOfflineException if offline and cloning is needed.
* @param gitRepoUrl the git remote URL to clone from.
74
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
75
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
76
-
* final folder that will contain the ".git" subfolder.
72
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
73
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
77
74
* @throws CliOfflineException if offline and cloning is needed.
* @param gitRepoUrl the git remote URL to clone from.
85
82
* @param branch the explicit name of the branch to checkout e.g. "main" or {@code null} to use the default branch.
86
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
87
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
88
-
* final folder that will contain the ".git" subfolder.
83
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
84
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
89
85
* @throws CliOfflineException if offline and cloning is needed.
* @param gitRepoUrl the {@link GitUrl} to use for the repository URL.
97
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
98
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the *
99
-
* final folder that will contain the ".git" subfolder.
93
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
94
+
* will by default create a sub-folder by default on clone but the * final folder that will contain the ".git" subfolder.
100
95
* @throws CliOfflineException if offline and cloning is needed.
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
108
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the *
109
-
* final folder that will contain the ".git" subfolder.
102
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
103
+
* will by default create a sub-folder by default on clone but the * final folder that will contain the ".git" subfolder.
110
104
*/
111
105
voidpull(PathtargetRepository);
112
106
113
107
/**
114
108
* Runs a git diff-index to detect local changes and if so reverts them via git reset.
115
109
*
116
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
117
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
118
-
* final folder that will contain the ".git" subfolder.
110
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
111
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
* Runs a git diff-index to detect local changes and if so reverts them via git reset.
127
120
*
128
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
129
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the
130
-
* final folder that will contain the ".git" subfolder.
121
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
122
+
* will by default create a sub-folder by default on clone but the final folder that will contain the ".git" subfolder.
131
123
* @param branch the explicit name of the branch to checkout e.g. "main" or {@code null} to use the default branch.
* Runs a git reset reverting all local changes to the git repository.
140
132
*
141
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
142
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the *
143
-
* final folder that will contain the ".git" subfolder.
133
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
134
+
* will by default create a sub-folder by default on clone but the * final folder that will contain the ".git" subfolder.
144
135
* @param branch the explicit name of the branch to checkout e.g. "main" or {@code null} to use the default branch.
145
136
* @param remoteName the name of the git remote e.g. "origin".
* Runs a git cleanup if untracked files were found.
151
142
*
152
-
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
153
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the *
154
-
* final folder that will contain the ".git" subfolder.
143
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
144
+
* will by default create a sub-folder by default on clone but the * final folder that will contain the ".git" subfolder.
155
145
*/
156
146
voidcleanup(PathtargetRepository);
157
147
148
+
/**
149
+
* Returns the URL of a git repository
150
+
*
151
+
* @param repository the {@link Path} to the folder where the git repository is located.
152
+
* @return the url of the repository as a {@link String}.
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled.
124
-
* It is not the parent directory where git will by default create a sub-folder by default on clone but the *
125
-
* final folder that will contain the ".git" subfolder.
122
+
* @param targetRepository the {@link Path} to the target folder where the git repository should be cloned or pulled. It is not the parent directory where git
123
+
* will by default create a sub-folder by default on clone but the * final folder that will contain the ".git" subfolder.
126
124
* @param result the {@link ProcessResult} to evaluate.
0 commit comments