Skip to content

Commit edb4fd7

Browse files
author
Junio C Hamano
committed
Merge branch 'maint'
* maint: git-quiltimport complaining yet still working config.txt: Fix grammatical error in description of http.noEPSV config.txt: Change pserver to server in description of gitcvs.* config.txt: Document core.autocrlf config.txt: Document gitcvs.allbinary Do not default to --no-index when given two directories. Use rev-list --reverse in git-rebase.sh
2 parents d016a89 + 1fa9bf3 commit edb4fd7

File tree

4 files changed

+49
-17
lines changed

4 files changed

+49
-17
lines changed

Documentation/config.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ core.fileMode::
117117
the working copy are ignored; useful on broken filesystems like FAT.
118118
See gitlink:git-update-index[1]. True by default.
119119

120+
core.autocrlf::
121+
If true, makes git convert `CRLF` at the end of lines in text files to
122+
`LF` when reading from the filesystem, and convert in reverse when
123+
writing to the filesystem. The variable can be set to
124+
'input', in which case the conversion happens only while
125+
reading from the filesystem but files are written out with
126+
`LF` at the end of lines. Currently, which paths to consider
127+
"text" (i.e. be subjected to the autocrlf mechanism) is
128+
decided purely based on the contents.
129+
120130
core.symlinks::
121131
If false, symbolic links are checked out as small plain files that
122132
contain the link text. gitlink:git-update-index[1] and
@@ -401,13 +411,20 @@ gc.rerereunresolved::
401411
The default is 15 days. See gitlink:git-rerere[1].
402412

403413
gitcvs.enabled::
404-
Whether the cvs pserver interface is enabled for this repository.
414+
Whether the cvs server interface is enabled for this repository.
405415
See gitlink:git-cvsserver[1].
406416

407417
gitcvs.logfile::
408-
Path to a log file where the cvs pserver interface well... logs
418+
Path to a log file where the cvs server interface well... logs
409419
various stuff. See gitlink:git-cvsserver[1].
410420

421+
gitcvs.allbinary::
422+
If true, all files are sent to the client in mode '-kb'. This
423+
causes the client to treat all files as binary files which suppresses
424+
any newline munging it otherwise might do. A work-around for the
425+
fact that there is no way yet to set single files to mode '-kb'.
426+
See gitlink:git-cvsserver[1].
427+
411428
http.sslVerify::
412429
Whether to verify the SSL certificate when fetching or pushing
413430
over HTTPS. Can be overridden by the 'GIT_SSL_NO_VERIFY' environment
@@ -445,7 +462,7 @@ http.lowSpeedLimit, http.lowSpeedTime::
445462

446463
http.noEPSV::
447464
A boolean which disables using of EPSV ftp command by curl.
448-
This can helpful with some "poor" ftp servers which doesn't
465+
This can helpful with some "poor" ftp servers which don't
449466
support EPSV mode. Can be overridden by the 'GIT_CURL_FTP_NO_EPSV'
450467
environment variable. Default is false (curl will use EPSV).
451468

diff-lib.c

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,34 @@ static int queue_diff(struct diff_options *o,
142142
}
143143
}
144144

145+
/*
146+
* Does the path name a blob in the working tree, or a directory
147+
* in the working tree?
148+
*/
145149
static int is_in_index(const char *path)
146150
{
147-
int len = strlen(path);
148-
int pos = cache_name_pos(path, len);
149-
char c;
150-
151-
if (pos < 0)
152-
return 0;
153-
if (strncmp(active_cache[pos]->name, path, len))
154-
return 0;
155-
c = active_cache[pos]->name[len];
156-
return c == '\0' || c == '/';
151+
int len, pos;
152+
struct cache_entry *ce;
153+
154+
len = strlen(path);
155+
while (path[len-1] == '/')
156+
len--;
157+
if (!len)
158+
return 1; /* "." */
159+
pos = cache_name_pos(path, len);
160+
if (0 <= pos)
161+
return 1;
162+
pos = -1 - pos;
163+
while (pos < active_nr) {
164+
ce = active_cache[pos++];
165+
if (ce_namelen(ce) <= len ||
166+
strncmp(ce->name, path, len) ||
167+
(ce->name[len] > '/'))
168+
break; /* path cannot be a prefix */
169+
if (ce->name[len] == '/')
170+
return 1;
171+
}
172+
return 0;
157173
}
158174

159175
static int handle_diff_files_args(struct rev_info *revs,

git-quiltimport.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ mkdir $tmp_dir || exit 2
7373
for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
7474
echo $patch_name
7575
(cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
76-
test -s $dotest/patch || {
76+
test -s .dotest/patch || {
7777
echo "Patch is empty. Was is split wrong?"
78-
stop_here $this
78+
exit 1
7979
}
8080

8181
# Parse the author information

git-rebase.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ prev_head=`git-rev-parse HEAD^0`
339339
echo "$prev_head" > "$dotest/prev_head"
340340

341341
msgnum=0
342-
for cmt in `git-rev-list --no-merges "$upstream"..ORIG_HEAD \
343-
| @@PERL@@ -e 'print reverse <>'`
342+
for cmt in `git-rev-list --reverse --no-merges "$upstream"..ORIG_HEAD`
344343
do
345344
msgnum=$(($msgnum + 1))
346345
echo "$cmt" > "$dotest/cmt.$msgnum"

0 commit comments

Comments
 (0)