Merge branch 'js/portable'
authorJunio C Hamano <junkio@cox.net>
Sat, 18 Feb 2006 01:34:51 +0000 (17:34 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 18 Feb 2006 01:34:51 +0000 (17:34 -0800)
* js/portable:
Support Irix
Optionally support old diffs
Fix cpio call
SubmittingPatches: note on whitespaces
Add a README for gitview
Add contrib/README.
git-tag: -l to list tags (usability).

1  2 
Makefile
apply.c
git-clone.sh
diff --combined Makefile
index ccb896e812f1f7958e94006323a98cc98a572110,1d3a0a47aa614d4b9047f02c5752bb41d0302eea..45ce4221c9db032877f6f9259b35ffc07d2d6581
+++ b/Makefile
@@@ -55,6 -55,9 +55,9 @@@ all
  #
  # Define NO_ICONV if your libc does not properly support iconv.
  #
+ # Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
+ # a missing newline at the end of the file.
+ #
  # 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.
@@@ -153,7 -156,7 +156,7 @@@ PROGRAMS = 
        git-upload-pack$X git-verify-pack$X git-write-tree$X \
        git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \
        git-name-rev$X git-pack-redundant$X git-repo-config$X git-var$X \
 -      git-describe$X
 +      git-describe$X git-merge-tree$X
  
  # what 'all' will build and 'install' will install, in gitexecdir
  ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@@ -273,6 -276,16 +276,16 @@@ ifeq ($(uname_S),AIX
        NO_STRCASESTR=YesPlease
        NEEDS_LIBICONV=YesPlease
  endif
+ ifeq ($(uname_S),IRIX64)
+       NO_IPV6=YesPlease
+       NO_SETENV=YesPlease
+       NO_STRCASESTR=YesPlease
+       NO_SOCKADDR_STORAGE=YesPlease
+       SHELL_PATH=/usr/gnu/bin/bash
+       ALL_CFLAGS += -DPATH_MAX=1024
+       # for now, build 32-bit version
+       ALL_LDFLAGS += -L/usr/lib32
+ endif
  ifneq (,$(findstring arm,$(uname_M)))
        ARM_SHA1 = YesPlease
  endif
@@@ -403,6 -416,9 +416,9 @@@ els
  endif
  endif
  endif
+ ifdef NO_ACCURATE_DIFF
+       ALL_CFLAGS += -DNO_ACCURATE_DIFF
+ endif
  
  ALL_CFLAGS += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER)) $(COMPAT_CFLAGS)
  LIB_OBJS += $(COMPAT_OBJS)
diff --combined apply.c
index 35ae48eeb580a95399fd213c5813fc0fa4ec40c2,1083d4f31677357fe86c5ab85960df44a28ce721..244718ca13aa58567974ea3b72d58c0365cc3c21
+++ b/apply.c
@@@ -1142,6 -1142,14 +1142,14 @@@ static int apply_one_fragment(struct bu
                size -= len;
        }
  
+ #ifdef NO_ACCURATE_DIFF
+       if (oldsize > 0 && old[oldsize - 1] == '\n' &&
+                       newsize > 0 && new[newsize - 1] == '\n') {
+               oldsize--;
+               newsize--;
+       }
+ #endif
+                       
        offset = find_offset(buf, desc->size, old, oldsize, frag->newpos);
        if (offset >= 0) {
                int diff = newsize - oldsize;
@@@ -1309,7 -1317,7 +1317,7 @@@ static int check_patch(struct patch *pa
                                        return -1;
                        }
  
 -                      changed = ce_match_stat(active_cache[pos], &st);
 +                      changed = ce_match_stat(active_cache[pos], &st, 1);
                        if (changed)
                                return error("%s: does not match index",
                                             old_name);
diff --combined git-clone.sh
index d184ceb7a6f2a7d4ffc3a002b1a8846c46297f33,cf410faaa38af6858dbe11ce7516bcd90c2882e3..dc0ad552a322d46f48bee2c8d324285a63a9b8c7
@@@ -118,7 -118,6 +118,7 @@@ dir="$2
  [ -e "$dir" ] && echo "$dir already exists." && usage
  mkdir -p "$dir" &&
  D=$(cd "$dir" && pwd) &&
 +trap 'err=$?; rm -r $D; exit $err' exit
  case "$bare" in
  yes) GIT_DIR="$D" ;;
  *) GIT_DIR="$D/.git" ;;
@@@ -154,7 -153,7 +154,7 @@@ yes,yes
            fi &&
            rm -f "$GIT_DIR/objects/sample" &&
            cd "$repo" &&
-           find objects -depth -print | cpio -puamd$l "$GIT_DIR/" || exit 1
+           find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
            ;;
        yes)
            mkdir -p "$GIT_DIR/objects/info"
@@@ -256,6 -255,3 +256,6 @@@ Pull: $head_points_at:$origin" &
                git checkout
        esac
  fi
 +
 +trap - exit
 +