Merge branch 'maint'
authorJunio C Hamano <junkio@cox.net>
Sun, 5 Nov 2006 07:52:32 +0000 (23:52 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 5 Nov 2006 07:52:32 +0000 (23:52 -0800)
* maint:
Remove unsupported C99 style struct initializers in git-archive.
Remove SIMPLE_PROGRAMS and make git-daemon a normal program.
Use ULONG_MAX rather than implicit cast of -1.

1  2 
Makefile
builtin-apply.c
diff --combined Makefile
index 1cc9f586d6d239273b72c4500b35e6c437debe6a,b52dd57e83d3669ef993d83844deaaedc6dae50c..7c3860a52e09210242b66c9f98999384da713be2
+++ b/Makefile
@@@ -132,8 -132,6 +132,8 @@@ GITWEB_HOMETEXT = indextext.htm
  GITWEB_CSS = gitweb.css
  GITWEB_LOGO = git-logo.png
  GITWEB_FAVICON = git-favicon.png
 +GITWEB_SITE_HEADER =
 +GITWEB_SITE_FOOTER =
  
  export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
  
@@@ -158,8 -156,8 +158,8 @@@ BASIC_CFLAGS 
  BASIC_LDFLAGS =
  
  SCRIPT_SH = \
 -      git-bisect.sh git-branch.sh git-checkout.sh \
 -      git-cherry.sh git-clean.sh git-clone.sh git-commit.sh \
 +      git-bisect.sh git-checkout.sh \
 +      git-clean.sh git-clone.sh git-commit.sh \
        git-fetch.sh \
        git-ls-remote.sh \
        git-merge-one-file.sh git-parse-remote.sh \
  SCRIPT_PERL = \
        git-archimport.perl git-cvsimport.perl git-relink.perl \
        git-shortlog.perl git-rerere.perl \
 -      git-annotate.perl git-cvsserver.perl \
 +      git-cvsserver.perl \
        git-svnimport.perl git-cvsexportcommit.perl \
        git-send-email.perl git-svn.perl
  
@@@ -187,15 -185,12 +187,12 @@@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH
          $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
          git-cherry-pick git-status git-instaweb
  
- # The ones that do not have to link with lcrypto, lz nor xdiff.
- SIMPLE_PROGRAMS = \
-       git-daemon$X
  # ... and all the rest that could be moved out of bindir to gitexecdir
  PROGRAMS = \
        git-convert-objects$X git-fetch-pack$X git-fsck-objects$X \
        git-hash-object$X git-index-pack$X git-local-fetch$X \
        git-merge-base$X \
+       git-daemon$X \
        git-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \
        git-peek-remote$X git-receive-pack$X \
        git-send-pack$X git-shell$X \
  EXTRA_PROGRAMS =
  
  BUILT_INS = \
 -      git-format-patch$X git-show$X git-whatchanged$X \
 +      git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
        git-get-tar-commit-id$X \
        $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
  
  # what 'all' will build and 'install' will install, in gitexecdir
- ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS) \
+ ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) \
        git-merge-recur$X
  
  # Backward compatibility -- to be removed after 1.0
@@@ -267,10 -262,8 +264,10 @@@ LIB_OBJS = 
  
  BUILTIN_OBJS = \
        builtin-add.o \
 +      builtin-annotate.o \
        builtin-apply.o \
        builtin-archive.o \
 +      builtin-branch.o \
        builtin-cat-file.o \
        builtin-checkout-index.o \
        builtin-check-ref-format.o \
        builtin-diff-stages.o \
        builtin-diff-tree.o \
        builtin-fmt-merge-msg.o \
 +      builtin-for-each-ref.o \
        builtin-grep.o \
        builtin-init-db.o \
        builtin-log.o \
        builtin-update-ref.o \
        builtin-upload-archive.o \
        builtin-verify-pack.o \
 -      builtin-write-tree.o
 +      builtin-write-tree.o \
 +      builtin-show-ref.o \
 +      builtin-pack-refs.o
  
  GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
  EXTLIBS = -lz
@@@ -486,11 -476,9 +483,9 @@@ ifdef NEEDS_LIBICON
  endif
  ifdef NEEDS_SOCKET
        EXTLIBS += -lsocket
-       SIMPLE_LIB += -lsocket
  endif
  ifdef NEEDS_NSL
        EXTLIBS += -lnsl
-       SIMPLE_LIB += -lnsl
  endif
  ifdef NO_D_TYPE_IN_DIRENT
        BASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT
@@@ -682,8 -670,6 +677,8 @@@ gitweb/gitweb.cgi: gitweb/gitweb.per
            -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
            -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
            -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
 +          -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
 +          -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
            $< >$@+
        chmod +x $@+
        mv $@+ $@
@@@ -737,11 -723,6 +732,6 @@@ endi
  git-%$X: %.o $(GITLIBS)
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
  
- $(SIMPLE_PROGRAMS) : $(LIB_FILE)
- $(SIMPLE_PROGRAMS) : git-%$X : %.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-               $(LIB_FILE) $(SIMPLE_LIB)
  ssh-pull.o: ssh-fetch.c
  ssh-push.o: ssh-upload.c
  git-local-fetch$X: fetch.o
diff --combined builtin-apply.c
index db7cdce1d37e2984f4d2663bb86eaec7f33f5789,6ec22b8daac0fc355c59bc25bacc5e0aa872e531..aad55261fae35fa644bc65aae79fc15aabc38244
@@@ -43,7 -43,7 +43,7 @@@ static int apply_verbosely
  static int no_add;
  static int show_index_info;
  static int line_termination = '\n';
- static unsigned long p_context = -1;
+ static unsigned long p_context = ULONG_MAX;
  static const char apply_usage[] =
  "git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|error|error-all|strip>] <patch>...";
  
@@@ -360,7 -360,7 +360,7 @@@ static int gitdiff_hdrend(const char *l
  static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, const char *oldnew)
  {
        if (!orig_name && !isnull)
 -              return find_name(line, NULL, 1, 0);
 +              return find_name(line, NULL, 1, TERM_TAB);
  
        if (orig_name) {
                int len;
                len = strlen(name);
                if (isnull)
                        die("git-apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
 -              another = find_name(line, NULL, 1, 0);
 +              another = find_name(line, NULL, 1, TERM_TAB);
                if (!another || memcmp(another, name, len))
                        die("git-apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
                free(another);