From dc61b10d987d32522803044eccaa801ffbca4bfe Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Sat, 14 Apr 2007 00:19:05 +0200 Subject: [PATCH 1/7] Use rev-list --reverse in git-rebase.sh ...and drop the last perl dependency in the script. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- git-rebase.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git-rebase.sh b/git-rebase.sh index 1d96f32685..2dc2c4fe9b 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -339,8 +339,7 @@ prev_head=`git-rev-parse HEAD^0` echo "$prev_head" > "$dotest/prev_head" msgnum=0 -for cmt in `git-rev-list --no-merges "$upstream"..ORIG_HEAD \ - | @@PERL@@ -e 'print reverse <>'` +for cmt in `git-rev-list --reverse --no-merges "$upstream"..ORIG_HEAD` do msgnum=$(($msgnum + 1)) echo "$cmt" > "$dotest/cmt.$msgnum" From 1ad029b6a1e2fb0254667a2bea8d1ee180cc6ac7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 13 Apr 2007 03:23:20 -0700 Subject: [PATCH 2/7] Do not default to --no-index when given two directories. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-diff -- a/ b/ always defaulted to --no-index, primarily because the function is_in_index() was implemented quite incorrectly. Noticed by Patrick Maaß and Simon Schubert independently, initial patch was provided by Patrick but I fixed it differently. Signed-off-by: Junio C Hamano --- diff-lib.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/diff-lib.c b/diff-lib.c index 5c5b05bfe3..7531e20c78 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -142,18 +142,34 @@ static int queue_diff(struct diff_options *o, } } +/* + * Does the path name a blob in the working tree, or a directory + * in the working tree? + */ static int is_in_index(const char *path) { - int len = strlen(path); - int pos = cache_name_pos(path, len); - char c; + int len, pos; + struct cache_entry *ce; - if (pos < 0) - return 0; - if (strncmp(active_cache[pos]->name, path, len)) - return 0; - c = active_cache[pos]->name[len]; - return c == '\0' || c == '/'; + len = strlen(path); + while (path[len-1] == '/') + len--; + if (!len) + return 1; /* "." */ + pos = cache_name_pos(path, len); + if (0 <= pos) + return 1; + pos = -1 - pos; + while (pos < active_nr) { + ce = active_cache[pos++]; + if (ce_namelen(ce) <= len || + strncmp(ce->name, path, len) || + (ce->name[len] > '/')) + break; /* path cannot be a prefix */ + if (ce->name[len] == '/') + return 1; + } + return 0; } static int handle_diff_files_args(struct rev_info *revs, From eabb0bfd09031d334152a268c47feb2bc3796a3e Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 13 Apr 2007 18:02:30 +0200 Subject: [PATCH 3/7] config.txt: Document gitcvs.allbinary Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- Documentation/config.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index cf1e040381..061c585629 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -408,6 +408,13 @@ gitcvs.logfile:: Path to a log file where the cvs pserver interface well... logs various stuff. See gitlink:git-cvsserver[1]. +gitcvs.allbinary:: + If true, all files are sent to the client in mode '-kb'. This + causes the client to treat all files as binary files which suppresses + any newline munging it otherwise might do. A work-around for the + fact that there is no way yet to set single files to mode '-kb'. + See gitlink:git-cvsserver[1]. + http.sslVerify:: Whether to verify the SSL certificate when fetching or pushing over HTTPS. Can be overridden by the 'GIT_SSL_NO_VERIFY' environment From 5cb71f82de7fc370dfcd7aad505c36d89e8fec5d Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 13 Apr 2007 18:02:31 +0200 Subject: [PATCH 4/7] config.txt: Document core.autocrlf Text shamelessly stolen from the 1.5.1 release notes. Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- Documentation/config.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 061c585629..38831bc906 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -117,6 +117,16 @@ core.fileMode:: the working copy are ignored; useful on broken filesystems like FAT. See gitlink:git-update-index[1]. True by default. +core.autocrlf:: + If true, makes git convert `CRLF` at the end of lines in text files to + `LF` when reading from the filesystem, and convert in reverse when + writing to the filesystem. The variable can be set to + 'input', in which case the conversion happens only while + reading from the filesystem but files are written out with + `LF` at the end of lines. Currently, which paths to consider + "text" (i.e. be subjected to the autocrlf mechanism) is + decided purely based on the contents. + core.symlinks:: If false, symbolic links are checked out as small plain files that contain the link text. gitlink:git-update-index[1] and From 5007af8c7ed04ae5074ee84491526d416d460f97 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 13 Apr 2007 18:02:32 +0200 Subject: [PATCH 5/7] config.txt: Change pserver to server in description of gitcvs.* These variables apply to the SSH access as well, so don't use pserver here which might confuse users. Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- Documentation/config.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 38831bc906..e5be570481 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -411,11 +411,11 @@ gc.rerereunresolved:: The default is 15 days. See gitlink:git-rerere[1]. gitcvs.enabled:: - Whether the cvs pserver interface is enabled for this repository. + Whether the cvs server interface is enabled for this repository. See gitlink:git-cvsserver[1]. gitcvs.logfile:: - Path to a log file where the cvs pserver interface well... logs + Path to a log file where the cvs server interface well... logs various stuff. See gitlink:git-cvsserver[1]. gitcvs.allbinary:: From befc9c42043d67c2ccf5a8a0b660aac8e84bbeee Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 13 Apr 2007 18:02:33 +0200 Subject: [PATCH 6/7] config.txt: Fix grammatical error in description of http.noEPSV s/doesn't/don't/ since "ftp servers" is plural Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- Documentation/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index e5be570481..7e41ca6a0d 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -462,7 +462,7 @@ http.lowSpeedLimit, http.lowSpeedTime:: http.noEPSV:: A boolean which disables using of EPSV ftp command by curl. - This can helpful with some "poor" ftp servers which doesn't + This can helpful with some "poor" ftp servers which don't support EPSV mode. Can be overridden by the 'GIT_CURL_FTP_NO_EPSV' environment variable. Default is false (curl will use EPSV). From 1fa9bf362acbe2c939c246684ab0fe59aec74ba8 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 13 Apr 2007 14:34:18 -0700 Subject: [PATCH 7/7] git-quiltimport complaining yet still working There were two bugs: "stop_here" doesn't exist, but the bug that causes this code to trigger in the *first* place is the wrong use of "$dotest". It should be ".dotest" This is essentially the same bug introduced by 87ab7992, one was fixed with 0d38ab25 but this was somehow left behind. Signed-off-by: Junio C Hamano --- git-quiltimport.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-quiltimport.sh b/git-quiltimport.sh index edccd82755..018cc75bd0 100755 --- a/git-quiltimport.sh +++ b/git-quiltimport.sh @@ -73,9 +73,9 @@ mkdir $tmp_dir || exit 2 for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do echo $patch_name (cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3 - test -s $dotest/patch || { + test -s .dotest/patch || { echo "Patch is empty. Was is split wrong?" - stop_here $this + exit 1 } # Parse the author information