summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--git_command.py15
-rw-r--r--project.py13
2 files changed, 22 insertions, 6 deletions
diff --git a/git_command.py b/git_command.py
index 1ec7c3ed..55216b1c 100644
--- a/git_command.py
+++ b/git_command.py
@@ -313,12 +313,15 @@ class GitCommand:
313 cwd = None 313 cwd = None
314 command_name = cmdv[0] 314 command_name = cmdv[0]
315 command.append(command_name) 315 command.append(command_name)
316 # Need to use the --progress flag for fetch/clone so output will be 316
317 # displayed as by default git only does progress output if stderr is a 317 if command_name in ("fetch", "clone"):
318 # TTY. 318 env["GIT_TERMINAL_PROMPT"] = "0"
319 if sys.stderr.isatty() and command_name in ("fetch", "clone"): 319 # Need to use the --progress flag for fetch/clone so output will be
320 if "--progress" not in cmdv and "--quiet" not in cmdv: 320 # displayed as by default git only does progress output if stderr is
321 command.append("--progress") 321 # a TTY.
322 if sys.stderr.isatty():
323 if "--progress" not in cmdv and "--quiet" not in cmdv:
324 command.append("--progress")
322 command.extend(cmdv[1:]) 325 command.extend(cmdv[1:])
323 326
324 event_log = ( 327 event_log = (
diff --git a/project.py b/project.py
index dda01331..b281863b 100644
--- a/project.py
+++ b/project.py
@@ -2697,6 +2697,19 @@ class Project:
2697 ) 2697 )
2698 # Continue right away so we don't sleep as we shouldn't need to. 2698 # Continue right away so we don't sleep as we shouldn't need to.
2699 continue 2699 continue
2700 elif (
2701 ret == 128
2702 and gitcmd.stdout
2703 and "fatal: could not read Username" in gitcmd.stdout
2704 ):
2705 # User needs to be authenticated, and Git wants to prompt for
2706 # username and password.
2707 print(
2708 "git requires authentication, but repo cannot perform "
2709 "interactive authentication. Check git credentials.",
2710 file=output_redir,
2711 )
2712 break
2700 elif current_branch_only and is_sha1 and ret == 128: 2713 elif current_branch_only and is_sha1 and ret == 128:
2701 # Exit code 128 means "couldn't find the ref you asked for"; if 2714 # Exit code 128 means "couldn't find the ref you asked for"; if
2702 # we're in sha1 mode, we just tried sync'ing from the upstream 2715 # we're in sha1 mode, we just tried sync'ing from the upstream