From: Junio C Hamano Date: Sat, 18 Feb 2006 01:34:51 +0000 (-0800) Subject: Merge branch 'js/portable' X-Git-Tag: v1.3.0-rc1~54^2~64 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9b1320a99e906b5e7011f5e641f7400d82bbc82f?hp=-c Merge branch 'js/portable' * 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). --- 9b1320a99e906b5e7011f5e641f7400d82bbc82f diff --combined Makefile index ccb896e812,1d3a0a47aa..45ce4221c9 --- a/Makefile +++ 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 35ae48eeb5,1083d4f316..244718ca13 --- a/apply.c +++ 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 d184ceb7a6,cf410faaa3..dc0ad552a3 --- a/git-clone.sh +++ b/git-clone.sh @@@ -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 +