Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
bd45e1c3
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,发现更多精彩内容 >>
提交
bd45e1c3
编写于
7月 22, 2020
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Meta: prepare to use alternate name for the primary branch
上级
2be3712f
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
55 addition
and
36 deletion
+55
-36
Announce
Announce
+5
-3
CheckPush
CheckPush
+9
-7
Doit
Doit
+3
-1
Dothem
Dothem
+2
-1
KO
KO
+6
-4
ML
ML
+3
-1
Make
Make
+3
-1
WCBCC
WCBCC
+2
-1
amlook
amlook
+3
-1
cook
cook
+19
-16
未找到文件。
Announce
浏览文件 @
bd45e1c3
#!/bin/sh
# Announcement message skelton
#
MASTER
=
master
tmpbase
=
/var/tmp/git-announce.
$$
trap
'rm -f $tmpbase.*'
0
branch
=
${
1
?branch
}
...
...
@@ -17,7 +19,7 @@ maint)
kind
=
"The latest maintenance release"
;;
mainto/
*
|
maint-[0-9]
*
)
kind
=
"A maintenance release"
;;
master
)
$MASTER
)
kind
=
"The latest feature release"
;;
esac
...
...
@@ -62,7 +64,7 @@ EOF
(
echo
"
$kind
Git
$relname
is now available
$for_testing
at the usual places."
if
test
"
$branch
"
=
master
if
test
"
$branch
"
=
$MASTER
then
cat
<<-
EOF
It is comprised of
$cnt
non-merge commits since
$previous
,
...
...
@@ -111,7 +113,7 @@ fmt_people () {
}
if
test
"
$branch
"
=
master
if
test
"
$branch
"
=
$MASTER
then
cat
<<-
EOF
...
...
CheckPush
浏览文件 @
bd45e1c3
#!/bin/sh
MASTER
=
master
for
range
in
$(
prev_branch
=
{
...
...
@@ -33,7 +35,7 @@ for range in $(
'
cat
<<-
EOF
maint
master
$MASTER
next
EOF
}
|
...
...
@@ -59,7 +61,7 @@ if ! next_equiv=$(git rev-parse --verify 'jch^{/^### match next}' 2>/dev/null) |
!
git diff
--stat
--exit-code
next
$next_equiv
then
next_tree
=
$(
git rev-parse next^
{
tree
}
)
&&
next_equiv
=
$(
git rev-list
--first-parent
master
..seen |
next_equiv
=
$(
git rev-list
--first-parent
$MASTER
..seen |
xargs
-n1
sh
-c
'
echo $(git rev-parse $1^{tree}) $1
'
- |
sed
-n
-e
"s/^
$next_tree
//p"
...
...
@@ -68,13 +70,13 @@ fi
if
test
-n
"
$next_equiv
"
then
jch
=
$(
git rev-list
--first-parent
master
..jch |
wc
-l
)
&&
seen
=
$(
git rev-list
--first-parent
master
..seen |
wc
-l
)
&&
next
=
$(
git rev-list
--first-parent
master
..
$next_equiv
|
wc
-l
)
&&
jch
=
$(
git rev-list
--first-parent
$MASTER
..jch |
wc
-l
)
&&
seen
=
$(
git rev-list
--first-parent
$MASTER
..seen |
wc
-l
)
&&
next
=
$(
git rev-list
--first-parent
$MASTER
..
$next_equiv
|
wc
-l
)
&&
if
test
$jch
-le
$next
then
echo
"
master
..
$jch
..jch..
$next
..next..
$seen
..seen"
echo
"
$MASTER
..
$jch
..jch..
$next
..next..
$seen
..seen"
else
echo
"
master
..
$next
..next..
$jch
..jch..
$seen
..seen"
echo
"
$MASTER
..
$next
..next..
$jch
..jch..
$seen
..seen"
fi
fi
Doit
浏览文件 @
bd45e1c3
#!/bin/sh
test
-n
"
$branches
"
||
branches
=
'next master maint jch seen'
MASTER
=
master
test
-n
"
$branches
"
||
branches
=
"next
$MASTER
maint jch seen"
changed
=
for
b
in
$branches
...
...
Dothem
浏览文件 @
bd45e1c3
#!/bin/sh
NWD
=
contrib/workdir/git-new-workdir
MASTER
=
master
inst_prefix
=
$(
IFS
=
:
...
...
@@ -65,7 +66,7 @@ then
exit
1
fi
fi
test
-n
"
$branches
"
||
branches
=
'next master maint jch seen'
test
-n
"
$branches
"
||
branches
=
"next
$MASTER
maint jch seen"
test
-n
"
$jobs
"
||
jobs
=
-j2
find_installed
()
{
...
...
KO
浏览文件 @
bd45e1c3
...
...
@@ -3,6 +3,8 @@
# Not for general consumption; a script I used to make sure
# I do not accidentally push a rewound master to public.
MASTER
=
master
no_fetch
=
ko
=
ko
while
:
do
...
...
@@ -19,14 +21,14 @@ then
git fetch
"
$ko
"
fi
mb
=
$(
git merge-base
$ko
/
master master
)
h
=
$(
git rev-parse
$mb
$ko
/
master
|
sort
-u
|
wc
-l
)
mb
=
$(
git merge-base
$ko
/
$MASTER
$MASTER
)
h
=
$(
git rev-parse
$mb
$ko
/
$MASTER
|
sort
-u
|
wc
-l
)
if
test
"
$h
"
!=
1
then
echo
"OOOOOPPPPPPPPPPPPPPSSS!
master is not
$ko
/master
fast forward."
echo
"OOOOOPPPPPPPPPPPPPPSSS!
$MASTER
is not
$ko
/
$MASTER
fast forward."
exit
1
fi
git show-branch
--topo-order
$ko
/
master master
git show-branch
--topo-order
$ko
/
$MASTER
$MASTER
git show-branch
--topo-order
$ko
/maint maint
git show-branch
--topo-order
$ko
/next next
git show-branch
--topo-order
$ko
/seen seen
ML
浏览文件 @
bd45e1c3
#!/bin/sh
# Merge later...
:
"
${
target
:
=maint
}
"
"
${
here
:
=master
}
"
MASTER
=
master
:
"
${
target
:
=maint
}
"
"
${
here
:
=
$MASTER
}
"
# Read from RelNotes and find mergeable topics
search_topics
()
{
...
...
Make
浏览文件 @
bd45e1c3
#!/bin/sh
MASTER
=
master
if
test
-z
"
$GIT
"
then
case
"
$(
git version 2>/dev/null
)
"
in
...
...
@@ -215,7 +217,7 @@ export LANG LC_ALL
branch
=
$(
determine_branch
)
case
"
$branch
"
in
next
|
maint
|
master
|
seen
|
jch
)
next
|
maint
|
$MASTER
|
seen
|
jch
)
prefix
=
"
$inst_prefix
/git-
$branch
"
;;
snap
)
...
...
WCBCC
浏览文件 @
bd45e1c3
#!/bin/sh
MASTER
=
master
BASE
=
${
1
-HEAD
}
(
...
...
@@ -12,7 +13,7 @@ BASE=${1-HEAD}
echo
"
$branch
"
done
git
-C
Meta/ cat-file blob
"
${
BASE
}
:whats-cooking.txt"
|
sed
-ne
's/^X-master-at: / --not /p'
-e
'/^$/q'
sed
-ne
"s/^X-
$MASTER
-at: / --not /p"
-e
'/^$/q'
)
|
xargs git shortlog
-s
-e
--no-merges
|
sed
-e
's/.*</ </'
-e
'$q'
-e
's/$/,/'
amlook
浏览文件 @
bd45e1c3
...
...
@@ -4,6 +4,8 @@
# Meta/amlook id1 id2... (from the command line)
# Meta/amlook --gc
MASTER
=
master
find_commit
()
{
in
=
commits
=
...
...
@@ -43,7 +45,7 @@ find_commit () {
fi
case
"
$found
"
in
*
' maint '
*
)
in
=
maint
;;
*
' master '
*
)
in
=
master
;;
*
"
$MASTER
"
*
)
in
=
$MASTER
;;
*
' next '
*
)
in
=
next
;;
esac
if
test
-n
"
$in
"
...
...
cook
浏览文件 @
bd45e1c3
#!/usr/bin/perl -w
# Maintain "what's cooking" messages
my
$MASTER
=
'
master
';
# for now
use
strict
;
my
%reverts
=
('
next
'
=>
{
...
...
@@ -66,7 +68,7 @@ sub topic_relation {
my
$fh
;
open
(
$fh
,
'
-|
',
qw(git log --abbrev)
,
"
--format=%m %h
",
"
$one
...
$two
",
"
^
master
")
"
$one
...
$two
",
"
^
$MASTER
")
or
die
"
$!: open log --left-right
";
my
(
@left
,
@right
);
while
(
<
$fh
>
)
{
...
...
@@ -107,7 +109,7 @@ Returns a hash:
=cut
sub
get_commit
{
my
(
@base
)
=
qw(master next seen
)
;
my
(
@base
)
=
(
$MASTER
,
'
next
',
'
seen
'
);
my
$fh
;
open
(
$fh
,
'
-|
',
qw(git for-each-ref)
,
...
...
@@ -206,8 +208,8 @@ sub get_commit {
open
(
$fh
,
'
-|
',
qw(git log --first-parent --abbrev)
,
"
--format=%ci %h %p :%s
",
"
master
..next
")
or
die
"
$!: open log
master
..next
";
"
--format=%ci %h %p :%s
",
"
$MASTER
..next
")
or
die
"
$!: open log
$MASTER
..next
";
while
(
<
$fh
>
)
{
my
(
$date
,
$commit
,
$parent
,
$tips
);
unless
((
$date
,
$commit
,
$parent
,
$tips
)
=
...
...
@@ -220,7 +222,7 @@ sub get_commit {
$co
->
{'
merged
'}
=
"
(merged to 'next' on
$date
at
$commit
)
";
}
}
close
(
$fh
)
or
die
"
$!: close log
master
..next
";
close
(
$fh
)
or
die
"
$!: close log
$MASTER
..next
";
for
my
$branch
(
keys
%topic
)
{
my
@log
=
();
...
...
@@ -300,7 +302,7 @@ EOF
To: git\@vger.kernel.org
Bcc: lwn\@lwn.net
Subject: What's cooking in git.git ($mon $year, #$issue; $dow, $date)
X-
master
-at: $master_at
X-
$MASTER
-at: $master_at
X-next-at: $next_at
What's cooking in git.git ($mon $year, #$issue; $dow, $date)
...
...
@@ -314,7 +316,7 @@ EOF
my
$blurb_match
=
<<'EOF';
(?:(?i:\s*[a-z]+: .*|\s.*)\n)*?Subject: What's cooking in \S+ \((\w+) (\d+), #(\d+); (\w+), (\d+)\)
X-
master
-at: ([0-9a-f]{40})
X-
[a-z]*
-at: ([0-9a-f]{40})
X-next-at: ([0-9a-f]{40})
What's cooking in \S+ \(\1 \2, #\3; \4, \5\)
...
...
@@ -476,7 +478,7 @@ sub write_cooking {
close
(
$fh
);
}
my
$graduated
=
'
Graduated to "master"
'
;
my
$graduated
=
"
Graduated to '
$MASTER
'
"
;
my
$new_topics
=
'
New Topics
';
my
$discarded
=
'
Discarded
';
my
$cooking_topics
=
'
Cooking
';
...
...
@@ -488,11 +490,11 @@ sub update_issue {
open
(
$fh
,
'
-|
',
qw(git for-each-ref)
,
"
--format=%(refname:short) %(objectname)
",
"
refs/heads/
master
",
"
refs/heads/
$MASTER
",
"
refs/heads/next
")
or
die
"
$!: open for-each-ref
";
while
(
<
$fh
>
)
{
my
(
$branch
,
$at
)
=
/^(\S+) (\S+)$/
;
if
(
$branch
eq
'
master
'
)
{
$master_at
=
$at
;
}
if
(
$branch
eq
$MASTER
)
{
$master_at
=
$at
;
}
if
(
$branch
eq
'
next
')
{
$next_at
=
$at
;
}
}
close
(
$fh
)
or
die
"
$!: close for-each-ref
";
...
...
@@ -564,11 +566,11 @@ sub tweak_willdo {
my
$text
=
$td
->
{'
text
'};
if
(
!
defined
$mergetomaster
)
{
my
$master
=
`
git describe
master
`;
my
$master
=
`
git describe
$MASTER
`;
if
(
$master
=~
/-rc\d+(-\d+-g[0-9a-f]+)?$/
)
{
$mergetomaster
=
"
Will cook in 'next'.
";
}
else
{
$mergetomaster
=
"
Will merge to '
master
'.
";
$mergetomaster
=
"
Will merge to '
$MASTER
'.
";
}
}
...
...
@@ -580,7 +582,7 @@ sub tweak_willdo {
if
(
$desc
=~
/^ \(merged to 'next'/m
)
{
$text
=~
s/^ Will merge to 'next'\.$/ $mergetomaster/m
;
$text
=~
s/^ Will merge to and (then )?cook in 'next'\.$/ Will cook in 'next'./m
;
$text
=~
s/^ Will merge to 'next' and (then )?to '
master'\.$/ Will merge to 'master
'./m
;
$text
=~
s/^ Will merge to 'next' and (then )?to '
$MASTER'\.$/ Will merge to '$MASTER
'./m
;
}
$td
->
{'
text
'}
=
$text
;
}
...
...
@@ -590,7 +592,7 @@ sub tweak_graduated {
# Remove the "Will merge" marker from topics that have graduated.
for
(
$td
->
{'
text
'})
{
s/\n Will merge to '
master
'\.(\n|$)//s
;
s/\n Will merge to '
$MASTER
'\.(\n|$)//s
;
}
}
...
...
@@ -825,12 +827,13 @@ sub havedone {
my
(
$topic
,
$to_maint
,
%to_maint
,
%merged
,
$in_desc
);
if
(
!
@ARGV
)
{
open
(
$fh
,
'
-|
',
qw(git rev-list --first-parent -1 master Documentation/RelNotes RelNotes)
)
qw(git rev-list --first-parent -1)
,
$MASTER
,
qw(-- Documentation/RelNotes RelNotes)
)
or
die
"
$!: open rev-list
";
my
(
$rev
)
=
<
$fh
>
;
close
(
$fh
)
or
die
"
$!: close rev-list
";
chomp
$rev
;
@ARGV
=
("
$rev
..
master
");
@ARGV
=
("
$rev
..
$MASTER
");
}
open
(
$fh
,
'
-|
',
qw(git log --first-parent --oneline --reverse)
,
@ARGV
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录