Merge branch 'maint'

* maint:
  Documentation: cloning to empty directory is allowed
  Clarify kind of conflict in merge-one-file helper
  git config: clarify --add and --get-color
  archive-tar.c: squelch a type mismatch warning
This commit is contained in:
Junio C Hamano 2009-05-09 09:27:43 -07:00
commit 6345d7a0d1
4 changed files with 14 additions and 6 deletions

View File

@ -149,7 +149,7 @@ then the cloned repository will become corrupt.
part of the source repository is used if no directory is part of the source repository is used if no directory is
explicitly given ("repo" for "/path/to/repo.git" and "foo" explicitly given ("repo" for "/path/to/repo.git" and "foo"
for "host.xz:foo/.git"). Cloning into an existing directory for "host.xz:foo/.git"). Cloning into an existing directory
is not allowed. is only allowed if the directory is empty.
:git-clone: 1 :git-clone: 1
include::urls.txt[] include::urls.txt[]

View File

@ -69,7 +69,8 @@ OPTIONS
--add:: --add::
Adds a new line to the option without altering any existing Adds a new line to the option without altering any existing
values. This is the same as providing '^$' as the value_regex. values. This is the same as providing '^$' as the value_regex
in `--replace-all`.
--get:: --get::
Get the value for a given key (optionally filtered by a regex Get the value for a given key (optionally filtered by a regex
@ -155,7 +156,7 @@ See also <<FILES>>.
When the color setting for `name` is undefined, the command uses When the color setting for `name` is undefined, the command uses
`color.ui` as fallback. `color.ui` as fallback.
--get-color name default:: --get-color name [default]::
Find the color configured for `name` (e.g. `color.diff.new`) and Find the color configured for `name` (e.g. `color.diff.new`) and
output it as the ANSI color escape sequence to the standard output it as the ANSI color escape sequence to the standard

View File

@ -180,7 +180,7 @@ static int write_tar_entry(struct archiver_args *args,
sprintf(header.mode, "%07o", mode & 07777); sprintf(header.mode, "%07o", mode & 07777);
sprintf(header.size, "%011lo", S_ISREG(mode) ? size : 0); sprintf(header.size, "%011lo", S_ISREG(mode) ? size : 0);
sprintf(header.mtime, "%011lo", args->time); sprintf(header.mtime, "%011lo", (unsigned long) args->time);
sprintf(header.uid, "%07o", 0); sprintf(header.uid, "%07o", 0);
sprintf(header.gid, "%07o", 0); sprintf(header.gid, "%07o", 0);

View File

@ -113,6 +113,10 @@ case "${1:-.}${2:-.}${3:-.}" in
src1=`git-unpack-file $2` src1=`git-unpack-file $2`
git merge-file "$src1" "$orig" "$src2" git merge-file "$src1" "$orig" "$src2"
ret=$? ret=$?
msg=
if [ $ret -ne 0 ]; then
msg='content conflict'
fi
# Create the working tree file, using "our tree" version from the # Create the working tree file, using "our tree" version from the
# index, and then store the result of the merge. # index, and then store the result of the merge.
@ -120,7 +124,10 @@ case "${1:-.}${2:-.}${3:-.}" in
rm -f -- "$orig" "$src1" "$src2" rm -f -- "$orig" "$src1" "$src2"
if [ "$6" != "$7" ]; then if [ "$6" != "$7" ]; then
echo "ERROR: Permissions conflict: $5->$6,$7." if [ -n "$msg" ]; then
msg="$msg, "
fi
msg="${msg}permissions conflict: $5->$6,$7"
ret=1 ret=1
fi fi
if [ "$1" = '' ]; then if [ "$1" = '' ]; then
@ -128,7 +135,7 @@ case "${1:-.}${2:-.}${3:-.}" in
fi fi
if [ $ret -ne 0 ]; then if [ $ret -ne 0 ]; then
echo "ERROR: Merge conflict in $4" echo "ERROR: $msg in $4"
exit 1 exit 1
fi fi
exec git update-index -- "$4" exec git update-index -- "$4"