Skip to content

Commit 9dbc3e2

Browse files
jeffhostetlerdscho
authored andcommitted
Merge first wave of gvfs-helper feature
Includes commits from these pull requests: #191 #205 #206 #207 #208 #215 #220 #221 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
2 parents b7ba204 + 891123a commit 9dbc3e2

31 files changed

+7310
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
/git-gc
7878
/git-get-tar-commit-id
7979
/git-grep
80+
/git-gvfs-helper
8081
/git-hash-object
8182
/git-help
8283
/git-hook

Documentation/config.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ include::config/gui.adoc[]
449449

450450
include::config/guitool.adoc[]
451451

452+
include::config/gvfs.adoc[]
453+
452454
include::config/help.adoc[]
453455

454456
include::config/http.adoc[]

Documentation/config/core.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,9 @@ core.gvfs::
811811
flag just blocks them from occurring at all.
812812
--
813813

814+
core.useGvfsHelper::
815+
TODO
816+
814817
core.sparseCheckout::
815818
Enable "sparse checkout" feature. See linkgit:git-sparse-checkout[1]
816819
for more information.

Documentation/config/gvfs.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
gvfs.cache-server::
2+
TODO
3+
4+
gvfs.sharedcache::
5+
TODO

Documentation/lint-manpages.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ check_missing_docs () (
2727
git-init-db) continue;;
2828
git-remote-*) continue;;
2929
git-stage) continue;;
30+
git-gvfs-helper) continue;;
3031
git-legacy-*) continue;;
3132
git-?*--?* ) continue ;;
3233
esac

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ LIB_OBJS += gpg-interface.o
11631163
LIB_OBJS += graph.o
11641164
LIB_OBJS += grep.o
11651165
LIB_OBJS += gvfs.o
1166+
LIB_OBJS += gvfs-helper-client.o
11661167
LIB_OBJS += hash-lookup.o
11671168
LIB_OBJS += hash.o
11681169
LIB_OBJS += hashmap.o
@@ -1770,6 +1771,9 @@ endif
17701771
endif
17711772
BASIC_CFLAGS += $(CURL_CFLAGS)
17721773

1774+
PROGRAM_OBJS += gvfs-helper.o
1775+
TEST_PROGRAMS_NEED_X += test-gvfs-protocol
1776+
17731777
REMOTE_CURL_PRIMARY = git-remote-http$X
17741778
REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
17751779
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
@@ -3026,6 +3030,10 @@ scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
30263030
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
30273031
$(filter %.o,$^) $(LIBS)
30283032

3033+
git-gvfs-helper$X: gvfs-helper.o http.o GIT-LDFLAGS $(GITLIBS) $(LAZYLOAD_LIBCURL_OBJ)
3034+
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
3035+
$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
3036+
30293037
$(LIB_FILE): $(LIB_OBJS)
30303038
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
30313039

bin-wrappers/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
/git-upload-pack
77
/scalar
88
/test-fake-ssh
9+
/test-gvfs-protocol
910
/test-tool

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
894894
if (startup_info->have_repository) {
895895
read_lock();
896896
collision_test_needed = odb_has_object(the_repository->objects, oid,
897-
HAS_OBJECT_FETCH_PROMISOR);
897+
OBJECT_INFO_FOR_PREFETCH);
898898
read_unlock();
899899
}
900900

config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "trace2.h"
3838
#include "wildmatch.h"
3939
#include "write-or-die.h"
40+
#include "transport.h"
4041

4142
struct config_source {
4243
struct config_source *prev;

contrib/buildsystems/CMakeLists.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ if(NOT CURL_FOUND)
635635
add_compile_definitions(NO_CURL)
636636
message(WARNING "git-http-push and git-http-fetch will not be built")
637637
else()
638-
list(APPEND PROGRAMS_BUILT git-http-fetch git-http-push git-imap-send git-remote-http)
638+
list(APPEND PROGRAMS_BUILT git-http-fetch git-http-push git-imap-send git-remote-http git-gvfs-helper)
639639
if(CURL_VERSION_STRING VERSION_GREATER_EQUAL 7.34.0)
640640
add_compile_definitions(USE_CURL_FOR_IMAP_SEND)
641641
endif()
@@ -811,6 +811,9 @@ if(CURL_FOUND)
811811
add_executable(git-http-push ${CMAKE_SOURCE_DIR}/http-push.c)
812812
target_link_libraries(git-http-push http_obj common-main ${CURL_LIBRARIES} ${EXPAT_LIBRARIES})
813813
endif()
814+
815+
add_executable(git-gvfs-helper ${CMAKE_SOURCE_DIR}/gvfs-helper.c)
816+
target_link_libraries(git-gvfs-helper http_obj common-main ${CURL_LIBRARIES} )
814817
endif()
815818

816819
parse_makefile_for_executables(git_builtin_extra "BUILT_INS")
@@ -1110,6 +1113,20 @@ set(wrapper_scripts
11101113
set(wrapper_test_scripts
11111114
test-fake-ssh test-tool)
11121115

1116+
if(CURL_FOUND)
1117+
list(APPEND wrapper_test_scripts test-gvfs-protocol)
1118+
1119+
add_executable(test-gvfs-protocol ${CMAKE_SOURCE_DIR}/t/helper/test-gvfs-protocol.c)
1120+
target_link_libraries(test-gvfs-protocol common-main)
1121+
1122+
if(MSVC)
1123+
set_target_properties(test-gvfs-protocol
1124+
PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/t/helper)
1125+
set_target_properties(test-gvfs-protocol
1126+
PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/t/helper)
1127+
endif()
1128+
endif()
1129+
11131130

11141131
foreach(script ${wrapper_scripts})
11151132
file(STRINGS ${CMAKE_SOURCE_DIR}/bin-wrappers/wrap-for-bin.sh content NEWLINE_CONSUME)

0 commit comments

Comments
 (0)