Skip to content

Commit dba9971

Browse files
authored
Merge pull request #773 from jeffhostetler/vs2015
Build with VS2015
2 parents 6a6c0e8 + c0abeba commit dba9971

17 files changed

+921
-24
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@
218218
*.user
219219
*.idb
220220
*.pdb
221+
*.ilk
222+
.vs/
221223
/Debug/
222224
/Release/
223225
/.vagrant/

Makefile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ endif
10081008

10091009
ifdef SANE_TOOL_PATH
10101010
SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH))
1011-
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
1011+
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"|'
10121012
PATH := $(SANE_TOOL_PATH):${PATH}
10131013
else
10141014
BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
@@ -2353,6 +2353,28 @@ install: all
23532353
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
23542354
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
23552355
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
2356+
ifdef MSVC
2357+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2358+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2359+
# We DO NOT install the individual foo.o.pdb files because they
2360+
# have already been rolled up into the exe's pdb file.
2361+
# We DO NOT have pdb files for the builtin commands (like git-status.exe)
2362+
# because it is just a copy/hardlink of git.exe, rather than a unique binary.
2363+
$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2364+
$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2365+
$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2366+
$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2367+
$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2368+
$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2369+
$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2370+
$(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2371+
$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2372+
$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2373+
$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2374+
$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2375+
$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2376+
$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2377+
endif
23562378
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
23572379
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
23582380
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'

cache-tree.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#include "tree-walk.h"
55
#include "cache-tree.h"
66

7-
#ifndef DEBUG
8-
#define DEBUG 0
7+
#ifndef DEBUG_CACHE_TREE
8+
#define DEBUG_CACHE_TREE 0
99
#endif
1010

1111
struct cache_tree *cache_tree(void)
@@ -110,7 +110,7 @@ static int do_invalidate_path(struct cache_tree *it, const char *path)
110110
int namelen;
111111
struct cache_tree_sub *down;
112112

113-
#if DEBUG
113+
#if DEBUG_CACHE_TREE
114114
fprintf(stderr, "cache-tree invalidate <%s>\n", path);
115115
#endif
116116

@@ -392,7 +392,7 @@ static int update_one(struct cache_tree *it,
392392
strbuf_addf(&buffer, "%o %.*s%c", mode, entlen, path + baselen, '\0');
393393
strbuf_add(&buffer, sha1, 20);
394394

395-
#if DEBUG
395+
#if DEBUG_CACHE_TREE
396396
fprintf(stderr, "cache-tree update-one %o %.*s\n",
397397
mode, entlen, path + baselen);
398398
#endif
@@ -414,7 +414,7 @@ static int update_one(struct cache_tree *it,
414414

415415
strbuf_release(&buffer);
416416
it->entry_count = to_invalidate ? -1 : i - *skip_count;
417-
#if DEBUG
417+
#if DEBUG_CACHE_TREE
418418
fprintf(stderr, "cache-tree update-one (%d ent, %d subtree) %s\n",
419419
it->entry_count, it->subtree_nr,
420420
sha1_to_hex(it->sha1));
@@ -453,7 +453,7 @@ static void write_one(struct strbuf *buffer, struct cache_tree *it,
453453
strbuf_add(buffer, path, pathlen);
454454
strbuf_addf(buffer, "%c%d %d\n", 0, it->entry_count, it->subtree_nr);
455455

456-
#if DEBUG
456+
#if DEBUG_CACHE_TREE
457457
if (0 <= it->entry_count)
458458
fprintf(stderr, "cache-tree <%.*s> (%d ent, %d subtree) %s\n",
459459
pathlen, path, it->entry_count, it->subtree_nr,
@@ -526,7 +526,7 @@ static struct cache_tree *read_one(const char **buffer, unsigned long *size_p)
526526
size -= 20;
527527
}
528528

529-
#if DEBUG
529+
#if DEBUG_CACHE_TREE
530530
if (0 <= it->entry_count)
531531
fprintf(stderr, "cache-tree <%s> (%d ent, %d subtree) %s\n",
532532
*buffer, it->entry_count, subtree_nr,

0 commit comments

Comments
 (0)