Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
ebc12ce5
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,发现更多精彩内容 >>
提交
ebc12ce5
编写于
12月 21, 2005
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes'
上级
6d016c9c
7246ed43
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
10 deletion
+10
-10
config.c
config.c
+1
-1
git.c
git.c
+1
-1
receive-pack.c
receive-pack.c
+1
-1
sha1_file.c
sha1_file.c
+5
-5
show-branch.c
show-branch.c
+2
-2
未找到文件。
config.c
浏览文件 @
ebc12ce5
...
...
@@ -487,7 +487,7 @@ int git_config_set_multivar(const char* key, const char* value,
store
.
value_regex
=
(
regex_t
*
)
malloc
(
sizeof
(
regex_t
));
if
(
regcomp
(
store
.
value_regex
,
value_regex
,
REG_EXTENDED
))
{
fprintf
(
stderr
,
"Invalid pattern: %s"
,
fprintf
(
stderr
,
"Invalid pattern: %s
\n
"
,
value_regex
);
free
(
store
.
value_regex
);
return
6
;
...
...
git.c
浏览文件 @
ebc12ce5
...
...
@@ -278,7 +278,7 @@ int main(int argc, char **argv, char **envp)
if
(
*
exec_path
!=
'/'
)
{
if
(
!
getcwd
(
git_command
,
sizeof
(
git_command
)))
{
fprintf
(
stderr
,
"git: cannot determine current directory"
);
"git: cannot determine current directory
\n
"
);
exit
(
1
);
}
len
=
strlen
(
git_command
);
...
...
receive-pack.c
浏览文件 @
ebc12ce5
...
...
@@ -79,7 +79,7 @@ static int run_update_hook(const char *refname,
case
-
ERR_RUN_COMMAND_WAITPID_WRONG_PID
:
die
(
"waitpid is confused"
);
case
-
ERR_RUN_COMMAND_WAITPID_SIGNAL
:
fprintf
(
stderr
,
"%s died of signal"
,
update_hook
);
fprintf
(
stderr
,
"%s died of signal
\n
"
,
update_hook
);
return
-
1
;
case
-
ERR_RUN_COMMAND_WAITPID_NOEXIT
:
die
(
"%s died strangely"
,
update_hook
);
...
...
sha1_file.c
浏览文件 @
ebc12ce5
...
...
@@ -464,7 +464,7 @@ struct packed_git *add_packed_git(char *path, int path_len, int local)
p
->
pack_last_used
=
0
;
p
->
pack_use_cnt
=
0
;
p
->
pack_local
=
local
;
if
(
!
get_sha1_hex
(
path
+
path_len
-
40
-
4
,
sha1
))
if
(
(
path_len
>
44
)
&&
!
get_sha1_hex
(
path
+
path_len
-
4
4
,
sha1
))
memcpy
(
p
->
sha1
,
sha1
,
20
);
return
p
;
}
...
...
@@ -1274,7 +1274,7 @@ int move_temp_to_file(const char *tmpfile, char *filename)
unlink
(
tmpfile
);
if
(
ret
)
{
if
(
ret
!=
EEXIST
)
{
fprintf
(
stderr
,
"unable to write sha1 filename %s: %s"
,
filename
,
strerror
(
ret
));
fprintf
(
stderr
,
"unable to write sha1 filename %s: %s
\n
"
,
filename
,
strerror
(
ret
));
return
-
1
;
}
/* FIXME!!! Collision check here ? */
...
...
@@ -1313,7 +1313,7 @@ int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha
}
if
(
errno
!=
ENOENT
)
{
fprintf
(
stderr
,
"sha1 file %s: %s"
,
filename
,
strerror
(
errno
));
fprintf
(
stderr
,
"sha1 file %s: %s
\n
"
,
filename
,
strerror
(
errno
));
return
-
1
;
}
...
...
@@ -1321,7 +1321,7 @@ int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha
fd
=
mkstemp
(
tmpfile
);
if
(
fd
<
0
)
{
fprintf
(
stderr
,
"unable to create temporary sha1 filename %s: %s"
,
tmpfile
,
strerror
(
errno
));
fprintf
(
stderr
,
"unable to create temporary sha1 filename %s: %s
\n
"
,
tmpfile
,
strerror
(
errno
));
return
-
1
;
}
...
...
@@ -1410,7 +1410,7 @@ int write_sha1_to_fd(int fd, const unsigned char *sha1)
size
=
write
(
fd
,
buf
+
posn
,
objsize
-
posn
);
if
(
size
<=
0
)
{
if
(
!
size
)
{
fprintf
(
stderr
,
"write closed"
);
fprintf
(
stderr
,
"write closed
\n
"
);
}
else
{
perror
(
"write "
);
}
...
...
show-branch.c
浏览文件 @
ebc12ce5
...
...
@@ -303,7 +303,7 @@ static int append_ref(const char *refname, const unsigned char *sha1)
return
0
;
if
(
MAX_REVS
<=
ref_name_cnt
)
{
fprintf
(
stderr
,
"warning: ignoring %s; "
"cannot handle more than %d refs"
,
"cannot handle more than %d refs
\n
"
,
refname
,
MAX_REVS
);
return
0
;
}
...
...
@@ -537,7 +537,7 @@ int main(int ac, char **av)
if
(
MAX_REVS
<=
num_rev
)
die
(
"cannot handle more than %d revs."
,
MAX_REVS
);
if
(
get_sha1
(
ref_name
[
num_rev
],
revkey
))
die
(
"'%s' is not a valid ref.
\n
"
,
ref_name
[
num_rev
]);
die
(
"'%s' is not a valid ref."
,
ref_name
[
num_rev
]);
commit
=
lookup_commit_reference
(
revkey
);
if
(
!
commit
)
die
(
"cannot find commit %s (%s)"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录