Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
5ef1862a
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,发现更多精彩内容 >>
提交
5ef1862a
编写于
10月 27, 2005
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'lt-dense'
上级
1301c6eb
19a7e715
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
18 deletion
+31
-18
rev-list.c
rev-list.c
+30
-17
rev-parse.c
rev-parse.c
+1
-1
未找到文件。
rev-list.c
浏览文件 @
5ef1862a
...
...
@@ -28,7 +28,7 @@ static const char rev_list_usage[] =
" --merge-order [ --show-breaks ]
\n
"
" --topo-order"
;
static
int
dense
=
0
;
static
int
dense
=
1
;
static
int
unpacked
=
0
;
static
int
bisect_list
=
0
;
static
int
tag_objects
=
0
;
...
...
@@ -613,13 +613,10 @@ static void add_pending_object(struct object *obj, const char *name)
add_object
(
obj
,
&
pending_objects
,
name
);
}
static
struct
commit
*
get_commit_reference
(
const
char
*
name
,
unsigned
int
flags
)
static
struct
commit
*
get_commit_reference
(
const
char
*
name
,
const
unsigned
char
*
sha1
,
unsigned
int
flags
)
{
unsigned
char
sha1
[
20
];
struct
object
*
object
;
if
(
get_sha1
(
name
,
sha1
))
usage
(
rev_list_usage
);
object
=
parse_object
(
sha1
);
if
(
!
object
)
die
(
"bad object %s"
,
name
);
...
...
@@ -697,7 +694,7 @@ static struct commit_list **global_lst;
static
int
include_one_commit
(
const
char
*
path
,
const
unsigned
char
*
sha1
)
{
struct
commit
*
com
=
get_commit_reference
(
path
,
0
);
struct
commit
*
com
=
get_commit_reference
(
path
,
sha1
,
0
);
handle_one_commit
(
com
,
global_lst
);
return
0
;
}
...
...
@@ -720,6 +717,7 @@ int main(int argc, const char **argv)
const
char
*
arg
=
argv
[
i
];
char
*
dotdot
;
struct
commit
*
commit
;
unsigned
char
sha1
[
20
];
if
(
!
strncmp
(
arg
,
"--max-count="
,
12
))
{
max_count
=
atoi
(
arg
+
12
);
...
...
@@ -793,12 +791,12 @@ int main(int argc, const char **argv)
dense
=
1
;
continue
;
}
if
(
!
strcmp
(
arg
,
"--sparse"
))
{
dense
=
0
;
continue
;
}
if
(
!
strcmp
(
arg
,
"--"
))
{
paths
=
get_pathspec
(
prefix
,
argv
+
i
+
1
);
if
(
paths
)
{
limited
=
1
;
diff_tree_setup_paths
(
paths
);
}
i
++
;
break
;
}
...
...
@@ -808,15 +806,19 @@ int main(int argc, const char **argv)
flags
=
0
;
dotdot
=
strstr
(
arg
,
".."
);
if
(
dotdot
)
{
unsigned
char
from_sha1
[
20
];
char
*
next
=
dotdot
+
2
;
struct
commit
*
exclude
=
NULL
;
struct
commit
*
include
=
NULL
;
*
dotdot
=
0
;
if
(
!*
next
)
next
=
"HEAD"
;
exclude
=
get_commit_reference
(
arg
,
UNINTERESTING
);
include
=
get_commit_reference
(
next
,
0
);
if
(
exclude
&&
include
)
{
if
(
!
get_sha1
(
arg
,
from_sha1
)
&&
!
get_sha1
(
next
,
sha1
))
{
struct
commit
*
exclude
;
struct
commit
*
include
;
exclude
=
get_commit_reference
(
arg
,
from_sha1
,
UNINTERESTING
);
include
=
get_commit_reference
(
next
,
sha1
,
0
);
if
(
!
exclude
||
!
include
)
die
(
"Invalid revision range %s..%s"
,
arg
,
next
);
limited
=
1
;
handle_one_commit
(
exclude
,
&
list
);
handle_one_commit
(
include
,
&
list
);
...
...
@@ -829,10 +831,21 @@ int main(int argc, const char **argv)
arg
++
;
limited
=
1
;
}
commit
=
get_commit_reference
(
arg
,
flags
);
if
(
get_sha1
(
arg
,
sha1
)
<
0
)
break
;
commit
=
get_commit_reference
(
arg
,
sha1
,
flags
);
handle_one_commit
(
commit
,
&
list
);
}
if
(
!
list
)
usage
(
rev_list_usage
);
paths
=
get_pathspec
(
prefix
,
argv
+
i
);
if
(
paths
)
{
limited
=
1
;
diff_tree_setup_paths
(
paths
);
}
save_commit_buffer
=
verbose_header
;
track_object_refs
=
0
;
...
...
rev-parse.c
浏览文件 @
5ef1862a
...
...
@@ -153,6 +153,7 @@ static void show_datestring(const char *flag, const char *datestr)
static
void
show_file
(
const
char
*
arg
)
{
show_default
();
if
((
filter
&
(
DO_NONFLAGS
|
DO_NOREV
))
==
(
DO_NONFLAGS
|
DO_NOREV
))
show
(
arg
);
}
...
...
@@ -174,7 +175,6 @@ int main(int argc, char **argv)
if
(
*
arg
==
'-'
)
{
if
(
!
strcmp
(
arg
,
"--"
))
{
as_is
=
1
;
show_default
();
/* Pass on the "--" if we show anything but files.. */
if
(
filter
&
(
DO_FLAGS
|
DO_REVS
))
show_file
(
arg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录