Merge branch 'rs/imap'
authorJunio C Hamano <gitster@pobox.com>
Wed, 20 Aug 2008 04:42:46 +0000 (21:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Aug 2008 04:42:46 +0000 (21:42 -0700)
* 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

1  2 
Makefile
git-compat-util.h
diff --combined Makefile
index 8b1829c9b557a2dd699a61359caa409860be2421,bb2a9882889f4ea2723b1bde2b0eda1010f39e8b..ad77a1dc81888b26f2d98be63a136bb8cb9c4bfa
+++ 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 1b40dbd5358ab3f1f947930daa1b8b4cfd4d5fe1,fbf791a63b95540b3dc9fc94e950acfdf10f12d6..6ee325546ec4ca1a9000d02ab2aee918e2a4efc2
  #include <iconv.h>
  #endif
  
+ #ifndef NO_OPENSSL
+ #include <openssl/ssl.h>
+ #include <openssl/err.h>
+ #endif
  /* On most systems <limits.h> 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))