Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
36b5b3c6
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,发现更多精彩内容 >>
提交
36b5b3c6
编写于
1月 29, 2006
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge fixes up to GIT 1.1.6
上级
34801cab
8fedb83c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
15 deletion
+30
-15
Documentation/git-branch.txt
Documentation/git-branch.txt
+5
-2
Documentation/git-push.txt
Documentation/git-push.txt
+4
-4
git-branch.sh
git-branch.sh
+1
-1
git-merge-recursive.py
git-merge-recursive.py
+10
-5
templates/hooks--pre-commit
templates/hooks--pre-commit
+10
-3
未找到文件。
Documentation/git-branch.txt
浏览文件 @
36b5b3c6
...
...
@@ -7,7 +7,7 @@ git-branch - Create a new branch, or remove an old one.
SYNOPSIS
--------
'git-branch' [
-d | -D] [<branchname> [start-point
]]
'git-branch' [
(-d | -D) <branchname>] | [[-f] <branchname> [<start-point>
]]
DESCRIPTION
-----------
...
...
@@ -25,10 +25,13 @@ OPTIONS
-D::
Delete a branch irrespective of its index status.
-f::
Force a reset of <branchname> to <start-point> (or current head).
<branchname>::
The name of the branch to create or delete.
start-point
::
<start-point>
::
Where to create the branch; defaults to HEAD. This
option has no meaning with -d and -D.
...
...
Documentation/git-push.txt
浏览文件 @
36b5b3c6
...
...
@@ -35,10 +35,10 @@ include::pull-fetch-param.txt[]
line.
-f, \--force::
Usually, the command refuses to update a
local
ref that is
not a
n ancestor of the remote
ref used to overwrite it.
This flag disables the check.
What this means is that
the
local repository can
lose commits; use it with care.
Usually, the command refuses to update a
remote
ref that is
not a
descendent of the local
ref used to overwrite it.
This flag disables the check.
This can cause
the
remote repository to
lose commits; use it with care.
Author
...
...
git-branch.sh
浏览文件 @
36b5b3c6
#!/bin/sh
USAGE
=
'[
-d <branch>] | [[-f] <branch> [start-point
]]'
USAGE
=
'[
(-d | -D) <branchname>] | [[-f] <branchname> [<start-point>
]]'
LONG_USAGE
=
'If no arguments, show available branches and mark current branch with a star.
If one argument, create a new branch <branchname> based off of current HEAD.
If two arguments, create a new branch <branchname> based off of <start-point>.'
...
...
git-merge-recursive.py
浏览文件 @
36b5b3c6
...
...
@@ -205,11 +205,16 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
orig
=
runProgram
([
'git-unpack-file'
,
oSha
]).
rstrip
()
src1
=
runProgram
([
'git-unpack-file'
,
aSha
]).
rstrip
()
src2
=
runProgram
([
'git-unpack-file'
,
bSha
]).
rstrip
()
[
out
,
code
]
=
runProgram
([
'merge'
,
'-L'
,
branch1Name
+
'/'
+
aPath
,
'-L'
,
'orig/'
+
oPath
,
'-L'
,
branch2Name
+
'/'
+
bPath
,
src1
,
orig
,
src2
],
returnCode
=
True
)
try
:
[
out
,
code
]
=
runProgram
([
'merge'
,
'-L'
,
branch1Name
+
'/'
+
aPath
,
'-L'
,
'orig/'
+
oPath
,
'-L'
,
branch2Name
+
'/'
+
bPath
,
src1
,
orig
,
src2
],
returnCode
=
True
)
except
ProgramError
,
e
:
print
>>
sys
.
stderr
,
e
die
(
"Failed to execute 'merge'. merge(1) is used as the "
"file-level merge tool. Is 'merge' in your path?"
)
sha
=
runProgram
([
'git-hash-object'
,
'-t'
,
'blob'
,
'-w'
,
src1
]).
rstrip
()
...
...
templates/hooks--pre-commit
浏览文件 @
36b5b3c6
...
...
@@ -10,8 +10,16 @@
# This is slightly modified from Andrew Morton's Perfect Patch.
# Lines you introduce should not have trailing whitespace.
# Also check for an indentation that has SP before a TAB.
if
git-rev-parse
--verify
HEAD 2>/dev/null
then
git-diff-index
-p
-M
--cached
HEAD
else
# NEEDSWORK: we should produce a diff with an empty tree here
# if we want to do the same verification for the initial import.
:
fi
|
perl
-e
'
my $fh;
my $found_bad = 0;
my $filename;
my $reported_filename = "";
...
...
@@ -31,8 +39,7 @@ perl -e '
print STDERR "* $why (line $lineno)\n";
print STDERR "$filename:$lineno:$line\n";
}
open $fh, "-|", qw(git-diff-index -p -M --cached HEAD);
while (<$fh>) {
while (<>) {
if (m|^diff --git a/(.*) b/\1$|) {
$filename = $1;
next;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录