Merge with master.kernel.org:/pub/scm/git/git.git
authorPeter Anvin <hpa@tazenda.sc.orionmulti.com>
Mon, 3 Oct 2005 19:04:44 +0000 (12:04 -0700)
committerPeter Anvin <hpa@tazenda.sc.orionmulti.com>
Mon, 3 Oct 2005 19:04:44 +0000 (12:04 -0700)
1  2 
.gitignore
Makefile
git.sh
diff --combined .gitignore
index b99a37e9ba7b7485787f12e2f2e96cefe5c20637,e90e2c350371b4fdf865f2d63935b3681f09648f..d190c0ad072e61a550aa8d386ef42fc9c3625cb6
@@@ -82,6 -82,7 +82,7 @@@ git-ssh-pus
  git-ssh-upload
  git-status
  git-stripspace
+ git-symbolic-ref
  git-tag
  git-tar-tree
  git-unpack-file
@@@ -100,4 -101,3 +101,4 @@@ git-core-*/?
  *.dsc
  *.deb
  git-core.spec
 +*.exe
diff --combined Makefile
index 38330c2e90e0e19f5a00945d5a4c4bf19008c676,25fd5cde868fa85dfb4f27bc671f88187b918913..4ea6d9a71b55f74b4f0ffe261dc1cc6f0a28fc9b
+++ b/Makefile
@@@ -29,8 -29,6 +29,8 @@@
  #
  # Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
  #
 +# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
 +#
  # Define COLLISION_CHECK below if you believe that SHA1's
  # 1461501637330902918203684832716283019655932542976 hashes do not give you
  # sufficient guarantee that no collisions between objects will ever happen.
@@@ -50,7 -48,7 +50,7 @@@
  
  # DEFINES += -DUSE_STDEV
  
- GIT_VERSION = 0.99.7.GIT
+ GIT_VERSION = 0.99.8.GIT
  
  CFLAGS = -g -O2 -Wall
  ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES)
@@@ -98,30 -96,34 +98,34 @@@ SCRIPT_PYTHON = 
  
  # The ones that do not have to link with lcrypto nor lz.
  SIMPLE_PROGRAMS = \
 -      git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \
 -      git-daemon git-var
 +      git-get-tar-commit-id$X git-mailinfo$X git-mailsplit$X \
 +      git-stripspace$X git-var$X git-daemon$X
  
  # ... and all the rest
  PROGRAMS = \
-       git-apply$X git-cat-file$X git-checkout-index$X         \
-       git-clone-pack$X git-commit-tree$X git-convert-objects$X        \
-       git-diff-files$X git-diff-index$X git-diff-stages$X     \
-       git-diff-tree$X git-fetch-pack$X git-fsck-objects$X     \
-       git-hash-object$X git-init-db$X git-local-fetch$X               \
-       git-ls-files$X git-ls-tree$X git-merge-base$X           \
-       git-merge-index$X git-mktag$X git-pack-objects$X                \
-       git-patch-id$X git-peek-remote$X git-prune-packed$X     \
-       git-read-tree$X git-receive-pack$X git-rev-list$X               \
-       git-rev-parse$X git-send-pack$X git-show-branch$X               \
-       git-show-index$X git-ssh-fetch$X git-ssh-upload$X               \
-       git-tar-tree$X git-unpack-file$X git-unpack-objects$X   \
-       git-update-index$X git-update-server-info$X                     \
-       git-upload-pack$X git-verify-pack$X git-write-tree$X    \
-       git-update-ref$X $(SIMPLE_PROGRAMS)
 -      git-apply git-cat-file \
 -      git-checkout-index git-clone-pack git-commit-tree \
 -      git-convert-objects git-diff-files \
 -      git-diff-index git-diff-stages \
 -      git-diff-tree git-fetch-pack git-fsck-objects \
 -      git-hash-object git-init-db \
 -      git-local-fetch git-ls-files git-ls-tree git-merge-base \
 -      git-merge-index git-mktag git-pack-objects git-patch-id \
 -      git-peek-remote git-prune-packed git-read-tree \
 -      git-receive-pack git-rev-list git-rev-parse \
 -      git-send-pack git-show-branch \
 -      git-show-index git-ssh-fetch \
 -      git-ssh-upload git-tar-tree git-unpack-file \
 -      git-unpack-objects git-update-index git-update-server-info \
 -      git-upload-pack git-verify-pack git-write-tree \
 -      git-update-ref git-symbolic-ref \
++      git-apply$X git-cat-file$X \
++      git-checkout-index$X git-clone-pack$X git-commit-tree$X \
++      git-convert-objects$X git-diff-files$X \
++      git-diff-index$X git-diff-stages$X \
++      git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \
++      git-hash-object$X git-init-db$X \
++      git-local-fetch$X git-ls-files$X git-ls-tree$X git-merge-base$X \
++      git-merge-index$X git-mktag$X git-pack-objects$X git-patch-id$X \
++      git-peek-remote$X git-prune-packed$X git-read-tree$X \
++      git-receive-pack$X git-rev-list$X git-rev-parse$X \
++      git-send-pack$X git-show-branch$X \
++      git-show-index$X git-ssh-fetch$X \
++      git-ssh-upload$X git-tar-tree$X git-unpack-file$X \
++      git-unpack-objects$X git-update-index$X git-update-server-info$X \
++      git-upload-pack$X git-verify-pack$X git-write-tree$X \
++      git-update-ref$X git-symbolic-ref$X \
+       $(SIMPLE_PROGRAMS)
  
  # Backward compatibility -- to be removed after 1.0
 -PROGRAMS += git-ssh-pull git-ssh-push
 +PROGRAMS += git-ssh-pull$X git-ssh-push$X
  
+ GIT_LIST_TWEAK =
  PYMODULES = \
        gitMergeCommon.py
  
@@@ -131,6 -133,8 +135,8 @@@ endi
  
  ifdef WITH_SEND_EMAIL
        SCRIPT_PERL += git-send-email.perl
+ else
+       GIT_LIST_TWEAK += -e '/^send-email$$/d'
  endif
  
  LIB_FILE=libgit.a
@@@ -172,15 -176,13 +178,19 @@@ ifeq ($(shell uname -s),SunOS
        TAR = gtar
        PLATFORM_DEFINES += -D__EXTENSIONS__
  endif
 +ifeq ($(shell uname -o),Cygwin)
 +      NO_STRCASESTR = YesPlease
 +      NEEDS_LIBICONV = YesPlease
 +      NO_IPV6 = YesPlease
 +      X = .exe
 +endif
  ifneq (,$(findstring arm,$(shell uname -m)))
        ARM_SHA1 = YesPlease
  endif
+ ifeq ($(shell uname -s),OpenBSD)
+       NEEDS_LIBICONV = YesPlease
+       PLATFORM_DEFINES += -I/usr/local/include -L/usr/local/lib
+ endif
  
  ifndef NO_CURL
        ifdef CURLDIR
        else
                CURL_LIBCURL = -lcurl
        endif
 -      PROGRAMS += git-http-fetch
 +      PROGRAMS += git-http-fetch$X
  endif
  
  ifndef SHELL_PATH
@@@ -206,18 -208,32 +216,32 @@@ endi
  ifndef NO_OPENSSL
        LIB_OBJS += epoch.o
        OPENSSL_LIBSSL = -lssl
+       ifdef OPENSSLDIR
+               # Again this may be problematic -- gcc does not always want -R.
+               CFLAGS += -I$(OPENSSLDIR)/include
+               OPENSSL_LINK = -L$(OPENSSLDIR)/lib -R$(OPENSSLDIR)/lib
+       else
+               OPENSSL_LINK =
+       endif
  else
        DEFINES += '-DNO_OPENSSL'
        MOZILLA_SHA1 = 1
        OPENSSL_LIBSSL =
  endif
  ifdef NEEDS_SSL_WITH_CRYPTO
-       LIB_4_CRYPTO = -lcrypto -lssl
+       LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto -lssl
  else
-       LIB_4_CRYPTO = -lcrypto
+       LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto
  endif
  ifdef NEEDS_LIBICONV
-       LIB_4_ICONV = -liconv
+       ifdef ICONVDIR
+               # Again this may be problematic -- gcc does not always want -R.
+               CFLAGS += -I$(ICONVDIR)/include
+               ICONV_LINK = -L$(ICONVDIR)/lib -R$(ICONVDIR)/lib
+       else
+               ICONV_LINK =
+       endif
+       LIB_4_ICONV = $(ICONV_LINK) -liconv
  else
        LIB_4_ICONV =
  endif
@@@ -233,9 -249,6 +257,9 @@@ ifdef NO_STRCASEST
        DEFINES += -Dstrcasestr=gitstrcasestr
        LIB_OBJS += compat/strcasestr.o
  endif
 +ifdef NO_IPV6
 +      DEFINES += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
 +endif
  
  ifdef PPC_SHA1
        SHA1_HEADER = "ppc/sha1.h"
@@@ -273,8 -286,8 +297,13 @@@ all
  git: git.sh Makefile
        rm -f $@+ $@
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \
++<<<<<<< Makefile
 +          -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 +          -e 's/@@X@@/$(X)/g' <$@.sh >$@+
++=======
+           -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+           $(GIT_LIST_TWEAK) <$@.sh >$@+
++>>>>>>> .merge_file_3QHyD4
        chmod +x $@+
        mv $@+ $@
  
@@@ -300,30 -313,30 +329,30 @@@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : 
  %.o: %.S
        $(CC) -o $*.o -c $(ALL_CFLAGS) $<
  
 -git-%: %.o $(LIB_FILE)
 +git-%$X: %.o $(LIB_FILE)
        $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
  
 -git-mailinfo : SIMPLE_LIB += $(LIB_4_ICONV)
 +git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)
  $(SIMPLE_PROGRAMS) : $(LIB_FILE)
 -$(SIMPLE_PROGRAMS) : git-% : %.o
 +$(SIMPLE_PROGRAMS) : git-%$X : %.o
        $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB)
  
 -git-http-fetch: fetch.o
 -git-local-fetch: fetch.o
 -git-ssh-fetch: rsh.o fetch.o
 -git-ssh-upload: rsh.o
 -git-ssh-pull: rsh.o fetch.o
 -git-ssh-push: rsh.o
 +git-http-fetch$X: fetch.o
 +git-local-fetch$X: fetch.o
 +git-ssh-fetch$X: rsh.o fetch.o
 +git-ssh-upload$X: rsh.o
 +git-ssh-pull$X: rsh.o fetch.o
 +git-ssh-push$X: rsh.o
  
 -git-http-fetch: LIBS += $(CURL_LIBCURL)
 -git-rev-list: LIBS += $(OPENSSL_LIBSSL)
 +git-http-fetch$X: LIBS += $(CURL_LIBCURL)
 +git-rev-list$X: LIBS += $(OPENSSL_LIBSSL)
  
  init-db.o: init-db.c
        $(CC) -c $(ALL_CFLAGS) \
                -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c
  
  $(LIB_OBJS): $(LIB_H)
 -$(patsubst git-%,%.o,$(PROGRAMS)): $(LIB_H)
 +$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H)
  $(DIFF_OBJS): diffcore.h
  
  $(LIB_FILE): $(LIB_OBJS)
@@@ -338,10 -351,10 +367,10 @@@ doc
  test: all
        $(MAKE) -C t/ all
  
 -test-date: test-date.c date.o
 +test-date$X: test-date.c date.o
        $(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o
  
 -test-delta: test-delta.c diff-delta.o patch-delta.o
 +test-delta$X: test-delta.c diff-delta.o patch-delta.o
        $(CC) $(ALL_CFLAGS) -o $@ $^
  
  check:
diff --combined git.sh
index 2986f08ce22ddd42f6efd881b50bf794f6cdc20f,dc383eddea5bf96a1208872299a4c2370a2f7360..7400c162578c5e18a2a406b09263394e485e0990
--- 1/git.sh
--- 2/git.sh
+++ b/git.sh
@@@ -11,32 -11,55 +11,65 @@@ case "$#" i
                echo "git version @@GIT_VERSION@@"
                exit 0 ;;
        esac
 -      test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
 +      
 +      test -x $path/git-$cmd && exec $path/git-$cmd "$@"
 +      
 +      case '@@X@@' in
 +          '')
 +              ;;
 +          *)
 +              test -x $path/git-$cmd@@X@@ && exec $path/git-$cmd@@X@@ "$@"
 +              ;;
 +      esac
 +      ;;
  esac
  
  echo "Usage: git COMMAND [OPTIONS] [TARGET]"
  if [ -n "$cmd" ]; then
-     echo " git command '$cmd' not found: commands are:"
- else
-     echo " git commands are:"
+     echo "git command '$cmd' not found."
  fi
+ echo "git commands are:"
  
- cat <<\EOF
-     add apply archimport bisect branch checkout cherry clone
-     commit count-objects cvsimport diff fetch format-patch
-     fsck-cache get-tar-commit-id init-db log ls-remote octopus
-     pack-objects parse-remote patch-id prune pull push rebase
-     relink rename repack request-pull reset resolve revert
-     send-email shortlog show-branch status tag verify-tag
-     whatchanged
+ fmt <<\EOF | sed -e 's/^/    /'
+ add
+ apply
+ archimport
+ bisect
+ branch
+ checkout
+ cherry
+ clone
+ commit
+ count-objects
+ cvsimport
+ diff
+ fetch
+ format-patch
+ fsck-objects
+ get-tar-commit-id
+ init-db
+ log
+ ls-remote
+ octopus
+ pack-objects
+ parse-remote
+ patch-id
+ prune
+ pull
+ push
+ rebase
+ relink
+ rename
+ repack
+ request-pull
+ reset
+ resolve
+ revert
+ send-email
+ shortlog
+ show-branch
+ status
+ tag
+ verify-tag
+ whatchanged
  EOF