Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
66436888
G
git
项目概览
李少辉-开发者
/
git
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
git
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
66436888
编写于
2月 21, 2006
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge part of jc/portable branch
上级
83f50539
abb7c7b3
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
57 addition
and
2 deletion
+57
-2
Makefile
Makefile
+25
-0
apply.c
apply.c
+8
-0
git-clone.sh
git-clone.sh
+1
-1
git-merge.sh
git-merge.sh
+4
-0
t/Makefile
t/Makefile
+4
-0
t/t0000-basic.sh
t/t0000-basic.sh
+1
-1
t/t6021-merge-criss-cross.sh
t/t6021-merge-criss-cross.sh
+6
-0
t/t6022-merge-rename.sh
t/t6022-merge-rename.sh
+6
-0
t/test-lib.sh
t/test-lib.sh
+2
-0
未找到文件。
Makefile
浏览文件 @
66436888
...
...
@@ -55,6 +55,11 @@ 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 NO_PYTHON if you want to loose all benefits of the recursive merge.
#
# 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.
...
...
@@ -273,6 +278,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 +418,9 @@ else
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)
...
...
@@ -426,6 +444,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
sed
-e
'1s|#!.*/sh|#!
$(
call
shq,
$(SHELL_PATH)
)
|'
\
-e
's/@@GIT_VERSION@@/
$(GIT_VERSION)
/g'
\
-e
's/@@NO_CURL@@/
$(NO_CURL)
/g'
\
-e
's/@@NO_PYTHON@@/
$(NO_PYTHON)
/g'
\
$@
.sh
>
$@
chmod
+x
$@
...
...
@@ -505,6 +524,12 @@ doc:
### Testing rules
# GNU make supports exporting all variables by "export" without parameters.
# However, the environment gets quite big, and some programs have problems
# with that.
export
NO_PYTHON
test
:
all
$(MAKE)
-C
t/ all
...
...
apply.c
浏览文件 @
66436888
...
...
@@ -1142,6 +1142,14 @@ static int apply_one_fragment(struct buffer_desc *desc, struct fragment *frag)
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
;
...
...
git-clone.sh
浏览文件 @
66436888
...
...
@@ -154,7 +154,7 @@ yes,yes)
fi
&&
rm
-f
"
$GIT_DIR
/objects/sample"
&&
cd
"
$repo
"
&&
find objects
-depth
-print
| cpio
-pu
a
md
$l
"
$GIT_DIR
/"
||
exit
1
find objects
-depth
-print
| cpio
-pumd
$l
"
$GIT_DIR
/"
||
exit
1
;;
yes
)
mkdir
-p
"
$GIT_DIR
/objects/info"
...
...
git-merge.sh
浏览文件 @
66436888
...
...
@@ -13,6 +13,10 @@ LF='
all_strategies
=
'recursive octopus resolve stupid ours'
default_strategies
=
'recursive'
use_strategies
=
if
test
"@@NO_PYTHON@@"
;
then
all_strategies
=
'resolve octopus stupid ours'
default_strategies
=
'resolve'
fi
dropsave
()
{
rm
-f
--
"
$GIT_DIR
/MERGE_HEAD"
"
$GIT_DIR
/MERGE_MSG"
\
...
...
t/Makefile
浏览文件 @
66436888
...
...
@@ -15,6 +15,10 @@ shellquote = '$(call shq,$(1))'
T
=
$(
wildcard
t[0-9][0-9][0-9][0-9]-*.sh
)
ifdef
NO_PYTHON
GIT_TEST_OPTS
+=
--no-python
endif
all
:
$(T) clean
$(T)
:
...
...
t/t0000-basic.sh
浏览文件 @
66436888
...
...
@@ -42,7 +42,7 @@ fi
.
./test-lib.sh
"
$PYTHON
"
-c
'import subprocess'
||
{
test
"
$no_python
"
||
"
$PYTHON
"
-c
'import subprocess'
||
{
echo
>
&2
'Your python seem to lack "subprocess" module.
Please check INSTALL document.'
exit
1
...
...
t/t6021-merge-criss-cross.sh
浏览文件 @
66436888
...
...
@@ -10,6 +10,12 @@
test_description
=
'Test criss-cross merge'
.
./test-lib.sh
if
test
"
$no_python
"
;
then
echo
"Skipping: no python => no recursive merge"
test_done
exit
0
fi
test_expect_success
'prepare repository'
\
'echo "1
2
...
...
t/t6022-merge-rename.sh
浏览文件 @
66436888
...
...
@@ -3,6 +3,12 @@
test_description
=
'Merge-recursive merging renames'
.
./test-lib.sh
if
test
"
$no_python
"
;
then
echo
"Skipping: no python => no recursive merge"
test_done
exit
0
fi
test_expect_success setup
\
'
cat >A <<\EOF &&
...
...
t/test-lib.sh
浏览文件 @
66436888
...
...
@@ -63,6 +63,8 @@ do
exit
0
;;
-v
|
--v
|
--ve
|
--ver
|
--verb
|
--verbo
|
--verbos
|
--verbose
)
verbose
=
t
;
shift
;;
--no-python
)
no_python
=
t
;
shift
;;
*
)
break
;;
esac
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录