batchfetch 1.0.3__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {batchfetch-1.0.3/batchfetch.egg-info → batchfetch-1.0.4}/PKG-INFO +1 -1
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch/batchfetch_base.py +1 -1
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch/batchfetch_git.py +27 -7
- {batchfetch-1.0.3 → batchfetch-1.0.4/batchfetch.egg-info}/PKG-INFO +1 -1
- {batchfetch-1.0.3 → batchfetch-1.0.4}/setup.py +1 -1
- {batchfetch-1.0.3 → batchfetch-1.0.4}/.gitignore +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/LICENSE +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/README.md +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch/__init__.py +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch/batchfetch_cli.py +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch/helpers.py +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch.egg-info/SOURCES.txt +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch.egg-info/dependency_links.txt +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch.egg-info/entry_points.txt +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch.egg-info/requires.txt +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/batchfetch.egg-info/top_level.txt +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/run_tests.sh +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/setup.cfg +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/tests/data/test-md5sum.txt +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/tests/data/test-run_simple.sh +0 -0
- {batchfetch-1.0.3 → batchfetch-1.0.4}/tests/test_helpers.py +0 -0
|
@@ -209,16 +209,19 @@ class BatchFetchGit(BatchFetchBase):
|
|
|
209
209
|
try:
|
|
210
210
|
self._git_tags(self["branch"])
|
|
211
211
|
except GitBranchDoesNotExist:
|
|
212
|
-
|
|
212
|
+
pass
|
|
213
213
|
else:
|
|
214
214
|
# The branch exists
|
|
215
|
-
ignore_git_pull = True
|
|
216
215
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
216
|
+
# Ignore Git pull when the git reference is the same
|
|
217
|
+
commit_ref = self._git_ref(cwd=self.git_local_dir)
|
|
218
|
+
if (self.current_branch and
|
|
219
|
+
(commit_ref == self["branch"] or
|
|
220
|
+
self.current_branch == self["branch"])):
|
|
221
|
+
ignore_git_pull = True
|
|
222
|
+
# Ignore Git pull if it is not a local branch
|
|
223
|
+
elif not self._git_is_local_branch(self["branch"]):
|
|
224
|
+
ignore_git_pull = True
|
|
222
225
|
|
|
223
226
|
if ignore_git_pull:
|
|
224
227
|
self.add_output(self.indent_spaces +
|
|
@@ -244,6 +247,23 @@ class BatchFetchGit(BatchFetchBase):
|
|
|
244
247
|
|
|
245
248
|
return git_merge
|
|
246
249
|
|
|
250
|
+
def _git_is_local_branch(self, branch: str) -> bool:
|
|
251
|
+
try:
|
|
252
|
+
stdout, _ = run_simple(["git", "rev-parse", "--symbolic-full-name",
|
|
253
|
+
branch], env=self.env,
|
|
254
|
+
cwd=self.git_local_dir)
|
|
255
|
+
if not stdout:
|
|
256
|
+
return False
|
|
257
|
+
|
|
258
|
+
full_branch_name = stdout[0].strip()
|
|
259
|
+
|
|
260
|
+
if full_branch_name.startswith("refs/heads/"):
|
|
261
|
+
return True
|
|
262
|
+
except subprocess.CalledProcessError:
|
|
263
|
+
pass
|
|
264
|
+
|
|
265
|
+
return False
|
|
266
|
+
|
|
247
267
|
def _git_tags(self, branch: str) -> List[str]:
|
|
248
268
|
stdout: List[str] = []
|
|
249
269
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|