Commit 9db428f4 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Revert "Tweak git bat template"

This reverts commit 4741a127.

Reason for revert: % is escaped improperly

Bug: 1067065

Original change's description:
> Tweak git bat template
> 
> This fixes some issues with escaping, namely carets. For example,
> without this patch, when HEAD^^1 is passed to batch script, it will
> forward HEAD1 to git. With this patch, it will be forwarded as HEAD^^1
> to git. There is still issue with HEAD^1 which seems not possible to fix
> with batch script as batch receives HEAD1.
> 
> R=​ehmaldonado@chromium.org
> 
> Change-Id: Ibb48ef06b4f17df374ee983eaa19ca43a706fa22
> Bug: 1065307
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2130635
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Auto-Submit: Josip Sokcevic <sokcevic@google.com>

TBR=ehmaldonado@chromium.org,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com

Change-Id: Ib46517010fd49621b758fc9594cbd90f7ff4e89a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1065307
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2133309Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
parent 87661afb
......@@ -2,19 +2,4 @@
setlocal
if not defined EDITOR set EDITOR=notepad
set PATH=%~dp0${GIT_BIN_RELDIR}\cmd;%~dp0;%PATH%
REM This hack tries to restore as many original arguments as possible
REM "HEAD^^1" is parsed correctly, but "HEAD^1" is still not.
REM TODO(crbug.com/1066663): Fix passing "HEAD^1" as argument.
call :RunGit "%*"
REM exit /b from call :RunGit won't be sent to the prompt.
if %ERRORLEVEL% NEQ 0 (
exit /b %ERRORLEVEL%
)
goto :eof
:RunGit
call "%~dp0${GIT_BIN_RELDIR}\${GIT_PROGRAM}" %~1
if %ERRORLEVEL% NEQ 0 (
exit /b %ERRORLEVEL%
)
"%~dp0${GIT_BIN_RELDIR}\${GIT_PROGRAM}" %*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment