mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Merge fixes up to GIT 1.1.6
This commit is contained in:
commit
36b5b3c659
|
@ -7,7 +7,7 @@ git-branch - Create a new branch, or remove an old one.
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git-branch' [-d | -D] [<branchname> [start-point]]
|
'git-branch' [(-d | -D) <branchname>] | [[-f] <branchname> [<start-point>]]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
@ -25,10 +25,13 @@ OPTIONS
|
||||||
-D::
|
-D::
|
||||||
Delete a branch irrespective of its index status.
|
Delete a branch irrespective of its index status.
|
||||||
|
|
||||||
|
-f::
|
||||||
|
Force a reset of <branchname> to <start-point> (or current head).
|
||||||
|
|
||||||
<branchname>::
|
<branchname>::
|
||||||
The name of the branch to create or delete.
|
The name of the branch to create or delete.
|
||||||
|
|
||||||
start-point::
|
<start-point>::
|
||||||
Where to create the branch; defaults to HEAD. This
|
Where to create the branch; defaults to HEAD. This
|
||||||
option has no meaning with -d and -D.
|
option has no meaning with -d and -D.
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,10 @@ include::pull-fetch-param.txt[]
|
||||||
line.
|
line.
|
||||||
|
|
||||||
-f, \--force::
|
-f, \--force::
|
||||||
Usually, the command refuses to update a local ref that is
|
Usually, the command refuses to update a remote ref that is
|
||||||
not an ancestor of the remote ref used to overwrite it.
|
not a descendent of the local ref used to overwrite it.
|
||||||
This flag disables the check. What this means is that the
|
This flag disables the check. This can cause the
|
||||||
local repository can lose commits; use it with care.
|
remote repository to lose commits; use it with care.
|
||||||
|
|
||||||
|
|
||||||
Author
|
Author
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/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.
|
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 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>.'
|
If two arguments, create a new branch <branchname> based off of <start-point>.'
|
||||||
|
|
|
@ -205,11 +205,16 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
|
||||||
orig = runProgram(['git-unpack-file', oSha]).rstrip()
|
orig = runProgram(['git-unpack-file', oSha]).rstrip()
|
||||||
src1 = runProgram(['git-unpack-file', aSha]).rstrip()
|
src1 = runProgram(['git-unpack-file', aSha]).rstrip()
|
||||||
src2 = runProgram(['git-unpack-file', bSha]).rstrip()
|
src2 = runProgram(['git-unpack-file', bSha]).rstrip()
|
||||||
[out, code] = runProgram(['merge',
|
try:
|
||||||
'-L', branch1Name + '/' + aPath,
|
[out, code] = runProgram(['merge',
|
||||||
'-L', 'orig/' + oPath,
|
'-L', branch1Name + '/' + aPath,
|
||||||
'-L', branch2Name + '/' + bPath,
|
'-L', 'orig/' + oPath,
|
||||||
src1, orig, src2], returnCode=True)
|
'-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',
|
sha = runProgram(['git-hash-object', '-t', 'blob', '-w',
|
||||||
src1]).rstrip()
|
src1]).rstrip()
|
||||||
|
|
|
@ -10,8 +10,16 @@
|
||||||
# This is slightly modified from Andrew Morton's Perfect Patch.
|
# This is slightly modified from Andrew Morton's Perfect Patch.
|
||||||
# Lines you introduce should not have trailing whitespace.
|
# Lines you introduce should not have trailing whitespace.
|
||||||
# Also check for an indentation that has SP before a TAB.
|
# 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 '
|
perl -e '
|
||||||
my $fh;
|
|
||||||
my $found_bad = 0;
|
my $found_bad = 0;
|
||||||
my $filename;
|
my $filename;
|
||||||
my $reported_filename = "";
|
my $reported_filename = "";
|
||||||
|
@ -31,8 +39,7 @@ perl -e '
|
||||||
print STDERR "* $why (line $lineno)\n";
|
print STDERR "* $why (line $lineno)\n";
|
||||||
print STDERR "$filename:$lineno:$line\n";
|
print STDERR "$filename:$lineno:$line\n";
|
||||||
}
|
}
|
||||||
open $fh, "-|", qw(git-diff-index -p -M --cached HEAD);
|
while (<>) {
|
||||||
while (<$fh>) {
|
|
||||||
if (m|^diff --git a/(.*) b/\1$|) {
|
if (m|^diff --git a/(.*) b/\1$|) {
|
||||||
$filename = $1;
|
$filename = $1;
|
||||||
next;
|
next;
|
||||||
|
|
Loading…
Reference in a new issue