Skip to content

Commit ade2ca0

Browse files
sschuberthgitster
authored andcommitted
Do not try to remove directories when removing old links
When building Git with MSVC on Windows, directories named after the Git alias are created for the output files, e.g. there is a "git-merge-index" directory next to the "git-merge-index.exe" executable in the build root. Previously, "make all" just checked if "git-merge-index" and "git-merge-index.exe" are the same file, and if not, tried to remove "git-merge-index". This fails in the case of "git-merge-index" being a directory, which is why this is checked now. Signed-off-by: Sebastian Schuberth <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6c0efa2 commit ade2ca0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ SHELL = $(SHELL_PATH)
13751375

13761376
all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
13771377
ifneq (,$X)
1378-
$(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$p' -ef '$p$X' || $(RM) '$p';)
1378+
$(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
13791379
endif
13801380

13811381
all::

0 commit comments

Comments
 (0)