source: lab.git/misc/git.cmd @ 682d2d9

Last change on this file since 682d2d9 was a696331, checked in by mitty <mitty@…>, 12 years ago
  • fix: use 'git branch' in for loop causes infinity loop of forking cmd.exe

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@212 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

  • Property mode set to 100644
File size: 238 bytes
Line 
1@echo off
2
3set DEFAULT=$P$G
4
5git.exe %*
6
7
8git.exe branch > NUL 2>&1
9if %ERRORLEVEL% EQU 128 goto norepos
10
11
12for /f "tokens=2" %%i in ('git.exe branch') do set BRANCH=%%i
13prompt $P (%BRANCH%) $G
14
15goto end
16
17
18:norepos
19prompt %DEFAULT%
20
21
22:end
Note: See TracBrowser for help on using the repository browser.