Skip to content

Commit

Permalink
Make tig launchable from PoweShell/Command Prompt
Browse files Browse the repository at this point in the history
Signed-off-by: Chandra <chandrapratap3519@gmail.com>
  • Loading branch information
Chandra committed Dec 16, 2023
1 parent 1efd2fb commit b4dabf3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
8 changes: 5 additions & 3 deletions mingw-w64-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ source=("${_realname}"::"git+https://github.com/git-for-windows/git.git#tag=v$ta
'git-wrapper.rc'
'gitk.rc'
'compat-bash.rc'
'tig.rc'
'mingw-w64-git.mak'
'cv2pdb-strip'
'edit-git-bash.c')
Expand All @@ -68,7 +69,8 @@ sha256sums=('SKIP'
'db754d6fe6722ad54d43df15ee93b1d9cead406158ed84dcbf35e5b4225469ed'
'db754d6fe6722ad54d43df15ee93b1d9cead406158ed84dcbf35e5b4225469ed'
'cbed8b133eb9eec9972f146be5c3ff49db29b2fff8ab9c87a6d0c646c08a5128'
'f54dec5925a67c47d3b87a23cea6e370c3f38e61d3301860b725f29801c99bb0'
'fdd66694166c3e4d2ba4d79836b92bb8492f72e9842b36198392696fd1eb7b88'
'5618204ad488f053430131ab3b12b89e96bdff87856bbec4f27f8efa9f5c17dc'
'7413506c59d25621e475aa45447993748332c72cfbb4cf94cce6bee6f1218a09'
'6d83e1cb1acdb6eb1f2d5cb9299298e57680f5ca43d43c3e67c9da17f21b9b01')

Expand Down Expand Up @@ -176,7 +178,7 @@ build() {
git-bash.exe git-cmd.exe compat-bash.exe \
cmd/git.exe cmd/gitk.exe cmd/git-gui.exe \
cmd/git-receive-pack.exe cmd/git-upload-pack.exe \
edit-git-bash.exe &&
cmd/tig.exe edit-git-bash.exe &&
rm -f *.res &&

# Also build git-credential-wincred.exe before the rest, so that those
Expand Down Expand Up @@ -251,7 +253,7 @@ package_git () {
install -d -m755 $pkgdir/cmd
install -m755 cmd/git.exe cmd/gitk.exe cmd/git-gui.exe \
cmd/git-receive-pack.exe cmd/git-upload-pack.exe \
../start-ssh-agent.cmd ../start-ssh-pageant.cmd \
cmd/tig.exe ../start-ssh-agent.cmd ../start-ssh-pageant.cmd \
$pkgdir/cmd

# Scalar
Expand Down
11 changes: 7 additions & 4 deletions mingw-w64-git/mingw-w64-git.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ git-wrapper.o: %.o: ../%.c GIT-PREFIX
$(QUIET_CC)$(CC) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
-fno-stack-protector -o $*.o -c -Wall -Wwrite-strings $<

git-bash.res git-cmd.res git-wrapper.res gitk.res compat-bash.res: \
git-bash.res git-cmd.res git-wrapper.res gitk.res compat-bash.res tig.res: \
%.res: ../%.rc
$(QUIET_RC)$(RC) -i $< -o $@

Expand All @@ -18,7 +18,9 @@ git-bash.exe git-cmd.exe compat-bash.exe: %.exe: %.res

cmd/gitk.exe cmd/git-gui.exe: gitk.res

git-bash.exe git-cmd.exe compat-bash.exe \
cmd/tig.exe: tig.res

git-bash.exe git-cmd.exe compat-bash.exe cmd/tig.exe \
cmd/git.exe cmd/git-receive-pack.exe cmd/git-upload-pack.exe cmd/gitk.exe cmd/git-gui.exe: \
%.exe: git-wrapper.o git.res
@mkdir -p cmd
Expand All @@ -38,7 +40,8 @@ print-builtins:
strip-all: strip
$(STRIP) $(STRIP_OPTS) \
contrib/credential/wincred/git-credential-wincred.exe \
cmd/git{,-receive-pack,-upload-pack,-gui,k}.exe compat-bash.exe git-{bash,cmd,wrapper}.exe
cmd/git{,-receive-pack,-upload-pack,-gui,k}.exe \
cmd/tig.exe compat-bash.exe git-{bash,cmd,wrapper}.exe

install-pdbs:
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
Expand All @@ -57,7 +60,7 @@ ifeq (,$(SIGNTOOL))
else
@eval $(SIGNTOOL) $(filter %.exe,$(ALL_PROGRAMS)) \
contrib/credential/wincred/git-credential-wincred.exe git.exe \
cmd/git{,-gui,k}.exe compat-bash.exe git-{bash,cmd,wrapper}.exe
cmd/git{,-gui,k}.exe cmd/tig.exe compat-bash.exe git-{bash,cmd,wrapper}.exe
endif

install-mingit-busybox-test-artifacts:
Expand Down
4 changes: 4 additions & 0 deletions mingw-w64-git/tig.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
STRINGTABLE
BEGIN
0 """@@EXEPATH@@\\..\\usr\\bin\\tig.exe"""
END

0 comments on commit b4dabf3

Please sign in to comment.