source: lab/trunk/misc/git.cmd @ 211

Last change on this file since 211 was 211, checked in by mitty, 11 years ago
  • wrapper for git.exe
  • set %PROMPT% '$P (%BRANCH%) $G' while current directory is git repository
File size: 234 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 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.