From: Junio C Hamano Date: Wed, 20 Aug 2008 04:42:46 +0000 (-0700) Subject: Merge branch 'rs/imap' X-Git-Tag: v1.6.1-rc1~344 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c8a4cbc23916feeae89a7c59523781e8bf8ac103?hp=-c Merge branch 'rs/imap' * rs/imap: Documentation: Improve documentation for git-imap-send(1) imap-send.c: more style fixes imap-send.c: style fixes git-imap-send: Support SSL git-imap-send: Allow the program to be run from subdirectories of a git tree --- c8a4cbc23916feeae89a7c59523781e8bf8ac103 diff --combined Makefile index 8b1829c9b5,bb2a988288..ad77a1dc81 --- a/Makefile +++ b/Makefile @@@ -124,9 -124,6 +124,9 @@@ all: # Define USE_STDEV below if you want git to care about the underlying device # change being considered an inode change from the update-index perspective. # +# Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks +# field that counts the on-disk footprint in 512-byte blocks. +# # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8 # # Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72. @@@ -752,7 -749,6 +752,7 @@@ ifneq (,$(findstring MINGW,$(uname_S)) NO_SVN_TESTS = YesPlease NO_PERL_MAKEMAKER = YesPlease NO_POSIX_ONLY_PROGRAMS = YesPlease + NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1 COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" @@@ -867,9 -863,6 +867,9 @@@ endi ifdef NO_D_INO_IN_DIRENT BASIC_CFLAGS += -DNO_D_INO_IN_DIRENT endif +ifdef NO_ST_BLOCKS_IN_STRUCT_STAT + BASIC_CFLAGS += -DNO_ST_BLOCKS_IN_STRUCT_STAT +endif ifdef NO_C99_FORMAT BASIC_CFLAGS += -DNO_C99_FORMAT endif @@@ -1067,26 -1060,19 +1067,26 @@@ export TAR INSTALL DESTDIR SHELL_PAT ### Build rules -all:: $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS +SHELL = $(SHELL_PATH) + +all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS ifneq (,$X) - $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$p';) + $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$p' -ef '$p$X' || $(RM) '$p';) endif all:: ifndef NO_TCLTK - $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all + $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all endif $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) +please_set_SHELL_PATH_to_a_more_modern_shell: + @$$(:) + +shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell + strip: $(PROGRAMS) git$X $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X @@@ -1222,7 -1208,9 +1222,9 @@@ endi git-%$X: %.o $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) - git-imap-send$X: imap-send.o $(LIB_FILE) + git-imap-send$X: imap-send.o $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) http.o http-walker.o http-push.o transport.o: http.h @@@ -1376,10 -1364,7 +1378,10 @@@ endi cp "$$bindir/git$X" "$$execdir/git$X"; \ fi && \ { $(foreach p,$(BUILT_INS), $(RM) "$$execdir/$p" && ln "$$execdir/git$X" "$$execdir/$p" ;) } && \ - $(RM) "$$execdir/git$X" && \ + if test "z$$bindir" != "z$$execdir"; \ + then \ + $(RM) "$$execdir/git$X"; \ + fi && \ ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X" install-doc: @@@ -1469,7 -1454,6 +1471,7 @@@ endi $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS .PHONY: all install clean strip +.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS .PHONY: .FORCE-GIT-BUILD-OPTIONS diff --combined git-compat-util.h index 1b40dbd535,fbf791a63b..6ee325546e --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -99,6 -99,11 +99,11 @@@ #include #endif + #ifndef NO_OPENSSL + #include + #include + #endif + /* On most systems would have given us this, but * not on some systems (e.g. GNU/Hurd). */ @@@ -192,12 -197,6 +197,12 @@@ extern int git_munmap(void *start, size #endif /* NO_MMAP */ +#ifdef NO_ST_BLOCKS_IN_STRUCT_STAT +#define on_disk_bytes(st) ((st).st_size) +#else +#define on_disk_bytes(st) ((st).st_blocks * 512) +#endif + #define DEFAULT_PACKED_GIT_LIMIT \ ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))