Skip to content

Commit 6345d7a

Browse files
committed
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
2 parents be427d7 + ec00d6e commit 6345d7a

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

Documentation/git-clone.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ then the cloned repository will become corrupt.
149149
part of the source repository is used if no directory is
150150
explicitly given ("repo" for "/path/to/repo.git" and "foo"
151151
for "host.xz:foo/.git"). Cloning into an existing directory
152-
is not allowed.
152+
is only allowed if the directory is empty.
153153

154154
:git-clone: 1
155155
include::urls.txt[]

Documentation/git-config.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ OPTIONS
6969

7070
--add::
7171
Adds a new line to the option without altering any existing
72-
values. This is the same as providing '^$' as the value_regex.
72+
values. This is the same as providing '^$' as the value_regex
73+
in `--replace-all`.
7374

7475
--get::
7576
Get the value for a given key (optionally filtered by a regex
@@ -155,7 +156,7 @@ See also <<FILES>>.
155156
When the color setting for `name` is undefined, the command uses
156157
`color.ui` as fallback.
157158

158-
--get-color name default::
159+
--get-color name [default]::
159160

160161
Find the color configured for `name` (e.g. `color.diff.new`) and
161162
output it as the ANSI color escape sequence to the standard

archive-tar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int write_tar_entry(struct archiver_args *args,
180180

181181
sprintf(header.mode, "%07o", mode & 07777);
182182
sprintf(header.size, "%011lo", S_ISREG(mode) ? size : 0);
183-
sprintf(header.mtime, "%011lo", args->time);
183+
sprintf(header.mtime, "%011lo", (unsigned long) args->time);
184184

185185
sprintf(header.uid, "%07o", 0);
186186
sprintf(header.gid, "%07o", 0);

git-merge-one-file.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,29 @@ case "${1:-.}${2:-.}${3:-.}" in
113113
src1=`git-unpack-file $2`
114114
git merge-file "$src1" "$orig" "$src2"
115115
ret=$?
116+
msg=
117+
if [ $ret -ne 0 ]; then
118+
msg='content conflict'
119+
fi
116120

117121
# Create the working tree file, using "our tree" version from the
118122
# index, and then store the result of the merge.
119123
git checkout-index -f --stage=2 -- "$4" && cat "$src1" >"$4"
120124
rm -f -- "$orig" "$src1" "$src2"
121125

122126
if [ "$6" != "$7" ]; then
123-
echo "ERROR: Permissions conflict: $5->$6,$7."
127+
if [ -n "$msg" ]; then
128+
msg="$msg, "
129+
fi
130+
msg="${msg}permissions conflict: $5->$6,$7"
124131
ret=1
125132
fi
126133
if [ "$1" = '' ]; then
127134
ret=1
128135
fi
129136

130137
if [ $ret -ne 0 ]; then
131-
echo "ERROR: Merge conflict in $4"
138+
echo "ERROR: $msg in $4"
132139
exit 1
133140
fi
134141
exec git update-index -- "$4"

0 commit comments

Comments
 (0)