* [PATCH 2/2] Add sample ignore logic to git-run-with-user-path command.
@ 2005-05-16 6:06 8% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2005-05-16 6:06 UTC (permalink / raw)
To: pasky; +Cc: git, torvalds
This adds a sample ignore file logic to git-run-with-user-path
command. This is primarily to serve as an example for plugging
ignore file logic to the previously introduced framework, and to
spur mailing list discussions on what the final ignore file
logic should be, and where the information should come from.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
Documentation/git-run-with-user-path.txt | 32 ++++++++
Makefile | 6 +
paths.c | 117 +++++++++++++++++++++++++++++--
t/t7001-git-run-with-user-path-ignore.sh | 67 +++++++++++++++++
4 files changed, 215 insertions(+), 7 deletions(-)
t/t7001-git-run-with-user-path-ignore.sh (. --> 100755)
--- a/Documentation/git-run-with-user-path.txt
+++ b/Documentation/git-run-with-user-path.txt
@@ -53,6 +53,38 @@
--no-ignore flag, there is no such filtering done.
+IGNORE FILES
+------------
+
+This command currently uses a pcre based implementation to express
+ignore patterns. The purpose of this implementation is to primarily
+serve as an example and to start GIT mailing list discussions, and by no
+means is cast in stone. This section describes what this sample
+implementation does.
+
+The information used to define which paths to ignore is read from two
+files. Both files use the same syntax.
+
+First, $CIT_DIR/ignore is read. Then, the file whose path (relative to
+the project top) recorded in $GIT_DIR/info/ignore-file is read next.
+The latter file is expected to be revision controlled with GIT.
+
+These two files should record one ignore record per line. A line that
+is empty, and a line that starts with a '#' are ignored and used as
+comments.
+
+Each ignore record is a pcre regular expression, optionally prefixed
+with a '!'. To determine if a path is to be ignored, the path is
+matched against each ignore record in the order they appear in the
+ignore file. If the ignore record matches the path, and it does not
+have the optional '!', then the path is ignored. Otherwise, the path is
+not ignored. In either case, the rest of ignore records are not used
+after the first match. This means (1) an earlier entry in an ignore
+file has precedence over later ones, and (2) the entries in
+$GIT_DIR/ignore file have precedence over the ones in the file named
+by $GIT_DIR/info/ignore-file.
+
+
ENVIRONMENT VARIABLES
---------------------
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,12 @@
LIBS = $(LIB_FILE)
LIBS += -lz
+IGNORE_USING_PCRE=1
+
+ifdef IGNORE_USING_PCRE
+ LIBS += -lpcreposix
+endif
+
ifdef MOZILLA_SHA1
SHA1_HEADER="mozilla-sha1/sha1.h"
LIB_OBJS += mozilla-sha1/sha1.o
--- a/paths.c
+++ b/paths.c
@@ -2,6 +2,7 @@
* Copyright (c) 2005 Junio C Hamano
*/
#include <string.h>
+#include <pcreposix.h>
#include "cache.h"
#include "paths.h"
@@ -37,23 +38,125 @@
}
}
+static struct ignore_entry {
+ int negate;
+ regex_t regexp;
+} **ignore_list;
+static int ignore_nr;
+static int ignore_alloc;
+
+static void add_ignore(const char *buf)
+{
+ struct ignore_entry *ie = xmalloc(sizeof(*ie));
+ if (buf[0] == '!') {
+ ie->negate = 1;
+ buf++;
+ }
+ else
+ ie->negate = 0;
+
+ if (regcomp(&(ie->regexp), buf, 0)) {
+ fprintf(stderr, "bad regexp <%s>\n", buf);
+ free(ie);
+ return;
+ }
+ if (ignore_alloc <= ignore_nr) {
+ ignore_alloc = alloc_nr(ignore_alloc);
+ ignore_list = xrealloc(ignore_list,
+ ignore_alloc * sizeof(ie));
+ }
+ ignore_list[ignore_nr++] = ie;
+}
+
+static void read_ignore_list(const char *path)
+{
+ FILE *in;
+ char buf[1024];
+ in = fopen(path, "r");
+ if (!in)
+ return;
+ while (fgets(buf, sizeof(buf), in) != NULL) {
+ int l = strlen(buf);
+ /* An empty line and a line that starts with # is comment. */
+ if (buf[0] != '#' && buf[0] != '\n' && buf[l-1] == '\n') {
+ buf[l-1] = 0;
+ add_ignore(buf);
+ }
+ }
+ fclose(in);
+}
+
+static void read_ignore_list_from_file(const char *path)
+{
+ char filename[PATH_MAX];
+ int len;
+ FILE *in;
+
+ in = fopen(path, "r");
+ if (!in)
+ return;
+ strcpy(filename, git_project_top);
+ len = strlen(filename);
+ filename[len++] = '/';
+ if (fgets(filename + len, sizeof(filename) - len, in) == NULL) {
+ fclose(in);
+ return;
+ }
+ fclose(in);
+ len = strlen(filename);
+ if (filename[len-1] != '\n')
+ return;
+ filename[len-1] = 0;
+ read_ignore_list(filename);
+}
+
static int initialize_ignore_list(void)
{
- /* Put the Porcelain layer ignore logic initialization here.
- * Return non-zero after issuing appropriate error message
- * if initialization fails.
- */
+ char *git_dir = gitenv("GIT_DIR");
+ char path[PATH_MAX];
+ int git_dir_len;
+
+ if (! git_dir)
+ sprintf(path, "%s/.git", git_project_top);
+ else
+ strcpy(path, git_dir);
+ git_dir_len = strlen(path);
+ path[git_dir_len++] = '/';
+
+ /* read private list first, and then shared list. */
+ strcpy(path + git_dir_len, "ignore");
+ read_ignore_list(path);
+
+ strcpy(path + git_dir_len, "info/ignore-file");
+ read_ignore_list_from_file(path);
+
return 0;
}
int path_ignored(const char *path)
{
+ int i;
+
if (!verify_path(path))
return 1;
- /* Put the Porcelain layer ignore logic here.
- * Return non-zero if path is to be ignored.
- */
+ for (i = 0; i < ignore_nr; i++) {
+ int status;
+ regmatch_t pmatch[10];
+ char errbuf[1024];
+
+ status = regexec(&(ignore_list[i]->regexp), path,
+ sizeof(pmatch)/sizeof(pmatch[0]),
+ pmatch, 0);
+ if (!status)
+ return !ignore_list[i]->negate;
+ if (status == REG_NOMATCH)
+ continue;
+
+ regerror(status, &(ignore_list[i]->regexp), errbuf,
+ sizeof(errbuf));
+ fprintf(stderr, "pcre regexp execution error <%s>\n", errbuf);
+ }
return 0;
}
--- a/t/t7001-git-run-with-user-path-ignore.sh
+++ b/t/t7001-git-run-with-user-path-ignore.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# Copyright (c) 2005, Junio C Hamano
+#
+
+test_description='git-run-with-user-path basic test (part #2).
+
+The command is used to help running core GIT commands that always
+expect to be run from the top level directory (i.e. the directory
+that corresponds to the top of tree GIT_INDEX_FILE describes).
+
+It knows how to handle ignore files convention used by the Porcelain
+layer implementation.
+'
+
+. ./test-lib.sh
+
+LF='
+'
+HERE=$(pwd)
+
+test_expect_success \
+setup '
+echo ".*1\$" >.git/ignore &&
+echo ".*0\$" >dontdiff &&
+mkdir .git/info &&
+echo "dontdiff" >.git/info/ignore-file &&
+mkdir path0 path1 path1/path2 &&
+for p in path0/file0 path1/file1 path1/path2/file2
+do
+ echo hello >$p || exit 1
+done
+'
+
+cd $HERE
+test_expect_success \
+'finding paths from a subdirectory' '
+ case "$(cd path0 &&
+ git-run-with-user-path echo -- \
+ file0 ../path1/path2/file2)" in
+ "path1/path2/file2") : ;;
+ *) (exit 1) ;;
+ esac
+'
+
+cd $HERE
+test_expect_success \
+'feeding find output via xargs from a subdirectory' '
+ case "$(cd path0 &&
+ find . ../path1 -type f -print0 |
+ xargs -r -0 git-run-with-user-path ls -1 --)" in
+ "path1/path2/file2") : ;;
+ *) (exit 1) ;;
+ esac
+'
+
+cd $HERE
+test_expect_success \
+'using !negate pattern' '
+ echo "!path0/file0$" >>.git/ignore &&
+ case "$(git-run-with-user-path ls -1 -- path0/* path1/file1)" in
+ "path0/file0") : ;;
+ *) (exit 1) ;;
+ esac
+'
+
+test_done
------------------------------------------------
^ permalink raw reply [relevance 8%]
* [PATCH 2/2] Add sample ignore logic to git-run-with-user-path command.
@ 2005-05-16 23:41 8% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2005-05-16 23:41 UTC (permalink / raw)
To: pasky, torvalds; +Cc: git
This adds a sample ignore file logic to git-run-with-user-path
command. This is primarily to serve as an example for plugging
ignore file logic to the previously introduced framework, and to
spur mailing list discussions on what the final ignore file
logic should be, and where the information should come from.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
Documentation/git-run-with-user-path.txt | 32 ++++++++
Makefile | 6 +
paths.c | 117 +++++++++++++++++++++++++++++--
t/t7001-git-run-with-user-path-ignore.sh | 67 +++++++++++++++++
4 files changed, 215 insertions(+), 7 deletions(-)
t/t7001-git-run-with-user-path-ignore.sh (. --> 100755)
--- a/Documentation/git-run-with-user-path.txt
+++ b/Documentation/git-run-with-user-path.txt
@@ -75,6 +75,38 @@
output).
+IGNORE FILES
+------------
+
+This command currently uses a pcre based implementation to express
+ignore patterns. The purpose of this implementation is to primarily
+serve as an example and to start GIT mailing list discussions, and by no
+means is cast in stone. This section describes what this sample
+implementation does.
+
+The information used to define which paths to ignore is read from two
+files. Both files use the same syntax.
+
+First, $CIT_DIR/ignore is read. Then, the file whose path (relative to
+the project top) recorded in $GIT_DIR/info/ignore-file is read next.
+The latter file is expected to be revision controlled with GIT.
+
+These two files should record one ignore record per line. A line that
+is empty, and a line that starts with a '#' are ignored and used as
+comments.
+
+Each ignore record is a pcre regular expression, optionally prefixed
+with a '!'. To determine if a path is to be ignored, the path is
+matched against each ignore record in the order they appear in the
+ignore file. If the ignore record matches the path, and it does not
+have the optional '!', then the path is ignored. Otherwise, the path is
+not ignored. In either case, the rest of ignore records are not used
+after the first match. This means (1) an earlier entry in an ignore
+file has precedence over later ones, and (2) the entries in
+$GIT_DIR/ignore file have precedence over the ones in the file named
+by $GIT_DIR/info/ignore-file.
+
+
ENVIRONMENT VARIABLES
---------------------
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,12 @@
LIBS = $(LIB_FILE)
LIBS += -lz
+IGNORE_USING_PCRE=1
+
+ifdef IGNORE_USING_PCRE
+ LIBS += -lpcreposix
+endif
+
ifdef MOZILLA_SHA1
SHA1_HEADER="mozilla-sha1/sha1.h"
LIB_OBJS += mozilla-sha1/sha1.o
--- a/paths.c
+++ b/paths.c
@@ -2,6 +2,7 @@
* Copyright (c) 2005 Junio C Hamano
*/
#include <string.h>
+#include <pcreposix.h>
#include "cache.h"
#include "paths.h"
@@ -37,23 +38,125 @@
}
}
+static struct ignore_entry {
+ int negate;
+ regex_t regexp;
+} **ignore_list;
+static int ignore_nr;
+static int ignore_alloc;
+
+static void add_ignore(const char *buf)
+{
+ struct ignore_entry *ie = xmalloc(sizeof(*ie));
+ if (buf[0] == '!') {
+ ie->negate = 1;
+ buf++;
+ }
+ else
+ ie->negate = 0;
+
+ if (regcomp(&(ie->regexp), buf, 0)) {
+ fprintf(stderr, "bad regexp <%s>\n", buf);
+ free(ie);
+ return;
+ }
+ if (ignore_alloc <= ignore_nr) {
+ ignore_alloc = alloc_nr(ignore_alloc);
+ ignore_list = xrealloc(ignore_list,
+ ignore_alloc * sizeof(ie));
+ }
+ ignore_list[ignore_nr++] = ie;
+}
+
+static void read_ignore_list(const char *path)
+{
+ FILE *in;
+ char buf[1024];
+ in = fopen(path, "r");
+ if (!in)
+ return;
+ while (fgets(buf, sizeof(buf), in) != NULL) {
+ int l = strlen(buf);
+ /* An empty line and a line that starts with # is comment. */
+ if (buf[0] != '#' && buf[0] != '\n' && buf[l-1] == '\n') {
+ buf[l-1] = 0;
+ add_ignore(buf);
+ }
+ }
+ fclose(in);
+}
+
+static void read_ignore_list_from_file(const char *path)
+{
+ char filename[PATH_MAX];
+ int len;
+ FILE *in;
+
+ in = fopen(path, "r");
+ if (!in)
+ return;
+ strcpy(filename, git_project_top);
+ len = strlen(filename);
+ filename[len++] = '/';
+ if (fgets(filename + len, sizeof(filename) - len, in) == NULL) {
+ fclose(in);
+ return;
+ }
+ fclose(in);
+ len = strlen(filename);
+ if (filename[len-1] != '\n')
+ return;
+ filename[len-1] = 0;
+ read_ignore_list(filename);
+}
+
static int initialize_ignore_list(void)
{
- /* Put the Porcelain layer ignore logic initialization here.
- * Return non-zero after issuing appropriate error message
- * if initialization fails.
- */
+ char *git_dir = gitenv("GIT_DIR");
+ char path[PATH_MAX];
+ int git_dir_len;
+
+ if (! git_dir)
+ sprintf(path, "%s/.git", git_project_top);
+ else
+ strcpy(path, git_dir);
+ git_dir_len = strlen(path);
+ path[git_dir_len++] = '/';
+
+ /* read private list first, and then shared list. */
+ strcpy(path + git_dir_len, "ignore");
+ read_ignore_list(path);
+
+ strcpy(path + git_dir_len, "info/ignore-file");
+ read_ignore_list_from_file(path);
+
return 0;
}
int path_ignored(const char *path)
{
+ int i;
+
if (!verify_path(path))
return 1;
- /* Put the Porcelain layer ignore logic here.
- * Return non-zero if path is to be ignored.
- */
+ for (i = 0; i < ignore_nr; i++) {
+ int status;
+ regmatch_t pmatch[10];
+ char errbuf[1024];
+
+ status = regexec(&(ignore_list[i]->regexp), path,
+ sizeof(pmatch)/sizeof(pmatch[0]),
+ pmatch, 0);
+ if (!status)
+ return !ignore_list[i]->negate;
+ if (status == REG_NOMATCH)
+ continue;
+
+ regerror(status, &(ignore_list[i]->regexp), errbuf,
+ sizeof(errbuf));
+ fprintf(stderr, "pcre regexp execution error <%s>\n", errbuf);
+ }
return 0;
}
--- /dev/null
+++ b/t/t7001-git-run-with-user-path-ignore.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# Copyright (c) 2005, Junio C Hamano
+#
+
+test_description='git-run-with-user-path basic test (part #2).
+
+The command is used to help running core GIT commands that always
+expect to be run from the top level directory (i.e. the directory
+that corresponds to the top of tree GIT_INDEX_FILE describes).
+
+It knows how to handle ignore files convention used by the Porcelain
+layer implementation.
+'
+
+. ./test-lib.sh
+
+LF='
+'
+HERE=$(pwd)
+
+test_expect_success \
+setup '
+echo ".*1\$" >.git/ignore &&
+echo ".*0\$" >dontdiff &&
+mkdir .git/info &&
+echo "dontdiff" >.git/info/ignore-file &&
+mkdir path0 path1 path1/path2 &&
+for p in path0/file0 path1/file1 path1/path2/file2
+do
+ echo hello >$p || exit 1
+done
+'
+
+cd $HERE
+test_expect_success \
+'finding paths from a subdirectory' '
+ case "$(cd path0 &&
+ git-run-with-user-path echo -- \
+ file0 ../path1/path2/file2)" in
+ "path1/path2/file2") : ;;
+ *) (exit 1) ;;
+ esac
+'
+
+cd $HERE
+test_expect_success \
+'feeding find output via xargs from a subdirectory' '
+ case "$(cd path0 &&
+ find . ../path1 -type f -print0 |
+ xargs -r -0 git-run-with-user-path ls -1 --)" in
+ "path1/path2/file2") : ;;
+ *) (exit 1) ;;
+ esac
+'
+
+cd $HERE
+test_expect_success \
+'using !negate pattern' '
+ echo "!path0/file0$" >>.git/ignore &&
+ case "$(git-run-with-user-path ls -1 -- path0/* path1/file1)" in
+ "path0/file0") : ;;
+ *) (exit 1) ;;
+ esac
+'
+
+test_done
------------------------------------------------
^ permalink raw reply [relevance 8%]
* [PATCH] git-mv: fix moves into a subdir from outside
@ 2006-03-03 16:23 12% Josef Weidendorfer
0 siblings, 0 replies; 200+ results
From: Josef Weidendorfer @ 2006-03-03 16:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
git-mv needs to be run from the base directory so that
the check if a file is under revision also covers files
outside of a subdirectory. Previously, e.g. in the git repo,
cd Documentation; git-mv ../README .
produced the error
Error: '../README' not under version control
The test is extended for this case; it previously only tested
one direction.
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---
git-mv.perl | 8 ++++++++
t/t7001-mv.sh | 18 ++++++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
08d21abe95064934ea559b88801415e09b19f628
diff --git a/git-mv.perl b/git-mv.perl
index f3e859a..0a63860 100755
--- a/git-mv.perl
+++ b/git-mv.perl
@@ -62,9 +62,17 @@ else {
$dstDir = "";
}
+my $subdir_prefix = `git rev-parse --show-prefix`;
+chomp($subdir_prefix);
+
+# run in git base directory, so that git-ls-files lists all revisioned files
+chdir "$GIT_DIR/..";
+
# normalize paths, needed to compare against versioned files and update-index
# also, this is nicer to end-users by doing ".//a/./b/.//./c" ==> "a/b/c"
for (@srcArgs, @dstArgs) {
+ # prepend git prefix as we run from base directory
+ $_ = $subdir_prefix.$_;
s|^\./||;
s|/\./|/| while (m|/\./|);
s|//+|/|g;
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 43d74c5..811a479 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -11,17 +11,31 @@ test_expect_success \
git-commit -m add -a'
test_expect_success \
- 'moving the file' \
+ 'moving the file out of subdirectory' \
'cd path0 && git-mv COPYING ../path1/COPYING'
# in path0 currently
test_expect_success \
'commiting the change' \
- 'cd .. && git-commit -m move -a'
+ 'cd .. && git-commit -m move-out -a'
test_expect_success \
'checking the commit' \
'git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path0/COPYING.+path1/COPYING"'
+test_expect_success \
+ 'moving the file back into subdirectory' \
+ 'cd path0 && git-mv ../path1/COPYING COPYING'
+
+# in path0 currently
+test_expect_success \
+ 'commiting the change' \
+ 'cd .. && git-commit -m move-in -a'
+
+test_expect_success \
+ 'checking the commit' \
+ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path1/COPYING.+path0/COPYING"'
+
test_done
--
1.2.0.g719b
^ permalink raw reply related [relevance 12%]
* [PATCH] Make git-mv a builtin
@ 2006-07-26 1:52 1% Johannes Schindelin
2006-07-26 13:44 13% ` [PATCH] Extend testing git-mv for renaming of subdirectories Josef Weidendorfer
0 siblings, 1 reply; 200+ results
From: Johannes Schindelin @ 2006-07-26 1:52 UTC (permalink / raw)
To: git, junkio
This also moves add_file_to_index() to read-cache.c. Oh, and while
touching builtin-add.c, it also removes a duplicate git_config() call.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
There is no test for it, and I am quite certain the old script
doesn't do it either: git-mv some_tracked_dir/ there/ will
not work. t7001-mv passes, though.
I cannot test, because the script still fails to work here.
Makefile | 7 +-
builtin-add.c | 40 ---------
builtin-mv.c | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++
builtin.h | 1
cache.h | 1
git-mv.perl | 246 ---------------------------------------------------------
git.c | 1
read-cache.c | 39 +++++++++
8 files changed, 267 insertions(+), 289 deletions(-)
diff --git a/Makefile b/Makefile
index 1069810..baed711 100644
--- a/Makefile
+++ b/Makefile
@@ -165,7 +165,7 @@ SCRIPT_PERL = \
git-archimport.perl git-cvsimport.perl git-relink.perl \
git-shortlog.perl git-rerere.perl \
git-annotate.perl git-cvsserver.perl \
- git-svnimport.perl git-mv.perl git-cvsexportcommit.perl \
+ git-svnimport.perl git-cvsexportcommit.perl \
git-send-email.perl git-svn.perl
SCRIPT_PYTHON = \
@@ -207,7 +207,7 @@ BUILT_INS = git-log$X git-whatchanged$X
git-read-tree$X git-commit-tree$X git-write-tree$X \
git-apply$X git-show-branch$X git-diff-files$X git-update-index$X \
git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \
- git-fmt-merge-msg$X git-prune$X
+ git-fmt-merge-msg$X git-prune$X git-mv$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -263,7 +263,8 @@ BUILTIN_OBJS = \
builtin-apply.o builtin-show-branch.o builtin-diff-files.o \
builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
builtin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \
- builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o
+ builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o \
+ builtin-mv.o path-list.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS = -lz
diff --git a/builtin-add.c b/builtin-add.c
index 2d25698..111d8f5 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -83,45 +83,6 @@ static void fill_directory(struct dir_st
prune_directory(dir, pathspec, baselen);
}
-static int add_file_to_index(const char *path, int verbose)
-{
- int size, namelen;
- struct stat st;
- struct cache_entry *ce;
-
- if (lstat(path, &st))
- die("%s: unable to stat (%s)", path, strerror(errno));
-
- if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode))
- die("%s: can only add regular files or symbolic links", path);
-
- namelen = strlen(path);
- size = cache_entry_size(namelen);
- ce = xcalloc(1, size);
- memcpy(ce->name, path, namelen);
- ce->ce_flags = htons(namelen);
- fill_stat_cache_info(ce, &st);
-
- ce->ce_mode = create_ce_mode(st.st_mode);
- if (!trust_executable_bit) {
- /* If there is an existing entry, pick the mode bits
- * from it.
- */
- int pos = cache_name_pos(path, namelen);
- if (pos >= 0)
- ce->ce_mode = active_cache[pos]->ce_mode;
- }
-
- if (index_path(ce->sha1, path, &st, 1))
- die("unable to index file %s", path);
- if (add_cache_entry(ce, ADD_CACHE_OK_TO_ADD))
- die("unable to add %s to index",path);
- if (verbose)
- printf("add '%s'\n", path);
- cache_tree_invalidate_path(active_cache_tree, path);
- return 0;
-}
-
static struct lock_file lock_file;
int cmd_add(int argc, const char **argv, char **envp)
@@ -160,7 +121,6 @@ int cmd_add(int argc, const char **argv,
}
die(builtin_add_usage);
}
- git_config(git_default_config);
pathspec = get_pathspec(prefix, argv + i);
fill_directory(&dir, pathspec);
diff --git a/builtin-mv.c b/builtin-mv.c
new file mode 100644
index 0000000..973bb29
--- /dev/null
+++ b/builtin-mv.c
@@ -0,0 +1,221 @@
+/*
+ * "git mv" builtin command
+ *
+ * Copyright (C) 2006 Johannes Schindelin
+ */
+#include <fnmatch.h>
+
+#include "cache.h"
+#include "builtin.h"
+#include "dir.h"
+#include "cache-tree.h"
+#include "path-list.h"
+
+static const char builtin_mv_usage[] =
+"git-mv [-n] [-f] { <source> <destination> | [-k] <source>... <destination> }";
+
+static const char **copy_pathspec(const char *prefix, const char **pathspec,
+ int count, int base_name)
+{
+ const char **result = xmalloc((count + 1) * sizeof(const char *));
+ memcpy(result, pathspec, count * sizeof(const char *));
+ result[count] = NULL;
+ if (base_name) {
+ int i;
+ for (i = 0; i < count; i++) {
+ const char *last_slash = strrchr(result[i], '/');
+ if (last_slash)
+ result[i] = last_slash + 1;
+ }
+ }
+ return get_pathspec(prefix, result);
+}
+
+static void show_list(const char *label, struct path_list *list)
+{
+ if (list->nr > 0) {
+ int i;
+ printf("%s", label);
+ for (i = 0; i < list->nr; i++)
+ printf("%s%s", i > 0 ? ", " : "", list->items[i].path);
+ putchar('\n');
+ }
+}
+
+static struct lock_file lock_file;
+
+int cmd_mv(int argc, const char **argv, char **envp)
+{
+ int i, newfd, count;
+ int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
+ const char *prefix = setup_git_directory();
+ const char **source, **destination, **dest_path;
+ struct stat st;
+ struct path_list overwritten = {NULL, 0, 0, 0};
+ struct path_list src_for_dst = {NULL, 0, 0, 0};
+ struct path_list added = {NULL, 0, 0, 0};
+ struct path_list deleted = {NULL, 0, 0, 0};
+ struct path_list changed = {NULL, 0, 0, 0};
+
+ git_config(git_default_config);
+
+ newfd = hold_lock_file_for_update(&lock_file, get_index_file());
+ if (newfd < 0)
+ die("unable to create new index file");
+
+ if (read_cache() < 0)
+ die("index file corrupt");
+
+ for (i = 1; i < argc; i++) {
+ const char *arg = argv[i];
+
+ if (arg[0] != '-')
+ break;
+ if (!strcmp(arg, "--")) {
+ i++;
+ break;
+ }
+ if (!strcmp(arg, "-n")) {
+ show_only = 1;
+ continue;
+ }
+ if (!strcmp(arg, "-f")) {
+ force = 1;
+ continue;
+ }
+ if (!strcmp(arg, "-k")) {
+ ignore_errors = 1;
+ continue;
+ }
+ die(builtin_mv_usage);
+ }
+ count = argc - i - 1;
+ if (count < 1)
+ usage(builtin_mv_usage);
+
+ source = copy_pathspec(prefix, argv + i, count, 0);
+ dest_path = copy_pathspec(prefix, argv + argc - 1, 1, 0);
+
+ if (lstat(dest_path[0], &st) == 0 &&
+ S_ISDIR(st.st_mode))
+ destination = copy_pathspec(dest_path[0], argv + i, count, 1);
+ else {
+ if (count != 1)
+ usage(builtin_mv_usage);
+ destination = dest_path;
+ }
+
+ /* Checking */
+ for (i = 0; i < count; i++) {
+ const char *bad = NULL;
+
+ if (show_only)
+ printf("Checking rename of '%s' to '%s'\n",
+ source[i], destination[i]);
+
+ if (lstat(source[i], &st) < 0)
+ bad = "bad source";
+ else if (lstat(destination[i], &st) == 0) {
+ bad = "destination exists";
+ if (force) {
+ /*
+ * only files can overwrite each other:
+ * check both source and destination
+ */
+ if (S_ISREG(st.st_mode)) {
+ fprintf(stderr, "Warning: %s;"
+ " will overwrite!\n",
+ bad);
+ bad = NULL;
+ path_list_insert(destination[i],
+ &overwritten);
+ } else
+ bad = "Cannot overwrite";
+ }
+ }
+
+ if (!bad && !strncmp(destination[i], source[i],
+ strlen(source[i])))
+ bad = "can not move directory into itself";
+
+ if (!bad && cache_name_pos(source[i], strlen(source[i])) < 0)
+ bad = "not under version control";
+
+ if (!bad) {
+ if (path_list_has_path(&src_for_dst, destination[i]))
+ bad = "multiple sources for the same target";
+ else
+ path_list_insert(destination[i], &src_for_dst);
+ }
+
+ if (bad) {
+ if (ignore_errors) {
+ if (--count > 0) {
+ memmove(source + i, source + i + 1,
+ (count - i) * sizeof(char *));
+ memmove(destination + i,
+ destination + i + 1,
+ (count - i) * sizeof(char *));
+ }
+ } else
+ die ("Error: %s, source=%s, destination=%s",
+ bad, source[i], destination[i]);
+ }
+ }
+
+ for (i = 0; i < count; i++) {
+ if (show_only || verbose)
+ printf("Renaming %s to %s\n",
+ source[i], destination[i]);
+ if (!show_only && rename(source[i], destination[i]) < 0
+ && !ignore_errors)
+ die ("renaming %s failed: %s",
+ source[i], strerror(errno));
+
+ if (cache_name_pos(source[i], strlen(source[i])) >= 0) {
+ path_list_insert(source[i], &deleted);
+
+ /* destination can be a directory with 1 file inside */
+ if (path_list_has_path(&overwritten, destination[i]))
+ path_list_insert(destination[i], &changed);
+ else
+ path_list_insert(destination[i], &added);
+ } else
+ path_list_insert(destination[i], &added);
+ }
+
+ if (show_only) {
+ show_list("Changed : ", &changed);
+ show_list("Adding : ", &added);
+ show_list("Deleting : ", &deleted);
+ } else {
+ for (i = 0; i < changed.nr; i++) {
+ const char *path = changed.items[i].path;
+ int i = cache_name_pos(path, strlen(path));
+ struct cache_entry *ce = active_cache[i];
+
+ if (i < 0)
+ die ("Huh? Cache entry for %s unknown?", path);
+ refresh_cache_entry(ce, 0);
+ }
+
+ for (i = 0; i < added.nr; i++) {
+ const char *path = added.items[i].path;
+ add_file_to_index(path, verbose);
+ }
+
+ for (i = 0; i < deleted.nr; i++) {
+ const char *path = deleted.items[i].path;
+ remove_file_from_cache(path);
+ }
+
+ if (active_cache_changed) {
+ if (write_cache(newfd, active_cache, active_nr) ||
+ close(newfd) ||
+ commit_lock_file(&lock_file))
+ die("Unable to write new index file");
+ }
+ }
+
+ return 0;
+}
diff --git a/builtin.h b/builtin.h
index 5339d86..6f3a439 100755
--- a/builtin.h
+++ b/builtin.h
@@ -52,6 +52,7 @@ extern int cmd_rev_parse(int argc, const
extern int cmd_update_index(int argc, const char **argv, char **envp);
extern int cmd_update_ref(int argc, const char **argv, char **envp);
extern int cmd_fmt_merge_msg(int argc, const char **argv, char **envp);
+extern int cmd_mv(int argc, const char **argv, char **envp);
extern int cmd_write_tree(int argc, const char **argv, char **envp);
extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
diff --git a/cache.h b/cache.h
index 457d1d0..3288b11 100644
--- a/cache.h
+++ b/cache.h
@@ -158,6 +158,7 @@ extern int add_cache_entry(struct cache_
extern struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really);
extern int remove_cache_entry_at(int pos);
extern int remove_file_from_cache(const char *path);
+extern int add_file_to_index(const char *path, int verbose);
extern int ce_same_name(struct cache_entry *a, struct cache_entry *b);
extern int ce_match_stat(struct cache_entry *ce, struct stat *st, int);
extern int ce_modified(struct cache_entry *ce, struct stat *st, int);
diff --git a/git-mv.perl b/git-mv.perl
deleted file mode 100755
index 322b9fd..0000000
--- a/git-mv.perl
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright 2005, Ryan Anderson <ryan@michonline.com>
-# Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
-#
-# This file is licensed under the GPL v2, or a later version
-# at the discretion of Linus Torvalds.
-
-use warnings;
-use strict;
-use Getopt::Std;
-use Git;
-
-sub usage() {
- print <<EOT;
-$0 [-f] [-n] <source> <destination>
-$0 [-f] [-n] [-k] <source> ... <destination directory>
-EOT
- exit(1);
-}
-
-our ($opt_n, $opt_f, $opt_h, $opt_k, $opt_v);
-getopts("hnfkv") || usage;
-usage() if $opt_h;
-@ARGV >= 1 or usage;
-
-my $repo = Git->repository();
-
-my (@srcArgs, @dstArgs, @srcs, @dsts);
-my ($src, $dst, $base, $dstDir);
-
-# remove any trailing slash in arguments
-for (@ARGV) { s/\/*$//; }
-
-my $argCount = scalar @ARGV;
-if (-d $ARGV[$argCount-1]) {
- $dstDir = $ARGV[$argCount-1];
- @srcArgs = @ARGV[0..$argCount-2];
-
- foreach $src (@srcArgs) {
- $base = $src;
- $base =~ s/^.*\///;
- $dst = "$dstDir/". $base;
- push @dstArgs, $dst;
- }
-}
-else {
- if ($argCount < 2) {
- print "Error: need at least two arguments\n";
- exit(1);
- }
- if ($argCount > 2) {
- print "Error: moving to directory '"
- . $ARGV[$argCount-1]
- . "' not possible; not existing\n";
- exit(1);
- }
- @srcArgs = ($ARGV[0]);
- @dstArgs = ($ARGV[1]);
- $dstDir = "";
-}
-
-my $subdir_prefix = $repo->wc_subdir();
-
-# run in git base directory, so that git-ls-files lists all revisioned files
-chdir $repo->wc_path();
-$repo->wc_chdir('');
-
-# normalize paths, needed to compare against versioned files and update-index
-# also, this is nicer to end-users by doing ".//a/./b/.//./c" ==> "a/b/c"
-for (@srcArgs, @dstArgs) {
- # prepend git prefix as we run from base directory
- $_ = $subdir_prefix.$_;
- s|^\./||;
- s|/\./|/| while (m|/\./|);
- s|//+|/|g;
- # Also "a/b/../c" ==> "a/c"
- 1 while (s,(^|/)[^/]+/\.\./,$1,);
-}
-
-my (@allfiles,@srcfiles,@dstfiles);
-my $safesrc;
-my (%overwritten, %srcForDst);
-
-{
- local $/ = "\0";
- @allfiles = $repo->command('ls-files', '-z');
-}
-
-
-my ($i, $bad);
-while(scalar @srcArgs > 0) {
- $src = shift @srcArgs;
- $dst = shift @dstArgs;
- $bad = "";
-
- for ($src, $dst) {
- # Be nicer to end-users by doing ".//a/./b/.//./c" ==> "a/b/c"
- s|^\./||;
- s|/\./|/| while (m|/\./|);
- s|//+|/|g;
- # Also "a/b/../c" ==> "a/c"
- 1 while (s,(^|/)[^/]+/\.\./,$1,);
- }
-
- if ($opt_v) {
- print "Checking rename of '$src' to '$dst'\n";
- }
-
- unless (-f $src || -l $src || -d $src) {
- $bad = "bad source '$src'";
- }
-
- $safesrc = quotemeta($src);
- @srcfiles = grep /^$safesrc(\/|$)/, @allfiles;
-
- $overwritten{$dst} = 0;
- if (($bad eq "") && -e $dst) {
- $bad = "destination '$dst' already exists";
- if ($opt_f) {
- # only files can overwrite each other: check both source and destination
- if (-f $dst && (scalar @srcfiles == 1)) {
- print "Warning: $bad; will overwrite!\n";
- $bad = "";
- $overwritten{$dst} = 1;
- }
- else {
- $bad = "Can not overwrite '$src' with '$dst'";
- }
- }
- }
-
- if (($bad eq "") && ($dst =~ /^$safesrc\//)) {
- $bad = "can not move directory '$src' into itself";
- }
-
- if ($bad eq "") {
- if (scalar @srcfiles == 0) {
- $bad = "'$src' not under version control";
- }
- }
-
- if ($bad eq "") {
- if (defined $srcForDst{$dst}) {
- $bad = "can not move '$src' to '$dst'; already target of ";
- $bad .= "'".$srcForDst{$dst}."'";
- }
- else {
- $srcForDst{$dst} = $src;
- }
- }
-
- if ($bad ne "") {
- if ($opt_k) {
- print "Warning: $bad; skipping\n";
- next;
- }
- print "Error: $bad\n";
- exit(1);
- }
- push @srcs, $src;
- push @dsts, $dst;
-}
-
-# Final pass: rename/move
-my (@deletedfiles,@addedfiles,@changedfiles);
-$bad = "";
-while(scalar @srcs > 0) {
- $src = shift @srcs;
- $dst = shift @dsts;
-
- if ($opt_n || $opt_v) { print "Renaming $src to $dst\n"; }
- if (!$opt_n) {
- if (!rename($src,$dst)) {
- $bad = "renaming '$src' failed: $!";
- if ($opt_k) {
- print "Warning: skipped: $bad\n";
- $bad = "";
- next;
- }
- last;
- }
- }
-
- $safesrc = quotemeta($src);
- @srcfiles = grep /^$safesrc(\/|$)/, @allfiles;
- @dstfiles = @srcfiles;
- s/^$safesrc(\/|$)/$dst$1/ for @dstfiles;
-
- push @deletedfiles, @srcfiles;
- if (scalar @srcfiles == 1) {
- # $dst can be a directory with 1 file inside
- if ($overwritten{$dst} ==1) {
- push @changedfiles, $dstfiles[0];
-
- } else {
- push @addedfiles, $dstfiles[0];
- }
- }
- else {
- push @addedfiles, @dstfiles;
- }
-}
-
-if ($opt_n) {
- if (@changedfiles) {
- print "Changed : ". join(", ", @changedfiles) ."\n";
- }
- if (@addedfiles) {
- print "Adding : ". join(", ", @addedfiles) ."\n";
- }
- if (@deletedfiles) {
- print "Deleting : ". join(", ", @deletedfiles) ."\n";
- }
-}
-else {
- if (@changedfiles) {
- my ($fd, $ctx) = $repo->command_input_pipe('update-index', '-z', '--stdin');
- foreach my $fileName (@changedfiles) {
- print $fd "$fileName\0";
- }
- git_cmd_try { $repo->command_close_pipe($fd, $ctx); }
- 'git-update-index failed to update changed files with code %d';
- }
- if (@addedfiles) {
- my ($fd, $ctx) = $repo->command_input_pipe('update-index', '--add', '-z', '--stdin');
- foreach my $fileName (@addedfiles) {
- print $fd "$fileName\0";
- }
- git_cmd_try { $repo->command_close_pipe($fd, $ctx); }
- 'git-update-index failed to add new files with code %d';
- }
- if (@deletedfiles) {
- my ($fd, $ctx) = $repo->command_input_pipe('update-index', '--remove', '-z', '--stdin');
- foreach my $fileName (@deletedfiles) {
- print $fd "$fileName\0";
- }
- git_cmd_try { $repo->command_close_pipe($fd, $ctx); }
- 'git-update-index failed to remove old files with code %d';
- }
-}
-
-if ($bad ne "") {
- print "Error: $bad\n";
- exit(1);
-}
diff --git a/git.c b/git.c
index e4b2174..bd58885 100644
--- a/git.c
+++ b/git.c
@@ -261,6 +261,7 @@ static void handle_internal_command(int
{ "update-ref", cmd_update_ref },
{ "fmt-merge-msg", cmd_fmt_merge_msg },
{ "prune", cmd_prune },
+ { "mv", cmd_mv },
};
int i;
diff --git a/read-cache.c b/read-cache.c
index 9c0a9fc..c375e91 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -319,6 +319,45 @@ int remove_file_from_cache(const char *p
return 0;
}
+int add_file_to_index(const char *path, int verbose)
+{
+ int size, namelen;
+ struct stat st;
+ struct cache_entry *ce;
+
+ if (lstat(path, &st))
+ die("%s: unable to stat (%s)", path, strerror(errno));
+
+ if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode))
+ die("%s: can only add regular files or symbolic links", path);
+
+ namelen = strlen(path);
+ size = cache_entry_size(namelen);
+ ce = xcalloc(1, size);
+ memcpy(ce->name, path, namelen);
+ ce->ce_flags = htons(namelen);
+ fill_stat_cache_info(ce, &st);
+
+ ce->ce_mode = create_ce_mode(st.st_mode);
+ if (!trust_executable_bit) {
+ /* If there is an existing entry, pick the mode bits
+ * from it.
+ */
+ int pos = cache_name_pos(path, namelen);
+ if (pos >= 0)
+ ce->ce_mode = active_cache[pos]->ce_mode;
+ }
+
+ if (index_path(ce->sha1, path, &st, 1))
+ die("unable to index file %s", path);
+ if (add_cache_entry(ce, ADD_CACHE_OK_TO_ADD))
+ die("unable to add %s to index",path);
+ if (verbose)
+ printf("add '%s'\n", path);
+ cache_tree_invalidate_path(active_cache_tree, path);
+ return 0;
+}
+
int ce_same_name(struct cache_entry *a, struct cache_entry *b)
{
int len = ce_namelen(a);
--
1.4.2.rc2.g39be8
^ permalink raw reply related [relevance 1%]
* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
@ 2006-07-26 2:01 5% ` Johannes Schindelin
2006-07-26 2:10 0% ` Petr Baudis
0 siblings, 1 reply; 200+ results
From: Johannes Schindelin @ 2006-07-26 2:01 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
Hi,
On Wed, 26 Jul 2006, Petr Baudis wrote:
> We used just the blessed() routine so steal it from Scalar/Util.pm. ;-)
> (Unfortunately, Scalar::Util is not bundled with older Perl versions.)
>
> This is a newer much saner blessed() version by Randal L. Schwarz.
After a lot of fiddling, it works here. Remarks:
- It is not at all easy to run git (Perl scripts) in-place. At least for
Python, you can set a variable in config.mak and be done with it.
- private_Error.pm is not used. I had to rename it for Error.pm to be
picked up.
- It even passes t7001 now. _After_ I spent two hours rewriting it in C.
Ciao,
Dscho
^ permalink raw reply [relevance 5%]
* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
2006-07-26 2:01 5% ` Johannes Schindelin
@ 2006-07-26 2:10 0% ` Petr Baudis
2006-07-26 2:25 0% ` Johannes Schindelin
0 siblings, 1 reply; 200+ results
From: Petr Baudis @ 2006-07-26 2:10 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git
Hi,
Dear diary, on Wed, Jul 26, 2006 at 04:01:03AM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> After a lot of fiddling, it works here. Remarks:
thanks for the testing!
> - It is not at all easy to run git (Perl scripts) in-place. At least for
> Python, you can set a variable in config.mak and be done with it.
Does setting prefix to the same directory as where your Git tree is
help? (If so, we might want to document it.)
> - private_Error.pm is not used. I had to rename it for Error.pm to be
> picked up.
Hmm, yes, I guess it is copied in place only during the installation.
We might add something like
all:
cp private-Error.pm blib/lib/Error.pm
to the perl/Makefile. Opinions?
> - It even passes t7001 now. _After_ I spent two hours rewriting it in C.
Thanks for the patience - I hope we will finally get all the remaining
Perl problems sorted out.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply [relevance 0%]
* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
2006-07-26 2:10 0% ` Petr Baudis
@ 2006-07-26 2:25 0% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-07-26 2:25 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
Hi,
On Wed, 26 Jul 2006, Petr Baudis wrote:
> Hi,
>
> Dear diary, on Wed, Jul 26, 2006 at 04:01:03AM CEST, I got a letter
> where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
>
> > - It is not at all easy to run git (Perl scripts) in-place. At least for
> > Python, you can set a variable in config.mak and be done with it.
>
> Does setting prefix to the same directory as where your Git tree is
> help?
Nope. The culprit is
use lib (split(/:/, $ENV{GITPERLLIB} || "/Library/Perl/darwin"));
The latter, /Library/Perl/darwin comes from making "instlibdir" in perl/,
which in turn is generated by "perl Makefile.PL". Calling the latter with
PREFIX set does not change the output of "instlibdir" in any way.
> > - private_Error.pm is not used. I had to rename it for Error.pm to be
> > picked up.
>
> Hmm, yes, I guess it is copied in place only during the installation.
> We might add something like
>
> all:
> cp private-Error.pm blib/lib/Error.pm
>
> to the perl/Makefile. Opinions?
This (from Makefile.PL) is already sufficient:
# We come with our own bundled Error.pm. It's not in the set of default
# Perl modules so install it if it's not available on the system yet.
eval { require Error };
if ($@) {
$pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
}
> > - It even passes t7001 now. _After_ I spent two hours rewriting it in C.
>
> Thanks for the patience - I hope we will finally get all the remaining
> Perl problems sorted out.
What patience? Ah yes, I understand: irony.
Seriously, I still believe that proof-of-concepts in Bash or Perl or even
Python are fine. But they are not for real work, so one of my long-term
goals for git is to get rid of them.
Ciao,
Dscho
^ permalink raw reply [relevance 0%]
* [PATCH] Extend testing git-mv for renaming of subdirectories
2006-07-26 1:52 1% [PATCH] Make git-mv a builtin Johannes Schindelin
@ 2006-07-26 13:44 13% ` Josef Weidendorfer
2006-07-26 15:22 0% ` Johannes Schindelin
0 siblings, 1 reply; 200+ results
From: Josef Weidendorfer @ 2006-07-26 13:44 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, junkio
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---
On Wednesday 26 July 2006 03:52, Johannes Schindelin wrote:
> There is no test for it, and I am quite certain the old script
> doesn't do it either: git-mv some_tracked_dir/ there/ will
> not work. t7001-mv passes, though.
Hmm... Renaming full subtrees worked since the old git-rename days.
I just checked it, and it works fine.
My bad, that there was no test for this, so what about this?
Josef
t/t7001-mv.sh | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 811a479..9270a41 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -38,4 +38,28 @@ test_expect_success \
'git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path1/COPYING.+path0/COPYING"'
+test_expect_success \
+ 'adding another file' \
+ 'cp ../../README path0/README &&
+ git-add path0/README &&
+ git-commit -m add2 -a'
+
+test_expect_success \
+ 'moving whole subdirectory' \
+ 'git-mv path0 path2'
+
+test_expect_success \
+ 'commiting the change' \
+ 'git-commit -m dir-move -a'
+
+test_expect_success \
+ 'checking the commit' \
+ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path0/COPYING.+path2/COPYING" &&
+ git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path0/README.+path2/README"'
+
test_done
+
--
1.4.2.rc1.g791e
^ permalink raw reply related [relevance 13%]
* Re: [PATCH] Extend testing git-mv for renaming of subdirectories
2006-07-26 13:44 13% ` [PATCH] Extend testing git-mv for renaming of subdirectories Josef Weidendorfer
@ 2006-07-26 15:22 0% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-07-26 15:22 UTC (permalink / raw)
To: Josef Weidendorfer; +Cc: git, junkio
Hi,
On Wed, 26 Jul 2006, Josef Weidendorfer wrote:
> On Wednesday 26 July 2006 03:52, Johannes Schindelin wrote:
> > There is no test for it, and I am quite certain the old script
> > doesn't do it either: git-mv some_tracked_dir/ there/ will
> > not work. t7001-mv passes, though.
>
> Hmm... Renaming full subtrees worked since the old git-rename days.
> I just checked it, and it works fine.
Thanks.
And thanks again: since there is a test now, I'll have to implement that
feature, too, I guess ;-)
^ permalink raw reply [relevance 0%]
* [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
@ 2006-07-26 17:41 19% Johannes Schindelin
2006-07-26 17:50 6% ` Jon Smirl
2006-07-26 18:39 6% ` Josef Weidendorfer
0 siblings, 2 replies; 200+ results
From: Johannes Schindelin @ 2006-07-26 17:41 UTC (permalink / raw)
To: Jon Smirl, git, junkio
If dir2 already exists, git-mv should move dir1 _into_dir2/.
Noticed by Jon Smirl.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Jon, this was your problem, right?
t/t7001-mv.sh | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index d78c56a..322eaad 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -59,4 +59,19 @@ test_expect_success \
git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path0/README.+path2/README"'
+test_expect_success \
+ 'moving whole subdirectory into subdirectory' \
+ 'git-mv path2 path1'
+
+test_expect_success \
+ 'commiting the change' \
+ 'git-commit -m dir-move -a'
+
+test_expect_success \
+ 'checking the commit' \
+ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path2/COPYING.+path1/path2/COPYING" &&
+ git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path2/README.+path1/path2/README"'
+
test_done
--
1.4.2.rc2.g96f2-dirty
^ permalink raw reply related [relevance 19%]
* [PATCH 2/2] builtin git-mv: support moving directories
@ 2006-07-26 17:47 10% Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-07-26 17:47 UTC (permalink / raw)
To: Jon Smirl, git, junkio, Josef Weidendorfer
This fixes the builtin mv for the test which Josef provided, and also
fixes moving directories into existing directories, as noted by Jon Smirl.
In case the destination exists, fail early (this cannot be overridden
by -f).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Josef, this passes your test.
Jon, if I understood your problem, then this fixes that, too.
Everyone: it would be cleaner to use "goto next" everywhere,
instead of all these "if (!bad && ..." constructs, but I'll leave
that for other people ;-)
builtin-mv.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
t/t7001-mv.sh | 4 +++
2 files changed, 86 insertions(+), 5 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 593ff9e..e660a9f 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -42,6 +42,18 @@ static void show_list(const char *label,
}
}
+static const char *add_slash(const char *path)
+{
+ int len = strlen(path);
+ if (path[len - 1] != '/') {
+ char *with_slash = xmalloc(len + 2);
+ memcpy(with_slash, path, len);
+ strcat(with_slash + len, "/");
+ return with_slash;
+ }
+ return path;
+}
+
static struct lock_file lock_file;
int cmd_mv(int argc, const char **argv, char **envp)
@@ -50,6 +62,7 @@ int cmd_mv(int argc, const char **argv,
int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
const char *prefix = setup_git_directory();
const char **source, **destination, **dest_path;
+ enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
struct path_list overwritten = {NULL, 0, 0, 0};
struct path_list src_for_dst = {NULL, 0, 0, 0};
@@ -94,11 +107,14 @@ int cmd_mv(int argc, const char **argv,
usage(builtin_mv_usage);
source = copy_pathspec(prefix, argv + i, count, 0);
+ modes = xcalloc(count, sizeof(enum update_mode));
dest_path = copy_pathspec(prefix, argv + argc - 1, 1, 0);
- if (!lstat(dest_path[0], &st) && S_ISDIR(st.st_mode))
+ if (!lstat(dest_path[0], &st) &&
+ S_ISDIR(st.st_mode)) {
+ dest_path[0] = add_slash(dest_path[0]);
destination = copy_pathspec(dest_path[0], argv + i, count, 1);
- else {
+ } else {
if (count != 1)
usage(builtin_mv_usage);
destination = dest_path;
@@ -114,7 +130,64 @@ int cmd_mv(int argc, const char **argv,
if (lstat(source[i], &st) < 0)
bad = "bad source";
- else if (lstat(destination[i], &st) == 0) {
+
+ if (S_ISDIR(st.st_mode)) {
+ const char *dir = source[i], *dest_dir = destination[i];
+ int first, last, len = strlen(dir);
+
+ if (lstat(dest_dir, &st) == 0) {
+ bad = "cannot move directory over file";
+ goto next;
+ }
+
+ modes[i] = WORKING_DIRECTORY;
+
+ first = cache_name_pos(source[i], len);
+ if (first >= 0)
+ die ("Huh? %s/ is in index?", dir);
+
+ first = -1 - first;
+ for (last = first; last < active_nr; last++) {
+ const char *path = active_cache[last]->name;
+ if (strncmp(path, dir, len) || path[len] != '/')
+ break;
+ }
+
+ if (last - first < 1)
+ bad = "source directory is empty";
+ else if (!bad) {
+ int j, dst_len = strlen(dest_dir);
+
+ if (last - first > 0) {
+ source = realloc(source,
+ (count + last - first)
+ * sizeof(char *));
+ destination = realloc(destination,
+ (count + last - first)
+ * sizeof(char *));
+ modes = realloc(modes,
+ (count + last - first)
+ * sizeof(enum update_mode));
+ }
+
+ dest_dir = add_slash(dest_dir);
+
+ for (j = 0; j < last - first; j++) {
+ const char *path =
+ active_cache[first + j]->name;
+ source[count + j] = path;
+ destination[count + j] =
+ prefix_path(dest_dir, dst_len,
+ path + len);
+ modes[count + j] = INDEX;
+ }
+ count += last - first;
+ }
+
+ goto next;
+ }
+
+ if (!bad && lstat(destination[i], &st) == 0) {
bad = "destination exists";
if (force) {
/*
@@ -147,6 +220,7 @@ int cmd_mv(int argc, const char **argv,
path_list_insert(destination[i], &src_for_dst);
}
+next:
if (bad) {
if (ignore_errors) {
if (--count > 0) {
@@ -157,7 +231,7 @@ int cmd_mv(int argc, const char **argv,
(count - i) * sizeof(char *));
}
} else
- die ("Error: %s, source=%s, destination=%s",
+ die ("%s, source=%s, destination=%s",
bad, source[i], destination[i]);
}
}
@@ -166,12 +240,15 @@ int cmd_mv(int argc, const char **argv,
if (show_only || verbose)
printf("Renaming %s to %s\n",
source[i], destination[i]);
- if (!show_only &&
+ if (!show_only && modes[i] != INDEX &&
rename(source[i], destination[i]) < 0 &&
!ignore_errors)
die ("renaming %s failed: %s",
source[i], strerror(errno));
+ if (modes[i] == WORKING_DIRECTORY)
+ continue;
+
if (cache_name_pos(source[i], strlen(source[i])) >= 0) {
path_list_insert(source[i], &deleted);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 322eaad..900ca93 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -74,4 +74,8 @@ test_expect_success \
git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path2/README.+path1/path2/README"'
+test_expect_failure \
+ 'do not move directory over existing directory' \
+ 'mkdir path0 && mkdir path0/path2 && git-mv path2 path0'
+
test_done
--
1.4.2.rc2.g96f2-dirty
^ permalink raw reply related [relevance 10%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 17:41 19% [PATCH 1/2] t7001: add test for git-mv dir1 dir2/ Johannes Schindelin
@ 2006-07-26 17:50 6% ` Jon Smirl
2006-07-26 18:23 5% ` Junio C Hamano
2006-07-26 18:47 6% ` Johannes Schindelin
2006-07-26 18:39 6% ` Josef Weidendorfer
1 sibling, 2 replies; 200+ results
From: Jon Smirl @ 2006-07-26 17:50 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, junkio
An exact test case:
git clone git foo
git clone git foo1
cd foo
mkdir zzz
git mv gitweb zzz
cg diff >patch
cd ../foo1
cg patch <../foo/patch
This patch won't apply because zzz does not exist in foo1
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 17:50 6% ` Jon Smirl
@ 2006-07-26 18:23 5% ` Junio C Hamano
2006-07-26 18:31 5% ` Jon Smirl
2006-07-26 18:47 6% ` Johannes Schindelin
1 sibling, 1 reply; 200+ results
From: Junio C Hamano @ 2006-07-26 18:23 UTC (permalink / raw)
To: Jon Smirl; +Cc: Johannes Schindelin, git, junkio
"Jon Smirl" <jonsmirl@gmail.com> writes:
> An exact test case:
>
> git clone git foo
> git clone git foo1
> cd foo
> mkdir zzz
> git mv gitweb zzz
> cg diff >patch
> cd ../foo1
> cg patch <../foo/patch
>
> This patch won't apply because zzz does not exist in foo1
A short and sweet reproduction recipe is essential for a problem
report like this, and I appreciate it very much. "git mv" in
"master" should do the right thing and I see Johannes fixing (or
fixed) the problem of "git mv" failing in his version.
We should correctly handle cases that fit your general
description (the test t/t4112-apply-renames.sh has a file in
"klibc/arch/x86_64" which is renamed and copied to two different
locations under "include/arch"). The above does not reproduce
for me if I used "git diff HEAD >patch" in place of "cg diff" (I
cannot make cg behave on my machine).
$ mkdir zzz
$ ~/git-master/bin/git-mv gitweb zzz/
$ LANG=C LC_ALL=C find gitweb zzz -type f -print
find: gitweb: No such file or directory
zzz/gitweb/README
zzz/gitweb/gitweb.cgi
zzz/gitweb/gitweb.css
zzz/gitweb/test/M??rchen
zzz/gitweb/test/file with spaces
zzz/gitweb/test/file+plus+sign
$ git diff HEAD >patch
$ git checkout -f HEAD
$ LANG=C LC_ALL=C find gitweb zzz -type f -print
gitweb/README
gitweb/gitweb.cgi
gitweb/gitweb.css
gitweb/test/M??rchen
gitweb/test/file with spaces
gitweb/test/file+plus+sign
find: zzz: No such file or directory
$ git apply --index <patch
$ LANG=C LC_ALL=C find gitweb zzz -type f -print
zzz/gitweb/README
zzz/gitweb/gitweb.cgi
zzz/gitweb/gitweb.css
zzz/gitweb/test/M??rchen
zzz/gitweb/test/file with spaces
zzz/gitweb/test/file+plus+sign
A couple of weeks ago test t/t4114-apply-typechange.sh was added
by Eric Wong, and it caught cases where git-apply was assuming
that leading directories of a new file already exists or was
complaining when you create file "foo" and remove a file
"foo/bar" (that is, you used to have directory at "foo"). The
problems that test found were all fixed as far as I recall.
^ permalink raw reply [relevance 5%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 18:23 5% ` Junio C Hamano
@ 2006-07-26 18:31 5% ` Jon Smirl
2006-07-26 18:58 6% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Jon Smirl @ 2006-07-26 18:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, git
On 7/26/06, Junio C Hamano <junkio@cox.net> wrote:
> We should correctly handle cases that fit your general
> description (the test t/t4112-apply-renames.sh has a file in
> "klibc/arch/x86_64" which is renamed and copied to two different
> locations under "include/arch"). The above does not reproduce
> for me if I used "git diff HEAD >patch" in place of "cg diff" (I
> cannot make cg behave on my machine).
cg diff makes a patch this looks like this
diff --git a/gitweb/README b/zzz/gitweb/README
similarity index 100%
rename from gitweb/README
rename to zzz/gitweb/README
diff --git a/gitweb/gitweb.cgi b/zzz/gitweb/gitweb.cgi
similarity index 100%
rename from gitweb/gitweb.cgi
rename to zzz/gitweb/gitweb.cgi
diff --git a/gitweb/gitweb.css b/zzz/gitweb/gitweb.css
similarity index 100%
rename from gitweb/gitweb.css
rename to zzz/gitweb/gitweb.css
diff --git "a/gitweb/test/M\303\244rchen" "b/zzz/gitweb/test/M\303\244rchen"
similarity index 100%
rename from "gitweb/test/M\303\244rchen"
rename to "zzz/gitweb/test/M\303\244rchen"
diff --git a/gitweb/test/file with spaces b/zzz/gitweb/test/file with spaces
similarity index 100%
rename from gitweb/test/file with spaces
rename to zzz/gitweb/test/file with spaces
diff --git a/gitweb/test/file+plus+sign b/zzz/gitweb/test/file+plus+sign
similarity index 100%
rename from gitweb/test/file+plus+sign
rename to zzz/gitweb/test/file+plus+sign
git diff HEAD makes a much longer patch that deltas out the existing
files and delta in the new file.
It's applying patches in the extended git format that fails.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [relevance 5%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 17:41 19% [PATCH 1/2] t7001: add test for git-mv dir1 dir2/ Johannes Schindelin
2006-07-26 17:50 6% ` Jon Smirl
@ 2006-07-26 18:39 6% ` Josef Weidendorfer
2006-07-26 19:05 6% ` Junio C Hamano
2006-07-28 1:30 5% ` Petr Baudis
1 sibling, 2 replies; 200+ results
From: Josef Weidendorfer @ 2006-07-26 18:39 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Jon Smirl, git, junkio, Petr Baudis
On Wednesday 26 July 2006 19:41, Johannes Schindelin wrote:
>
> If dir2 already exists, git-mv should move dir1 _into_dir2/.
> Noticed by Jon Smirl.
Thanks for adding this test.
BTW, the original PERL script passes it quite fine.
I just looked at Jon's problem. Doesn't seem to be related to
git-mv or git at all, but more a cogito problem.
I have some cogito-0.18pre installed, and cg-patch is patching
the stuff all itself, not using git for this. Pasky?
Doing the same with git, i.e. in a rep with existing dir/
mkdir new
git mv dir new
git diff --cached -M -C >patch
git reset --hard
git apply <patch
However, "git status" shows the "new/" directory totally
untracked afterwards. Is this expected?
Josef
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 17:50 6% ` Jon Smirl
2006-07-26 18:23 5% ` Junio C Hamano
@ 2006-07-26 18:47 6% ` Johannes Schindelin
1 sibling, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-07-26 18:47 UTC (permalink / raw)
To: Jon Smirl; +Cc: git, junkio
Hi,
On Wed, 26 Jul 2006, Jon Smirl wrote:
> An exact test case:
>
> git clone git foo
> git clone git foo1
> cd foo
> mkdir zzz
> git mv gitweb zzz
> cg diff >patch
> cd ../foo1
> cg patch <../foo/patch
>
> This patch won't apply because zzz does not exist in foo1
Okay, I got it wrong, then. Thanks for the clarification!
Ciao,
Dscho
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 18:31 5% ` Jon Smirl
@ 2006-07-26 18:58 6% ` Junio C Hamano
2006-07-26 19:31 6% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2006-07-26 18:58 UTC (permalink / raw)
To: Jon Smirl; +Cc: git
"Jon Smirl" <jonsmirl@gmail.com> writes:
> git diff HEAD makes a much longer patch that deltas out the existing
> files and delta in the new file.
>
> It's applying patches in the extended git format that fails.
Thanks.
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 18:39 6% ` Josef Weidendorfer
@ 2006-07-26 19:05 6% ` Junio C Hamano
2006-07-28 1:30 5% ` Petr Baudis
1 sibling, 0 replies; 200+ results
From: Junio C Hamano @ 2006-07-26 19:05 UTC (permalink / raw)
To: git
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
> On Wednesday 26 July 2006 19:41, Johannes Schindelin wrote:
>>
>> If dir2 already exists, git-mv should move dir1 _into_dir2/.
>> Noticed by Jon Smirl.
>
> Thanks for adding this test.
> BTW, the original PERL script passes it quite fine.
>
> I just looked at Jon's problem. Doesn't seem to be related to
> git-mv or git at all, but more a cogito problem.
> I have some cogito-0.18pre installed, and cg-patch is patching
> the stuff all itself, not using git for this. Pasky?
"git apply" seems to grok this just fine.
> Doing the same with git, i.e. in a rep with existing dir/
>
> mkdir new
> git mv dir new
> git diff --cached -M -C >patch
> git reset --hard
> git apply <patch
>
> However, "git status" shows the "new/" directory totally
> untracked afterwards. Is this expected?
Running "git apply --index <patch" I see the "renamed: " in
there and zzz (or your "new") is tracked.
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 18:58 6% ` Junio C Hamano
@ 2006-07-26 19:31 6% ` Junio C Hamano
2006-07-26 20:33 6% ` Jon Smirl
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2006-07-26 19:31 UTC (permalink / raw)
To: Jon Smirl; +Cc: git
Junio C Hamano <junkio@cox.net> writes:
> "Jon Smirl" <jonsmirl@gmail.com> writes:
>
>> git diff HEAD makes a much longer patch that deltas out the existing
>> files and delta in the new file.
>>
>> It's applying patches in the extended git format that fails.
>
> Thanks.
... and it turns out that "git apply" (with or without --index)
groks it just fine. I suspect the fix is quite recent (not in
v1.4.2-rc1 but in v1.4.2-rc2).
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 19:31 6% ` Junio C Hamano
@ 2006-07-26 20:33 6% ` Jon Smirl
0 siblings, 0 replies; 200+ results
From: Jon Smirl @ 2006-07-26 20:33 UTC (permalink / raw)
To: Junio C Hamano, Petr Baudis; +Cc: git
On 7/26/06, Junio C Hamano <junkio@cox.net> wrote:
> Junio C Hamano <junkio@cox.net> writes:
>
> > "Jon Smirl" <jonsmirl@gmail.com> writes:
> >
> >> git diff HEAD makes a much longer patch that deltas out the existing
> >> files and delta in the new file.
> >>
> >> It's applying patches in the extended git format that fails.
> >
> > Thanks.
>
> ... and it turns out that "git apply" (with or without --index)
> groks it just fine. I suspect the fix is quite recent (not in
> v1.4.2-rc1 but in v1.4.2-rc2).
I can confirm that git apply is handling this correctly with code from
the current git tree. cogito is failing this case.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-26 18:39 6% ` Josef Weidendorfer
2006-07-26 19:05 6% ` Junio C Hamano
@ 2006-07-28 1:30 5% ` Petr Baudis
2006-07-28 2:41 6% ` Junio C Hamano
1 sibling, 1 reply; 200+ results
From: Petr Baudis @ 2006-07-28 1:30 UTC (permalink / raw)
To: Josef Weidendorfer; +Cc: Johannes Schindelin, Jon Smirl, git, junkio
Dear diary, on Wed, Jul 26, 2006 at 08:39:24PM CEST, I got a letter
where Josef Weidendorfer <Josef.Weidendorfer@gmx.de> said that...
> On Wednesday 26 July 2006 19:41, Johannes Schindelin wrote:
> >
> > If dir2 already exists, git-mv should move dir1 _into_dir2/.
> > Noticed by Jon Smirl.
>
> Thanks for adding this test.
> BTW, the original PERL script passes it quite fine.
>
> I just looked at Jon's problem. Doesn't seem to be related to
> git-mv or git at all, but more a cogito problem.
> I have some cogito-0.18pre installed, and cg-patch is patching
> the stuff all itself, not using git for this. Pasky?
Unfortunately, git-apply is still quite unusable for Cogito. It can do
fuzzy merging now, but here's some random list of more issues I still
have with it (I'm leaving for some two weeks or so of holiday soon so I
won't have to fix them soon personally; it'd be nice if someone did,
though ;) :
(i) No git-apply -R - well, it seems to me that I revert patches all
the time, don't you?
(ii) I'd like git-apply to be as verbose as patch is, that is list
the files it touches as it goes
(iii) There's no reject handling besides "panic" right now - it should
be able to create .rej files so that the user can fix things up
(iv) I need git-apply to add/remove to/from index new/gone files,
while at the same time...
(v) I want to allow applying of patches to working copy that is not
completely clean, even on top of modified files
But yes, I'd like cg-patch to move to use git-apply. It's currently
_way_ too scary.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply [relevance 5%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-28 1:30 5% ` Petr Baudis
@ 2006-07-28 2:41 6% ` Junio C Hamano
2006-07-28 2:56 6% ` Petr Baudis
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2006-07-28 2:41 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
Petr Baudis <pasky@suse.cz> writes:
> (i) No git-apply -R - well, it seems to me that I revert patches all
> the time, don't you?
>
> (ii) I'd like git-apply to be as verbose as patch is, that is list
> the files it touches as it goes
>
> (iii) There's no reject handling besides "panic" right now - it should
> be able to create .rej files so that the user can fix things up
>
> (iv) I need git-apply to add/remove to/from index new/gone files,
> while at the same time...
>
> (v) I want to allow applying of patches to working copy that is not
> completely clean, even on top of modified files
You probably should be able to talk me into doing these, but
doesn't it already do (iv) and (v)?
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-28 2:41 6% ` Junio C Hamano
@ 2006-07-28 2:56 6% ` Petr Baudis
2006-07-28 4:48 6% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Petr Baudis @ 2006-07-28 2:56 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Dear diary, on Fri, Jul 28, 2006 at 04:41:04AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Petr Baudis <pasky@suse.cz> writes:
> > (iv) I need git-apply to add/remove to/from index new/gone files,
> > while at the same time...
> >
> > (v) I want to allow applying of patches to working copy that is not
> > completely clean, even on top of modified files
>
> You probably should be able to talk me into doing these, but
> doesn't it already do (iv) and (v)?
Well, at once? I can do (iv) by adding --index but that contradicts (v).
But maybe I'm missing something.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-28 2:56 6% ` Petr Baudis
@ 2006-07-28 4:48 6% ` Junio C Hamano
2006-07-28 15:47 6% ` Petr Baudis
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2006-07-28 4:48 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
Petr Baudis <pasky@suse.cz> writes:
> Dear diary, on Fri, Jul 28, 2006 at 04:41:04AM CEST, I got a letter
> where Junio C Hamano <junkio@cox.net> said that...
>> Petr Baudis <pasky@suse.cz> writes:
>> > (iv) I need git-apply to add/remove to/from index new/gone files,
>> > while at the same time...
>> >
>> > (v) I want to allow applying of patches to working copy that is not
>> > completely clean, even on top of modified files
>>
>> You probably should be able to talk me into doing these, but
>> doesn't it already do (iv) and (v)?
>
> Well, at once? I can do (iv) by adding --index but that contradicts (v).
> But maybe I'm missing something.
What should the semantics of such operation be? Apply to index
on paths that are clean while leave the index entries untouched
for paths that are dirty? What should happen on renamed paths
that are dirty?
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
2006-07-28 4:48 6% ` Junio C Hamano
@ 2006-07-28 15:47 6% ` Petr Baudis
0 siblings, 0 replies; 200+ results
From: Petr Baudis @ 2006-07-28 15:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Dear diary, on Fri, Jul 28, 2006 at 06:48:49AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Petr Baudis <pasky@suse.cz> writes:
> > Well, at once? I can do (iv) by adding --index but that contradicts (v).
> > But maybe I'm missing something.
>
> What should the semantics of such operation be? Apply to index
> on paths that are clean while leave the index entries untouched
> for paths that are dirty? What should happen on renamed paths
> that are dirty?
Keep the original sha1 but change the name. If an entry with the new
name already exists, we might just leave the index alone and create a
.rej file. (Alternatively we might create two stages in the index file
but we can't do that in case of regular rejects so I'd rather stay
consistent.)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply [relevance 6%]
* [ANNOUNCE] GIT 1.4.2
@ 2006-08-13 3:17 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2006-08-13 3:17 UTC (permalink / raw)
To: git; +Cc: linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 19665 bytes --]
The latest feature release GIT 1.4.2 is available at the usual
places:
http://www.kernel.org/pub/software/scm/git/
git-1.4.2.tar.{gz,bz2} (tarball)
git-htmldocs-1.4.2.tar.{gz,bz2} (preformatted docs)
git-manpages-1.4.2.tar.{gz,bz2} (preformatted docs)
RPMS/$arch/git-*-1.4.2-1.$arch.rpm (RPM)
I do not currently have access to i386 RH boxes, so there is
only x86_64 RPM in the RPMS directory mentioned above.
----------------------------------------------------------------
Changes since v1.4.1.1 are as follows:
A Large Angry SCM:
Additional merge-base tests (revised)
Alex Riesen:
Do not use perl in git-commit.sh
Trivial path optimization test
Alexandre Julliard:
git.el: Run git-rerere on commits if the rr-cache directory exists.
git.el: Prepend a slash to the file name when adding to .gitignore.
git.el: Try to reuse an existing buffer when running git-status.
git.el: Put the git customize group in the 'tools' parent group.
show-branch: Fix another performance problem.
Alp Toker:
Fix some doubled word typos
Fix some doubled word typos
Fix typos involving the word 'commit'
typofix (git-name-rev documentation)
git-send-email: Remove redundant Reply-To header
gitweb: Send XHTML as 'application/xhtml+xml' where possible
gitweb: Include a site name in page titles
gitweb: Make command invocations go through the git wrapper
documentation (urls.txt) typofix
Daniel Drake:
gitweb: escape tag comments
Dennis Stosberg:
gitweb: Declare global variables with "our"
gitweb: Declare global variables with "our"
Eric Wong:
Add git-instaweb, instantly browse the working repo with gitweb
instaweb: fix unportable ';' usage in sed
t8001-annotate: fix a bash-ism in this test
git-svn: avoid fetching files outside of the URL we're tracking
git-svn: migrate out of contrib
builtin-log: respect diff configuration options
diff.c: respect diff.renames config option
templates/hooks--update: replace diffstat calls with git diff --stat
git-svn: fix --file/-F option in commit-diff
tests: Set EDITOR=: and VISUAL=: globally
git-fetch: fix a bashism (==)
git-svn: don't check for migrations/upgrades on commit-diff
typechange tests for git apply (currently failing)
git-svn: fix fetching new directories copies when using SVN:: libs
git-svn: correctly kill keyword expansion without munging EOLs
git-svn: bugfix: allow SVN:: lib users to track the root of the repository
git-svn: split the path from the url correctly with limited perms
Gerrit Pape:
Build on Debian GNU/kFreeBSD
Jakub Narebski:
Allow INSTALL, bindir, mandir to be set in main Makefile
Rename man1 and man7 variables to man1dir and man7dir
autoconf: Use autoconf to write installation directories to config.mak.autogen
send-email: format 2822 datestring ourselves.
Teach make clean about configure and autoconf
Copy description of build configuration variables to configure.ac
autoconf: Preparing the way for autodetection
autoconf: Checks for typedefs, structures, and compiler characteristics.
autoconf: Checks for some library functions.
autoconf: Checks for libraries
autoconf: Checks for some programs
configure.ac vertical whitespace usage cleanup
Wrap long lines in docstrings in contrib/emacs/git.el
Display help for Git mode after pressing `h' or `?' in *git-status*
Jeff King:
pack-objects: check pack.window for default window size
Colorize 'commit' lines in log ui
git-push: allow -f as an alias for --force
git-push: remove obsolete git-push.sh
Documentation: convert uses of git-link macro to gitlink
git-annotate: remove extraneous debugging line
git-push: allow pushing from subdirectories
Joachim B Haga:
Make zlib compression level configurable, and change default.
Joachim Berdal Haga:
core.compression documentation formatting fix.
Johannes Schindelin:
refactor merge_bases() as preparation to libify merge-base
move get_merge_bases() to core lib.
Makefile: replace ugly and unportable sed invocation
Make git-fmt-merge-msg a builtin
Makefile: export NO_SVN_TESTS
Close the index file between writing and committing
Fix linking for not-so-clever linkers.
Fix t4114 on cygwin
Always reset the color _before_ printing out the newline
cvsserver: suppress warnings
cvsserver: avoid warning about active db handles
Allow an alias to start with "-p"
git wrapper: add --git-dir=<path> and --bare options
git-instaweb: some Apache have mod_cgi builtin
git-instaweb: respect bindir from Makefile
gitweb: fix two warnings
t7001: add test for git-mv dir1 dir2/
git-cvsserver: support multiline commit messages
Extract helper bits from c-merge-recursive work
Make git-mv a builtin
builtin git-mv: support moving directories
instaweb: Be more clear if httpd or the browser fail
cvsserver: imitate git-update-ref when committing
Makefile: ssh-pull.o depends on ssh-fetch.c
Teach git-apply about '-R'
Fix http-fetch
tar-tree: illustrate an obscure feature better
Fix crash when GIT_DIR is invalid
Jonas Fonseca:
Documentation/urls.txt: Use substitution to escape square brackets
Update git-init-db(1) and documentation of core.sharedRepository
Josef Weidendorfer:
Extend testing git-mv for renaming of subdirectories
Josh Triplett:
git-format-patch: Make the second and subsequent mails replies to the first
Add option to enable threading headers
Add option to set initial In-Reply-To/References
Junio C Hamano:
Makefile: add framework to verify and bench sha1 implementations.
test-sha1: test hashing large buffer
t4013: add tests for diff/log family output options.
t4013: add more tests around -c and --cc
Fix some more diff options changes.
t4013 test updates for new output code.
combine-diff.c: type sanity.
format-patch: fix diff format option implementation
t4013: add format-patch tests.
t4013: note improvements brought by the new output code.
gitweb: optimize per-file history generation
gitweb: optimize per-file history generation
t4013: add "diff" UI program tests.
builtin-diff: turn recursive on when defaulting to --patch format.
commit.c: do not redefine UNINTERESTING bit.
get_merge_bases: clean up even when there is no common commit.
revert clear-commit-marks for now.
boolean: accept yes and no as well
send-email: do not barf when Term::ReadLine does not like your terminal
t6200: fmt-merge-msg test.
git-grep: fix parsing of pathspec separator '--'
git-grep: fix exit code when we use external grep.
git-grep: use a bit more specific error messages.
Re-fix clear_commit_marks().
git-grep: boolean expression on pattern matching.
git-reset: complain and exit upon seeing an unknown parameter.
mailinfo: assume input is latin-1 on the header as we do for the body
diffcore-rename: try matching up renames without populating filespec first.
builtin-rev-parse.c: constness tightening
show-branch: match documentation and usage
rev-parse documentation: talk about range notation.
git-svn: migrate out of contrib (follow-up)
diff.c: --no-color to defeat diff.color configuration.
Update diff-options and config documentation.
git log -p --merge [[--] paths...]
colored diff: diff.color = auto fix
diff: do not use configuration magic at the core-level
"git -p cmd" to page anywhere
merge-base: update the clean-up postprocessing
fmt-merge-msg fix
Fix grammatical error in git-revert
git-repack: avoid redirecting stderr into git-pack-objects
test-lib: unset GIT_TRACE
t4013 diff format tests update
Adjust t4013 tests to corrected format-patch.
Documentation: Fix ssh://[user@]host.xz URL
fetch/clone: check return status from ls-remote
builtin-prune.c: forgot TYPE => OBJ changes.
Documentation/Makefile: product depends on asciidoc.conf
builtin-log: typefix for recent format-patch changes.
show-branch: fix performance problem.
checkout -f failed to check out a file if an existing directory interfered.
apply: check D/F conflicts more carefully.
apply: split out removal and creation into different phases.
apply: handle type-changing patch correctly.
git-diff A...B to (usually) mean "git-diff `git-merge-base A B` B"
git-fetch: fix --keep vs --thin
unpack-objects: remove stale and confusing comment
t4112: simplify the test and remove unneeded working tree file.
lost-found: use fsck-objects --full
git-reset: detect update-ref error and report it.
log and diff family: honor config even from subdirectories
git-apply -R: binary patches are irreversible for now.
t4103: fix binary patch application test.
git-checkout: allow "checkout HEAD -- path"
Builtins: control the use of pager from the command table.
fetch/clone: mark messages from remote side stand out.
Cygwin needs NO_C99_FORMAT???
Fix "git diff blob1 blob2" showing the diff in reverse.
read-tree: shadowed variable fix.
Add a couple of subdirectory tests.
diff.c: do not use pathname comparison to tell renames
Show both blob names from "git diff blob1 blob2"
sideband: do not use color, just say "remote:"
Documentation/git.txt: link git-svn and git-instaweb from the main page.
GIT 1.4.2-rc3
Further clean-up: usage() vs die()
Makefile: Cygwin does not seem to need NO_STRLCPY
Fix "grep -w"
debugging: XMALLOC_POISON
builtin-mv: fix use of uninitialized memory.
GIT-VERSION-GEN: adjust for ancient git
Documentation: git-status takes the same options as git-commit
Fix tutorial-2.html
check return value from diff_setup_done()
find_unique_abbrev() with len=0 should not abbreviate
make --find-copies-harder imply -C
allow diff.renamelimit to be set regardless of -M/-C
git-apply: applying a patch to make a symlink shorter.
combine-diff: use color
Fix git-diff A...B
builtin-apply: remove unused increment
git-sh-setup: do not use repo-config to test the git directory
git-am: give better diagnostics when the patch does not apply during --3way
Better error message when we are unable to lock the index file
t/t4013: fix futzing with the version string.
Linus Torvalds:
xdiff: generate "anti-diffs" aka what is common to two files
Prepare "git-merge-tree" for future work
Improved three-way blob merging code
Improve git-peek-remote
builtin "git prune"
Make the unpacked object header functions static to sha1_file.c
Remove TYPE_* constant macros and use object_type enums consistently.
sha1_file: add the ability to parse objects in "pack file format"
Call setup_git_directory() early
Call setup_git_directory() much earlier
Fix double "close()" in ce_compare_data
Fix up some fallout from "setup_git_directory()" cleanups
Luben Tuikov:
gitweb: Enable tree (directory) history display
gitweb: Enable tree (directory) history display
Add "raw" output option to blobs in "tree" view format
gitweb.cgi: Create $git_temp if it doesn't exist
gitweb.cgi: Teach "a=blob" action to know the blob/file mime type
gitweb.css: Use monospace fonts for commits and tree-diff.
gitweb.cgi: Teach git_history() to read hash from $hash_base
gitweb.cgi: Include direct link to "raw" files from "history"
gitweb.cgi: git_blame2: an alternative simple working git blame
gitweb.cgi: git_blame2: Allow back-trekking through commits
gitweb.cgi: Show "raw" head of project link even when $hash is not defined
gitweb.cgi: git_blame2: Revision blocks now have alternating colors
gitweb.cgi: Centralize printing of the page path
gitweb.cgi: git_blame2: slight optimization reading the blame lines
Lukas Sandström:
git-am: Don't accept an mbox on stdin of we already have a .dotest directory
Martin Langhoff:
cvsexportcommit - add -a (add author line) flag, cleanup warnings
Matthias Kestenholz:
Make git-prune-packed a builtin
Make git-repo-config a builtin
use declarations from builtin.h for builtin commands
Matthias Lederhofer:
GIT_TRACE: show which built-in/external commands are executed
change ent to tree in git-diff documentation
git-rev-list: add documentation for --parents, --no-merges
daemon: use a custom die routine with syslog
daemon: if one of the standard fds is missing open it to /dev/null
upload-pack: ignore write errors to stderr
daemon: new option --pid-file=<path> to store the pid
daemon: new option --detach to run git-daemon in background
Documentation about exclude/ignore files
argv created by handle_alias should be NULL terminated
upload-pack: fix timeout in create_pack_file
daemon: documentation for --reuseaddr, --detach and --pid-file
setup_git_directory_gently: do not barf when GIT_DIR is given.
git.c: allow alias expansion without a git directory
pager: config variable pager.color
git-grep: document --and, --or, --not, ( and )
Michael:
fixed variable declaration in gitk
Michael Krelin:
handle https:// protocol in git-clone
Michael S. Tsirkin:
mailinfo: accept >From in message header
Michal Rokos:
sed -e '/RE/r rfile/' needs space in 'r rfile'
Using 'perl' in *.sh
Paul Mackerras:
gitk: Allow the user to set some colors
gitk: Show the currently checked-out head in bold font
Pavel Roskin:
Assorted typo fixes
Typofix in Makefile comment.
Typofix in configure.ac comment.
Fix more typos, primarily in the code
Avoid C99 comments, use old-style C comments instead.
Quote all calls to GIT_CONF_APPEND_LINE
Set datarootdir in config.mak.in
Peter Baumann:
git-cvsexportcommit can't handle merge commits correctly
Peter Eriksen:
Substitute xmalloc()+memset(0) with xcalloc().
Petr Baudis:
Remove -d from *-fetch usage strings
Make pull() take some implicit data as explicit arguments
Make pull() support fetching multiple targets at once
Teach git-local-fetch the --stdin switch
Teach git-http-fetch the --stdin switch
Ramsay Jones:
Ensure git-clone exits with error if perl script fails.
Fix annotate test script; notice when git-annotate fails.
Fix installation of templates on ancient systems.
New tests and en-passant modifications to mktag.
Add NO_C99_FORMAT to support older compilers.
Fix header breakage due to redefining PATH_MAX.
Remove cmd_usage() routine and re-organize the help/usage code.
Fix header breakage with _XOPEN_SOURCE.
Fixup command names in some usage strings.
Replace some calls to die(usage_str) with usage(usage_str).
Allow config file to specify Signed-off-by identity in format-patch.
commit walkers: setup_ident() to record correct committer in ref-log.
Rene Scharfe:
Add get_merge_bases_clean()
Add '...' operator for revisions
Make clear_commit_marks() clean harder
Fold get_merge_bases_clean() into get_merge_bases()
rev-list: free commit_list in ... handler
git-tar-tree: fix minor memory leak
Add has_extension()
git-verify-pack: show usage when no pack was specified
git-verify-pack: more careful path handling
git-verify-pack: insist on .idx extension
git-verify-pack: get rid of while loop
git-verify-pack: free pack after use and a cleanup
git-verify-pack: buffer overrun paranoia
git-verify-pack: no need to count errors
drop length argument of has_extension
Robert Shearman:
format-patch: Generate a newline between the subject header and the message body
rebase: Fix the detection of fast-forwarding of the current branch to upstream.
rebase: Make the fast-fowarding message more user-friendly by using branch names instead of SHA1 IDs.
Rutger Nijlunsing:
http-push: Make WebDAV work with (broken?) default apache2 WebDAV module
Add Documentation/howto/setup-git-server-over-http.txt
Ryan Anderson:
annotate: Support annotation of files on other revisions.
annotate: Correct most merge following to annotate correctly.
Disable color detection during format-patch
log-tree: show_log() should respect the setting of diffopt->line_termination
annotate: Fix bug when parsing merges with differing real and logical parents.
Santi Béjar:
Teach rev-parse the ... syntax.
Defaulting fetch to origin when set in the repo-config
Sergey Vlasov:
Fix "git-fetch --tags" exit status when nothing has been changed
Shawn Pearce:
Avoid C99 initializers
Allow user.name and user.email to drive reflog entry.
Record the type of commit operation in the reflog.
Log ref changes made by git-fetch and git-pull.
Log ref changes made by git-merge and git-pull.
Log ref changes made by quiltimport.
Log ref changes made by resolve.
Make lazy mkdir more robust.
Record rebase changes as 'rebase' in the reflog.
Disable linking with Fink or DarwinPorts.
Display an error from update-ref if target ref name is invalid.
Stephan Feder:
Do not drop data from '\0' until eol in patch output
Teach --text option to diff
Teach diff -a as shorthand for --text
Add -a and --text to common diff options help
diff-options: Explain --text and -a
Timo Hirvonen:
Merge with_raw, with_stat and summary variables to output_format
Make --raw option available for all diff commands
Set default diff output format after parsing command line
DIFF_FORMAT_RAW is not default anymore
Add msg_sep to diff_options
Don't xcalloc() struct diffstat_t
whatchanged: Default to DIFF_FORMAT_RAW
Print empty line between raw, stat, summary and patch
diff-tree: Use ---\n as a message separator
log --raw: Don't descend into subdirectories by default
Fix diff-tree -s
GIT_TRACE: fix a mixed declarations and code warning
diff: Support both attributes and colors
diff: Support 256 colors
Unknown:
A better-scheduled PPC SHA-1 implementation.
Uwe Zeisberger:
Document rev-list's option --merge
Ville Skyttä:
Fix print-log and diff compatibility with recent vc versions
Willy Tarreau:
tar-tree: add the "tar.umask" config option
Yakov Lerner:
Mention the [user@] part in documentation of ssh:// urls.
^ permalink raw reply [relevance 1%]
* [PATCH] git-mv: succeed even if source is a prefix of destination
@ 2006-08-16 0:20 12% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-08-16 0:20 UTC (permalink / raw)
To: David Rientjes; +Cc: Fredrik Kuivinen, git
As noted by Fredrik Kuivinen, without this patch, git-mv fails on
git-mv README README-renamed
because "README" is a prefix of "README-renamed".
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
On Tue, 15 Aug 2006, David Rientjes wrote:
> On Tue, 15 Aug 2006, Fredrik Kuivinen wrote:
> > With the current master I get the following:
> >
> > $ git-mv README README-renamed
> > fatal: can not move directory into itself, source=README, destination=README-renamed
> >
>
> Please try the following patch.
>
> - if (!bad &&
> - !strncmp(destination[i], source[i], strlen(source[i])))
> + if (!bad && !strcmp(destination[i], source[i]))
This is not sufficient. It will not catch something like
git-mv some/path some/path/and/some/more/
builtin-mv.c | 5 ++++-
t/t7001-mv.sh | 4 ++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index a731f8d..e7b5eb7 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -119,6 +119,7 @@ int cmd_mv(int argc, const char **argv,
/* Checking */
for (i = 0; i < count; i++) {
+ int length;
const char *bad = NULL;
if (show_only)
@@ -204,7 +205,9 @@ int cmd_mv(int argc, const char **argv,
}
if (!bad &&
- !strncmp(destination[i], source[i], strlen(source[i])))
+ (length = strlen(source[i])) >= 0 &&
+ !strncmp(destination[i], source[i], length) &&
+ (destination[i][length] == 0 || destination[i][length] == '/'))
bad = "can not move directory into itself";
if (!bad && cache_name_pos(source[i], strlen(source[i])) < 0)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 900ca93..e5e0bb9 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -60,6 +60,10 @@ test_expect_success \
grep -E "^R100.+path0/README.+path2/README"'
test_expect_success \
+ 'succeed when source is a prefix of destination' \
+ 'git-mv path2/COPYING path2/COPYING-renamed'
+
+test_expect_success \
'moving whole subdirectory into subdirectory' \
'git-mv path2 path1'
--
1.4.2.g2e3b
^ permalink raw reply related [relevance 12%]
* [PATCH] git-mv: special case destination "."
@ 2006-08-18 10:42 12% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-08-18 10:42 UTC (permalink / raw)
To: Fredrik Kuivinen; +Cc: git
Since the normalized basename of "." is "", the check for directory
failed erroneously.
Noticed by Fredrik Kuivinen.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
> Subject: Re: Another git-mv bug
... and another fix.
On Fri, 18 Aug 2006, Fredrik Kuivinen wrote:
> In a Git repository:
>
> $ git mv templates/info--exclude .
> fatal: renaming templates/info--exclude failed: No such file or directory
builtin-mv.c | 5 ++++-
t/t7001-mv.sh | 4 ++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index c0c8764..b2ecc26 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -114,7 +114,10 @@ int cmd_mv(int argc, const char **argv,
modes = xcalloc(count, sizeof(enum update_mode));
dest_path = copy_pathspec(prefix, argv + argc - 1, 1, 0);
- if (!lstat(dest_path[0], &st) &&
+ if (dest_path[0][0] == '\0')
+ /* special case: "." was normalized to "" */
+ destination = copy_pathspec(dest_path[0], argv + i, count, 1);
+ else if (!lstat(dest_path[0], &st) &&
S_ISDIR(st.st_mode)) {
dest_path[0] = add_slash(dest_path[0]);
destination = copy_pathspec(dest_path[0], argv + i, count, 1);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e5e0bb9..b7fcdb3 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -82,4 +82,8 @@ test_expect_failure \
'do not move directory over existing directory' \
'mkdir path0 && mkdir path0/path2 && git-mv path2 path0'
+test_expect_success \
+ 'move into "."' \
+ 'git-mv path1/path2/ .'
+
test_done
--
1.4.2.ge0502-dirty
^ permalink raw reply related [relevance 12%]
* Re: [PATCH] cleans up builtin-mv
@ 2006-08-19 1:26 5% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-08-19 1:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi,
On Fri, 18 Aug 2006, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > What you cleverly did not mention: It was inside a
> >
> > if (!bad &&
> > (length = strlen(source[i])) >= 0 &&
> > !strncmp(destination[i], source[i], length) &&
> > (destination[i][length] == 0 || destination[i][length] == '/'))
> >
> > construct. So, we assign the "length" variable only if we have to. And the
> > ">= 0" trick is a common one. I could have done
> >
> > !strncmp(destination[i], source[i], (length = strlen(source[i])))
> >
> > but even I find that ugly.
>
> I usually side with you but on this I can't.
>
> There are 2 ways to generate branch instructions in C.
>
> - compound statements specifically designed for expressing
> control structure: if () ... else ..., for (), while (),
> switch (), etc.
>
> - expressions using conditional operators or logical operators
> that short circuit: ... ? ... : ..., ... && ... || ...
>
> The latter form may still be readable even with simple side
> effects inside its terms, but "(l = strlen(s)) >= 0" is done
> solely for the side effect, and its computed value does not have
> anything to do with the logical operation &&.
>
> THIS IS UGLY. And do not want to live in a world where this
> ugliness is a "common one", as you put it.
Okay. Probably the explanation is: I do not use git-mv myself, but only
got annoyed enough by a failing t7001 to rewrite it.
> And this avoiding one call to strlen(source[i]) is unnecessary
> even as an optimization -- you end up calling strlen() on it
> later in the code anyway, as David points out.
>
> I think this part is far easier to read if you did it like this:
>
> length = strlen(source[i]);
> if (lstat(source[i], &st) < 0)
> bad = "bad source";
> else if (!strncmp(destination[i], source[i], length) &&
> (destination[i][length] == 0 ||
> destination[i][length] == '/'))
> bad = "can not move directory into itself";
>
> if (S_ISDIR(st.st_mode)) {
> ...
>
> Note that the above is an absolute minimum rewrite. Other
> things I noticed are:
>
> - source[i] and destination[i] are referenced all the time; the
> code would be easer to read if you had something like this
> upfront:
>
> /* Checking */
> for (i = 0; i < count; i++) {
> const char *bad = NULL;
> const char *src = source[i];
> const char *dst = destination[i];
> int srclen = strlen(src);
> int dstlen = strlen(dst);
>
> You might end up not using dstlen in some cases, but I think
> this would be far easier to read. Micro-optimizing by saying
> "this is used only in this branch of this later if()
> statement but in that case it is always set in that branch of
> that earlier if() statement" makes unmaintainably confusing
> code.
>
> - I do not think you need "const char *dir, *dest_dir" inside
> the "source is directory" branch; I would just use src and dst
> consistently;
These changes would make the source more readable, yes.
> - You muck with dest_dir by calling add_slash(dest_dir) but
> call prefix_path() with dst_len you computed earlier;
> prefix_path() may know what to do, but is this intended?
That is probably a late night oversight.
If noone else is faster, I will do the requested changes tomorrow.
Ciao,
Dscho
^ permalink raw reply [relevance 5%]
* [PATCH] git-mv: fix off-by-one error
@ 2006-08-21 20:22 5% Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2006-08-21 20:22 UTC (permalink / raw)
To: git, junkio
Embarassing.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
This bug made t7001-mv.sh fail with the patch in
http://article.gmane.org/gmane.comp.version-control.git/25647
when XMALLOC_POISON was set, which was probably the reason it
was not yet applied...
builtin-mv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 6e7062b..ff882be 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -26,7 +26,7 @@ static const char **copy_pathspec(const
if (length > 0 && result[i][length - 1] == '/') {
char *without_slash = xmalloc(length);
memcpy(without_slash, result[i], length - 1);
- without_slash[length] = '\0';
+ without_slash[length - 1] = '\0';
result[i] = without_slash;
}
if (base_name) {
--
1.4.2.gc69d
^ permalink raw reply related [relevance 5%]
* Re: [PATCH] Adjust t5510 to put remotes in config
@ 2006-12-18 23:27 8% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2006-12-18 23:27 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Junio C Hamano <junkio@cox.net> writes:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> On Mon, 18 Dec 2006, Johannes Schindelin wrote:
>>
>>> I don't install templates. Ever. I want to be sure that nothing slips in
>>> by mistake, and so I install hooks manually.
>>
>> Side note: prior to installing the tests would fail anyway, no?
>
> They shouldn't. At least the intent was to make the tests read
> from $SRCDIR/templates/blt/ as the source of templates.
>
> But maybe you spotted a bug in t/test-lib.sh; I don't know
> without digging.
Indeed it appears to be the case. I am thinking about applying
this patch to fix it.
-- >8 --
fix testsuite: make sure they use templates freshly built from the source
The initial t/trash repository for testing was created properly
but over time we gained many tests that create secondary test
repositories with init-db or clone and they were not careful
enough.
This fixes it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ac7be76..7e91497 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -182,6 +182,16 @@ test_create_repo () {
cd "$owd"
}
+# Many tests do init-db and clone but they must be told about the freshly
+# built templates.
+git_init_db () {
+ git init-db --template="$GIT_EXEC_PATH/templates/blt/" "$@"
+}
+
+git_clone () {
+ git clone --template="$GIT_EXEC_PATH/templates/blt/" "$@"
+}
+
test_done () {
trap - exit
case "$test_failure" in
diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh
index 74f5c2a..a79c77a 100755
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
@@ -50,12 +50,12 @@ test_expect_success 'setup separate repository lacking postimage' '
git tar-tree initial initial | tar xf - &&
(
- cd initial && git init-db && git add .
+ cd initial && git_init_db && git add .
) &&
git tar-tree second second | tar xf - &&
(
- cd second && git init-db && git add .
+ cd second && git_init_db && git add .
)
'
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index de45ac4..8a8152b 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -44,7 +44,7 @@ test_expect_success \
'unpack without delta' \
"GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
- git-init-db &&
+ git_init_db &&
git-unpack-objects -n <test-1-${packname_1}.pack &&
git-unpack-objects <test-1-${packname_1}.pack"
@@ -75,7 +75,7 @@ test_expect_success \
'unpack with delta' \
'GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
- git-init-db &&
+ git_init_db &&
git-unpack-objects -n <test-2-${packname_2}.pack &&
git-unpack-objects <test-2-${packname_2}.pack'
@@ -100,7 +100,7 @@ test_expect_success \
'use packed objects' \
'GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
- git-init-db &&
+ git_init_db &&
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
git-diff-tree --root -p $commit &&
while read object
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 28744b3..901da8c 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -24,7 +24,7 @@ test_expect_success setup '
parent=$commit || return 1
done &&
git-update-ref HEAD "$commit" &&
- git-clone -l ./. victim &&
+ git_clone -l ./. victim &&
cd victim &&
git-log &&
cd .. &&
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index f7625a6..61e2a55 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -97,7 +97,7 @@ pull_to_client () {
(
mkdir client &&
cd client &&
- git-init-db 2>> log2.txt
+ git_init_db 2>> log2.txt
)
add A1
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index a11ab0a..e2e8c89 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -15,12 +15,12 @@ test_expect_success setup '
git commit -a -m original'
test_expect_success "clone and setup child repos" '
- git clone . one &&
+ git_clone . one &&
cd one &&
echo >file updated by one &&
git commit -a -m "updated by one" &&
cd .. &&
- git clone . two &&
+ git_clone . two &&
cd two &&
git repo-config branch.master.remote one &&
{
@@ -28,7 +28,7 @@ test_expect_success "clone and setup child repos" '
echo "Pull: refs/heads/master:refs/heads/one"
} >.git/remotes/one
cd .. &&
- git clone . three &&
+ git_clone . three &&
cd three &&
git repo-config branch.master.remote two &&
git repo-config branch.master.merge refs/heads/one &&
@@ -74,7 +74,7 @@ test_expect_success 'fetch following tags' '
mkdir four &&
cd four &&
- git init-db &&
+ git_init_db &&
git fetch .. :track &&
git show-ref --verify refs/tags/anno &&
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index f841574..66ef92f 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -17,7 +17,7 @@ test_expect_success setup '
test_expect_success 'pulling into void' '
mkdir cloned &&
cd cloned &&
- git init-db &&
+ git_init_db &&
git pull ..
'
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index 041be04..1913a12 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -13,7 +13,7 @@ remove the directory before attempting a clone again.'
test_expect_failure \
'clone of non-existent source should fail' \
- 'git-clone foo bar'
+ 'git_clone foo bar'
test_expect_failure \
'failed clone should not leave a directory' \
@@ -29,11 +29,11 @@ test_create_repo foo
# current path not to the target dir
test_expect_failure \
'clone of non-existent (relative to $PWD) source should fail' \
- 'git-clone ../foo baz'
+ 'git_clone ../foo baz'
test_expect_success \
'clone should work now that source exists' \
- 'git-clone foo bar'
+ 'git_clone foo bar'
test_expect_success \
'successfull clone must leave the directory' \
diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh
index dd9caad..52dab2d 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -17,7 +17,7 @@ git commit -m initial'
cd "$base_dir"
test_expect_success 'preparing second repository' \
-'git clone A B && cd B &&
+'git_clone A B && cd B &&
echo second > file2 &&
git add file2 &&
git commit -m addition &&
@@ -27,7 +27,7 @@ git prune'
cd "$base_dir"
test_expect_success 'cloning with reference' \
-'git clone -l -s --reference B A C'
+'git_clone -l -s --reference B A C'
cd "$base_dir"
diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
index b9f6d96..3c43554 100755
--- a/t/t5710-info-alternate.sh
+++ b/t/t5710-info-alternate.sh
@@ -34,7 +34,7 @@ git prune'
cd "$base_dir"
test_expect_success 'preparing second repository' \
-'git clone -l -s A B && cd B &&
+'git_clone -l -s A B && cd B &&
echo "foo bar" > file2 &&
git add file2 &&
git commit -m "next commit" file2 &&
@@ -44,7 +44,7 @@ git prune'
cd "$base_dir"
test_expect_success 'preparing third repository' \
-'git clone -l -s B C && cd C &&
+'git_clone -l -s B C && cd C &&
echo "Goodbye, cruel world" > file3 &&
git add file3 &&
git commit -m "one more" file3 &&
@@ -54,11 +54,11 @@ git prune'
cd "$base_dir"
test_expect_failure 'creating too deep nesting' \
-'git clone -l -s C D &&
-git clone -l -s D E &&
-git clone -l -s E F &&
-git clone -l -s F G &&
-git clone -l -s G H &&
+'git_clone -l -s C D &&
+git_clone -l -s D E &&
+git_clone -l -s E F &&
+git_clone -l -s F G &&
+git_clone -l -s G H &&
cd H &&
test_valid_repo'
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 2f4ff82..ae597e8 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -88,7 +88,7 @@ test_expect_success \
test_expect_success "Michael Cassar's test case" '
rm -fr .git papers partA &&
- git init-db &&
+ git_init_db &&
mkdir -p papers/unsorted papers/all-papers partA &&
echo a > papers/unsorted/Thesis.pdf &&
echo b > partA/outline.txt &&
@@ -109,7 +109,7 @@ rm -fr papers partA path?
test_expect_success "Sergey Vlasov's test case" '
rm -fr .git &&
- git init-db &&
+ git_init_db &&
mkdir ab &&
date >ab.c &&
date >ab/d &&
^ permalink raw reply related [relevance 8%]
* [PATCH] use 'init' instead of 'init-db' for shipped docs and tools
@ 2007-01-12 21:01 5% Nicolas Pitre
0 siblings, 0 replies; 200+ results
From: Nicolas Pitre @ 2007-01-12 21:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
While 'init-db' still is and probably will always remain a valid git
command for obvious backward compatibility reasons, it would be a good
idea to move shipped tools and docs to using 'init' instead.
Signed-off-by: Nicolas Pitre <nico@cam.org>
---
diff --git a/Documentation/config.txt b/Documentation/config.txt
index b4aae0d..f7dba89 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -100,7 +100,7 @@ core.sharedRepository::
group-writable). When 'all' (or 'world' or 'everybody'), the
repository will be readable by all users, additionally to being
group-shareable. When 'umask' (or 'false'), git will use permissions
- reported by umask(2). See gitlink:git-init-db[1]. False by default.
+ reported by umask(2). See gitlink:git-init[1]. False by default.
core.warnAmbiguousRefs::
If true, git will warn you if the ref name you passed it is ambiguous
diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt
index 5ea6117..0cd33fb 100644
--- a/Documentation/core-tutorial.txt
+++ b/Documentation/core-tutorial.txt
@@ -46,12 +46,12 @@ to import into git.
For our first example, we're going to start a totally new repository from
scratch, with no pre-existing files, and we'll call it `git-tutorial`.
To start up, create a subdirectory for it, change into that
-subdirectory, and initialize the git infrastructure with `git-init-db`:
+subdirectory, and initialize the git infrastructure with `git-init`:
------------------------------------------------
$ mkdir git-tutorial
$ cd git-tutorial
-$ git-init-db
+$ git-init
------------------------------------------------
to which git will reply
@@ -1371,11 +1371,11 @@ $ mkdir my-git.git
------------
Then, make that directory into a git repository by running
-`git init-db`, but this time, since its name is not the usual
+`git init`, but this time, since its name is not the usual
`.git`, we do things slightly differently:
------------
-$ GIT_DIR=my-git.git git-init-db
+$ GIT_DIR=my-git.git git-init
------------
Make sure this directory is available for others you want your
@@ -1511,7 +1511,7 @@ A recommended workflow for a "project lead" goes like this:
+
If other people are pulling from your repository over dumb
transport protocols (HTTP), you need to keep this repository
-'dumb transport friendly'. After `git init-db`,
+'dumb transport friendly'. After `git init`,
`$GIT_DIR/hooks/post-update` copied from the standard templates
would contain a call to `git-update-server-info` but the
`post-update` hook itself is disabled by default -- enable it
diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt
index 8e09bea..775bf42 100644
--- a/Documentation/cvs-migration.txt
+++ b/Documentation/cvs-migration.txt
@@ -80,7 +80,7 @@ it:
------------------------------------------------
$ mkdir /pub/my-repo.git
$ cd /pub/my-repo.git
-$ git --bare init-db --shared
+$ git --bare init --shared
$ git --bare fetch /home/alice/myproject master:master
------------------------------------------------
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index e1fd688..596b567 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -79,9 +79,7 @@ was primarily meant to initialize the object database, but over
time it has become responsible for setting up the other aspects
of the repository, such as installing the default hooks and
setting the configuration variables. The old name is retained
-because people are so used to it and many existing documents
-refer to it that way, and this will not change for some time to
-come.
+for backward compatibility reasons.
EXAMPLES
diff --git a/Documentation/git-p4import.txt b/Documentation/git-p4import.txt
index ee9e8fa..6edb9f1 100644
--- a/Documentation/git-p4import.txt
+++ b/Documentation/git-p4import.txt
@@ -93,7 +93,7 @@ perforce branch into a branch named "jammy", like so:
------------
$ mkdir -p /home/sean/import/jam
$ cd /home/sean/import/jam
-$ git init-db
+$ git init
$ git p4import //public/jam jammy
------------
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 1b01313..9ed7211 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -171,7 +171,7 @@ OPTIONS
--shared::
--template=<template_directory>::
Only used with the 'init' command.
- These are passed directly to gitlink:git-init-db[1].
+ These are passed directly to gitlink:git-init[1].
-r <ARG>::
--revision <ARG>::
@@ -367,7 +367,7 @@ Basic Examples
Tracking and contributing to a the trunk of a Subversion-managed project:
------------------------------------------------------------------------
-# Initialize a repo (like git init-db):
+# Initialize a repo (like git init):
git-svn init http://svn.foo.org/project/trunk
# Fetch remote revisions:
git-svn fetch
@@ -388,7 +388,7 @@ See also:
'<<tracking-multiple-repos,Tracking Multiple Repositories or Branches>>'
------------------------------------------------------------------------
-# Initialize a repo (like git init-db):
+# Initialize a repo (like git init):
git-svn multi-init http://svn.foo.org/project \
-T trunk -b branches -t tags
# Fetch remote revisions:
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 5662cdc..f89d745 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -354,8 +354,7 @@ gitlink:git-index-pack[1]::
Build pack idx file for an existing packed archive.
gitlink:git-init[1]::
-gitlink:git-init-db[1]::
- Creates an empty git object database, or reinitialize an
+ Creates an empty git repository, or reinitialize an
existing one.
gitlink:git-merge-file[1]::
diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt
index 161123f..e3b76f9 100644
--- a/Documentation/hooks.txt
+++ b/Documentation/hooks.txt
@@ -3,7 +3,7 @@ Hooks used by git
Hooks are little scripts you can place in `$GIT_DIR/hooks`
directory to trigger action at certain points. When
-`git-init-db` is run, a handful example hooks are copied in the
+`git-init` is run, a handful example hooks are copied in the
`hooks` directory of the new repository, but by default they are
all disabled. To enable a hook, make it executable with `chmod +x`.
diff --git a/Documentation/howto/setup-git-server-over-http.txt b/Documentation/howto/setup-git-server-over-http.txt
index ba19156..a202f3a 100644
--- a/Documentation/howto/setup-git-server-over-http.txt
+++ b/Documentation/howto/setup-git-server-over-http.txt
@@ -70,7 +70,7 @@ DocumentRoot /where/ever/httpd.conf" to find your root:
Initialize a bare repository
$ cd my-new-repo.git
- $ git --bare init-db
+ $ git --bare init
Change the ownership to your web-server's credentials. Use "grep ^User
diff --git a/Documentation/repository-layout.txt b/Documentation/repository-layout.txt
index e20fb7e..0fdd366 100644
--- a/Documentation/repository-layout.txt
+++ b/Documentation/repository-layout.txt
@@ -102,7 +102,7 @@ branches::
hooks::
Hooks are customization scripts used by various git
commands. A handful of sample hooks are installed when
- `git init-db` is run, but all of them are disabled by
+ `git init` is run, but all of them are disabled by
default. To enable, they need to be made executable.
Read link:hooks.html[hooks] for more details about
each hook.
diff --git a/INSTALL b/INSTALL
index e7aea60..361c65b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -95,7 +95,7 @@ Issues of note:
repository itself. For example, you could:
$ mkdir manual && cd manual
- $ git init-db
+ $ git init
$ git fetch-pack git://git.kernel.org/pub/scm/git/git.git man html |
while read a b
do
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 22729f0..8e7540b 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -56,7 +56,7 @@ static void copy_templates_1(char *path, int baselen,
/* Note: if ".git/hooks" file exists in the repository being
* re-initialized, /etc/core-git/templates/hooks/update would
- * cause git-init-db to fail here. I think this is sane but
+ * cause git-init to fail here. I think this is sane but
* it means that the set of templates we ship by default, along
* with the way the namespace under .git/ is organized, should
* be really carefully chosen.
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 1de14ea..975777f 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -22,7 +22,7 @@ commit
diff
fetch
grep
-init-db
+init
log
merge
mv
diff --git a/git-archimport.perl b/git-archimport.perl
index ada60ec..2e15781 100755
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -226,7 +226,7 @@ my $import = 0;
unless (-d $git_dir) { # initial import
if ($psets[0]{type} eq 'i' || $psets[0]{type} eq 't') {
print "Starting import from $psets[0]{id}\n";
- `git-init-db`;
+ `git-init`;
die $! if $?;
$import = 1;
} else {
diff --git a/git-clone.sh b/git-clone.sh
index cf761b2..0f7bbbf 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -214,7 +214,7 @@ yes)
GIT_DIR="$D" ;;
*)
GIT_DIR="$D/.git" ;;
-esac && export GIT_DIR && git-init-db ${template+"$template"} || usage
+esac && export GIT_DIR && git-init ${template+"$template"} || usage
if test -n "$reference"
then
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 1018f4f..35ef0c0 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -520,7 +520,7 @@ $orig_git_index = $ENV{GIT_INDEX_FILE} if exists $ENV{GIT_INDEX_FILE};
my %index; # holds filenames of one index per branch
unless (-d $git_dir) {
- system("git-init-db");
+ system("git-init");
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
system("git-read-tree");
die "Cannot init an empty tree: $?\n" if $?;
@@ -660,7 +660,7 @@ $ignorebranch{'#CVSPS_NO_BRANCH'} = 1;
sub commit {
if ($branch eq $opt_o && !$index{branch} && !get_headref($branch, $git_dir)) {
# looks like an initial commit
- # use the index primed by git-init-db
+ # use the index primed by git-init
$ENV{GIT_INDEX_FILE} = '.git/index';
$index{$branch} = '.git/index';
} else {
diff --git a/git-p4import.py b/git-p4import.py
index 908941d..5c56cac 100644
--- a/git-p4import.py
+++ b/git-p4import.py
@@ -163,7 +163,7 @@ class git_command:
self.gitdir = self.get_single("rev-parse --git-dir")
report(2, "gdir:", self.gitdir)
except:
- die("Not a git repository... did you forget to \"git init-db\" ?")
+ die("Not a git repository... did you forget to \"git init\" ?")
try:
self.cdup = self.get_single("rev-parse --show-cdup")
if self.cdup != "":
diff --git a/git-svn.perl b/git-svn.perl
index 56f1700..9986a0c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -286,7 +286,7 @@ sub init {
$SVN_URL = $url;
unless (-d $GIT_DIR) {
- my @init_db = ('init-db');
+ my @init_db = ('init');
push @init_db, "--template=$_template" if defined $_template;
push @init_db, "--shared" if defined $_shared;
command_noisy(@init_db);
diff --git a/git-svnimport.perl b/git-svnimport.perl
index f1f1a7d..3af8c7e 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -285,7 +285,7 @@ my $last_rev = "";
my $last_branch;
my $current_rev = $opt_s || 1;
unless(-d $git_dir) {
- system("git-init-db");
+ system("git-init");
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
system("git-read-tree");
die "Cannot init an empty tree: $?\n" if $?;
diff --git a/perl/Git.pm b/perl/Git.pm
index 2b26b65..3474ad3 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -63,7 +63,7 @@ for doing easily operations which are not totally trivial to do over
the generic command interface.
While some commands can be executed outside of any context (e.g. 'version'
-or 'init-db'), most operations require a repository context, which in practice
+or 'init'), most operations require a repository context, which in practice
means getting an instance of the Git object using the repository() constructor.
(In the future, we will also get a new_repository() constructor.) All commands
called as methods of the object are then executed in the context of the
diff --git a/t/README b/t/README
index 7abab1d..36f2517 100644
--- a/t/README
+++ b/t/README
@@ -18,7 +18,7 @@ The easiest way to run tests is to say "make". This runs all
the tests.
*** t0000-basic.sh ***
- * ok 1: .git/objects should be empty after git-init-db in an empty repo.
+ * ok 1: .git/objects should be empty after git-init in an empty repo.
* ok 2: .git/objects should have 256 subdirectories.
* ok 3: git-update-index without --add should fail adding.
...
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 0cd1c41..186de70 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -31,12 +31,12 @@ fi
. ./test-lib.sh
################################################################
-# init-db has been done in an empty repository.
+# git-init has been done in an empty repository.
# make sure it is empty.
find .git/objects -type f -print >should-be-empty
test_expect_success \
- '.git/objects should be empty after git-init-db in an empty repo.' \
+ '.git/objects should be empty after git-init in an empty repo.' \
'cmp -s /dev/null should-be-empty'
# also it should have 2 subdirectories; no fan-out anymore, pack, and info.
diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh
index 74f5c2a..aa2c869 100755
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
@@ -50,12 +50,12 @@ test_expect_success 'setup separate repository lacking postimage' '
git tar-tree initial initial | tar xf - &&
(
- cd initial && git init-db && git add .
+ cd initial && git init && git add .
) &&
git tar-tree second second | tar xf - &&
(
- cd second && git init-db && git add .
+ cd second && git init && git add .
)
'
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index de45ac4..f511547 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -44,7 +44,7 @@ test_expect_success \
'unpack without delta' \
"GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
- git-init-db &&
+ git-init &&
git-unpack-objects -n <test-1-${packname_1}.pack &&
git-unpack-objects <test-1-${packname_1}.pack"
@@ -75,7 +75,7 @@ test_expect_success \
'unpack with delta' \
'GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
- git-init-db &&
+ git-init &&
git-unpack-objects -n <test-2-${packname_2}.pack &&
git-unpack-objects <test-2-${packname_2}.pack'
@@ -100,7 +100,7 @@ test_expect_success \
'use packed objects' \
'GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
- git-init-db &&
+ git-init &&
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
git-diff-tree --root -p $commit &&
while read object
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 77c3c57..ef78df6 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -97,7 +97,7 @@ pull_to_client () {
(
mkdir client &&
cd client &&
- git-init-db 2>> log2.txt
+ git-init 2>> log2.txt
)
add A1
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 90eeeba..3ce9446 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -73,7 +73,7 @@ test_expect_success 'fetch following tags' '
mkdir four &&
cd four &&
- git init-db &&
+ git init &&
git fetch .. :track &&
git show-ref --verify refs/tags/anno &&
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index f841574..7eb3783 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -17,7 +17,7 @@ test_expect_success setup '
test_expect_success 'pulling into void' '
mkdir cloned &&
cd cloned &&
- git init-db &&
+ git init &&
git pull ..
'
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 2f4ff82..3440332 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -88,7 +88,7 @@ test_expect_success \
test_expect_success "Michael Cassar's test case" '
rm -fr .git papers partA &&
- git init-db &&
+ git init &&
mkdir -p papers/unsorted papers/all-papers partA &&
echo a > papers/unsorted/Thesis.pdf &&
echo b > partA/outline.txt &&
@@ -109,7 +109,7 @@ rm -fr papers partA path?
test_expect_success "Sergey Vlasov's test case" '
rm -fr .git &&
- git init-db &&
+ git init &&
mkdir ab &&
date >ab.c &&
date >ab/d &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 72ea2b2..8e3ee6c 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -220,8 +220,8 @@ test_create_repo () {
repo="$1"
mkdir "$repo"
cd "$repo" || error "Cannot setup test environment"
- "$GIT_EXEC_PATH/git" init-db --template=$GIT_EXEC_PATH/templates/blt/ >/dev/null 2>&1 ||
- error "cannot run git init-db -- have you built things yet?"
+ "$GIT_EXEC_PATH/git" init --template=$GIT_EXEC_PATH/templates/blt/ >/dev/null 2>&1 ||
+ error "cannot run git init -- have you built things yet?"
mv .git/hooks .git/hooks-disabled
cd "$owd"
}
^ permalink raw reply related [relevance 5%]
* Re: [PATCH] git-filter-branch could be confused by similar names
@ 2008-01-05 1:17 4% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-01-05 1:17 UTC (permalink / raw)
To: Dmitry Potapov; +Cc: git, Johannes Schindelin
Dmitry Potapov <dpotapov@gmail.com> writes:
> On Thu, Jan 03, 2008 at 01:27:27PM -0800, Junio C Hamano wrote:
>> ... I had an
>> impression that we try to stick to a subset of BRE (namely, no
>> \{m,n\}, [::], [==], nor [..]).
>
> I was not aware about this policy, and I am not aware about
> existing any grep that does not grok the expressions I used
> above. So, I thought they are commonly accepted, but I might
> be wrong.
Well I might be wrong too, as I did not vet all the existing use
of grep in our code. That's why I said I had "an impression".
Now I have ("git grep 'grep ' -- 'git-*.sh'"), and it seems to
be that we do stick to a narrow subset of BRE.
* We do not use \{m,n\};
* We do not use -E;
* We do not use ? nor + (which are \{0,1\} and \{1,\}
respectively in BRE) but that goes without saying as these
are ERE elements not BRE (note that \? and \+ you wrote are
not even part of BRE -- making them accessible from BRE is a
GNU extension).
IOW, our scripts' use of grep is very 80'sh ;-)
I do not mind using things that are available in POSIX BRE, but
let's not rely on GNU extension that may cause issues to other
people.
Other things I noticed while looking at "t/*.sh":
* t/t3600-rm.sh and t/5401-update-hooks.sh have unnecessary
uses of egrep that can instead be grep;
* t/t3800-mktag.sh uses egrep but I think it can be grep; also,
I think the use of temporary file expect.pat is unnecessary.
* t/t5510-fetch.sh does use '^[0-9a-f]\{40\} '.
* t/t7001-mv.sh uses -E only to use '.+' when it can just as
easily say '..*' instead.
* t/t7600-merge.sh has two occurrences of (GNU extended) " \+"
that should be " *" for portability. An alternative is to
use grep -E and say " +" instead, but then the other plus
sign on the same line needs to be quoted.
Other than the one in 5510 I consider them log hanging fruits
for janitors.
^ permalink raw reply [relevance 4%]
* What's in git.git (stable frozen)
@ 2008-01-05 10:46 3% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-01-05 10:46 UTC (permalink / raw)
To: git; +Cc: Tsugikazu Shibata, Marco Costalba, Jeff King, Dan McGee,
Dmitry Potapov
We are not at -rc3 yet, but we will be soon. What we have
accumulated in 'master' are mostly fixes, and the official
git-gui 0.9.1 is also included tonight.
I have to apologize that tonight I got a bit carried away
enjoying arguing for the sake of arguing. Some patches that
might be worthy even though they are late in the cycle are not
in tonight's 'master', mostly because I have to sleep on them,
and partly because I am running out of time tonight.
* Tsugikazu Shibata's git-diff hunk header change.
I have a counterproposal that I think is more in line with
the other parts of the system. As the kernel project has
ja_JP, ko_KR and zh_CN directories under Documentation these
days, the issue this patch addresses is already real, and we
would want to have a solution in 1.5.4, even though the topic
was raised too late in the cycle. I think my first two
patches could be a good starting point for that. I'd exclude
the last patch in the series that acts on gitattributes for
now.
* Marco's git-stash changes to output to stdout.
I'd probably apply this, with a slightly toned down commit
log message. Marco says some practice is standard, I
disagreed, but that is not a reason to say "this practice is
nonstandard and bad". Simply saying "some do this and it is
better to be helpful to them because there is no strong
reason not to" would be good enough.
* Jeff's git-add--interactive change to always honor color.diff
regardless of color.interactive.
I'd probably apply this, along with the patch to redefine
what color.interactive means. "git am -i" could also learn
to use colors in the future.
Incidentally I noticed that many of the color.diff.* palette
options are read by "git-add -i" but never used by the
script. We might want to fix this while we are at it.
* Dan McGee's workaround to breakage caused by changes in
AsciiDoc 8.2.3.
I have to do my usual "before-and-after comparison" with
copies of AsciiDoc versions that should not be affected by
the breakage, which I did not have time to do so far. But
this is probably a must-have before the release.
* My patch to error out "git stash clear foobar".
This should be applied; it is a good safety measure
regardless of where that "git stash drop" thing would go.
An issue worth addressing before the release is still in limbo.
* Dmitry's git-filter-branch fix to disambiguate the refs being
rewritten.
Addition of "git-rev-parse --symbolic-full" may solve this
more cleanly than the patches in the discussion, but we
haven't reached the conclusion of this thread yet.
Anything I missed?
----------------------------------------------------------------
* The 'master' branch has these since the last announcement.
Alex Riesen (1):
Allow selection of different cleanup modes for commit messages
Arjen Laarhoven (1):
Fix "git log --diff-filter" bug
Bernt Hansen (1):
git-gui: Make commit log messages end with a newline
Eric Wong (2):
git-svn: allow dcommit --no-rebase to commit multiple, dependent changes
git-svn: unlink index files that were globbed, too
Grégoire Barbier (1):
Fix double-free() in http-push.c:remote_exists()
Gustaf Hendeby (2):
shortlog manpage documentation: work around asciidoc markup issues
Documentation/user-manual.txt: fix typo
J. Bruce Fields (1):
Documentation: fix remote.<name>.skipDefaultUpdate description
Jeff King (6):
cvsimport: die on cvsps errors
config: handle lack of newline at end of file better
git-reset: refuse to do hard reset in a bare repository
add a "basic" diff config callback
diff: load funcname patterns in "basic" config
diff: remove lazy config loading
Jim Meyering (2):
Fix grammar nits in documentation and in code comments.
Don't access line[-1] for a zero-length "line" from fgets.
Johannes Schindelin (1):
Optimize prefixcmp()
Johannes Sixt (1):
git-gui: Move frequently used commands to the top of the context menu.
Junio C Hamano (20):
t7005: do not exit inside test.
builtin-commit: fix amending of the initial commit
builtin-commit: avoid double-negation in the code.
Fix documentation of --first-parent in git-log and copy it to
git-rev-list
combine-diff: Fix path quoting
Fix rewrite_diff() name quoting.
contrib: resurrect scripted git-revert.
GIT 1.5.4-rc2
Documentation/git-submodule.txt: typofix
"git pull --tags": error out with a better message.
git-rebase -i behaves better on commits with incomplete messages
git-rebase -i: clean-up error check codepath.
lock_any_ref_for_update(): reject wildcard return from check_ref_format
Update callers of check_ref_format()
Uninline prefixcmp()
git-clean: make "Would remove ..." path relative to cwd again
t/t7600: avoid GNUism in grep
t/t{3600,3800,5401}: do not use egrep when grep would do
t/t3800: do not use a temporary file to hold expected result.
Update draft release notes for 1.5.4
Marco Costalba (1):
Document git-reset defaults to HEAD if no commit is given
Mark Levedahl (1):
git-gui: Unconditionally use absolute paths with Cygwin
Martin Koegler (2):
receive-pack: check object type of sha1 before using them as commits
receive-pack: reject invalid refnames
Michael Stefaniuc (1):
git-am: Run git gc only once and not for every patch.
Miklos Vajna (2):
git-sh-setup: document git_editor() and get_author_ident_from_commit()
t/t7001: avoid unnecessary ERE when using grep
Peter Karlsson (1):
Added Swedish translation.
René Scharfe (1):
Make "--pretty=format" parser a bit more careful.
Shawn O. Pearce (2):
git-gui: Handle file mode changes (644->755) in diff viewer
Improve error messages when int/long cannot be parsed from config
^ permalink raw reply [relevance 3%]
* [ANNOUNCE] GIT 1.5.4-rc3
@ 2008-01-12 7:11 2% Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2008-01-12 7:11 UTC (permalink / raw)
To: git; +Cc: linux-kernel
The third rc for the next feature release GIT 1.5.4 is available
at the usual places:
http://www.kernel.org/pub/software/scm/git/
git-1.5.4.rc3.tar.{gz,bz2} (tarball)
git-htmldocs-1.5.4.rc3.tar.{gz,bz2} (preformatted docs)
git-manpages-1.5.4.rc3.tar.{gz,bz2} (preformatted docs)
testing/git-*-1.5.4.rc3-1.$arch.rpm (RPM)
Sorry, this is a few days late than I promised. Partly due to
day-job pressure, partly because I am not familiar with RPM spec
file and ended up failing to get the spec file into a reasonable
shape after gitk i18n merge more than twice, and partly because
I involved myself to discussion on the list I should not have
been deeply involved in during the rc freeze.
In any case, we managed to keep the changes only to fixes (both
code and documentation) this round, aside from the promised gitk
i18n enhancements. This should be pretty much the same as what
we will have in final, hopefully due by the end of the month.
Please give it a good beating. Especially if you care about the
final RPM, and you are familiar with RPM generation, I would
appreciate extra set of eyeballs to see if dependencies and
other metainformation is set up correctly, as I do not think
many people have tested it.
----------------------------------------------------------------
Changes since v1.5.4-rc2 are as follows:
Alexandre Julliard (6):
git.el: Support for getting diffs from inside the log-edit buffer.
git.el: Retrieve the permissions for up-to-date files.
git.el: Display file types and type changes.
git.el: Make sure we never insert the same file twice.
git.el: Refresh files from their real state upon commit.
git.el: Make status refresh faster.
Bernt Hansen (1):
git-gui: Make commit log messages end with a newline
Brandon Casey (1):
git-relink.txt: describe more clearly how hard linking occurs
Charles Bailey (1):
gitk: Fix the Makefile to cope with systems lacking msgfmt
Christian Couder (1):
Documentation: config: add 'help.*' and 'instaweb.*' variables.
Christian Stimming (10):
gitk i18n: Add Makefile with rules for po file creation and installation
gitk i18n: Import msgcat for message string translation; load translation catalogs
gitk i18n: Markup several strings for translation
gitk i18n: Initial German translation
gitk i18n: More markup -- various options menus
gitk i18n: Recode gitk from latin1 to utf8 so that the (c) copyright character is valid utf8.
gitk: Update and fix Makefile
gitk: Update German translation
gitk: Fix typo in user message.
gitk: Update German translation.
Dan McGee (1):
Documentation: rename gitlink macro to linkgit
Eric Wong (4):
git-svn: allow dcommit --no-rebase to commit multiple, dependent changes
git-svn: unlink index files that were globbed, too
git-svn: support for funky branch and project names over HTTP(S)
git-svn: clarify the "Ignoring error from SVN" piece
Florian La Roche (1):
Change git-gc documentation to reflect gc.packrefs implementation.
Gerrit Pape (1):
gitk: use user-configured background in view definition dialog
Grégoire Barbier (1):
Fix double-free() in http-push.c:remote_exists()
Gustaf Hendeby (1):
Documentation/user-manual.txt: fix typo
J. Bruce Fields (1):
Documentation: fix remote.<name>.skipDefaultUpdate description
James Bowes (1):
Make the git metapackage require the same version of the subpackages.
Jeff King (8):
config: handle lack of newline at end of file better
git-reset: refuse to do hard reset in a bare repository
add a "basic" diff config callback
diff: load funcname patterns in "basic" config
diff: remove lazy config loading
add--interactive: remove unused diff colors
add--interactive: allow diff colors without interactive colors
Document the color.interactive semantics
Jim Meyering (3):
Fix grammar nits in documentation and in code comments.
Don't access line[-1] for a zero-length "line" from fgets.
bundle, fast-import: detect write failure
Johannes Schindelin (2):
Optimize prefixcmp()
shortlog: mention the "-e" option in the usage
Johannes Sixt (2):
git-gui: Move frequently used commands to the top of the context menu.
recv_sideband: Do not use ANSI escape sequence on dumb terminals.
Junio C Hamano (27):
Documentation/git-submodule.txt: typofix
"git pull --tags": error out with a better message.
git-rebase -i behaves better on commits with incomplete messages
git-rebase -i: clean-up error check codepath.
lock_any_ref_for_update(): reject wildcard return from check_ref_format
Update callers of check_ref_format()
Uninline prefixcmp()
git-clean: make "Would remove ..." path relative to cwd again
t/t7600: avoid GNUism in grep
t/t{3600,3800,5401}: do not use egrep when grep would do
t/t3800: do not use a temporary file to hold expected result.
Update draft release notes for 1.5.4
git-stash clear: refuse to work with extra parameter for now
git-rev-parse --symbolic-full-name
filter-branch: work correctly with ambiguous refnames
custom pretty format: tolerate empty e-mail address
Documentation: remove gitman.info with "make clean"
Documentation: fix "gitlink::foobar[s]"
utf8: pick_one_utf8_char()
utf8_width(): allow non NUL-terminated input
diff: do not chomp hunk-header in the middle of a character
Update draft release notes for 1.5.4
GIT 1.5.3.8
"git-apply --check" should not report "fixed"
pack-objects: remove redundant and wrong call to deflateEnd()
RPM spec: include gitk message files.
GIT 1.5.4-rc3
Kevin Ballard (1):
Trim leading / off of paths in git-svn prop_walk
Marco Costalba (2):
Document git-reset defaults to HEAD if no commit is given
git-stash: use stdout instead of stderr for non error messages
Mark Levedahl (2):
git-gui: Unconditionally use absolute paths with Cygwin
Documentation/Makefile - honor $DESTDIR for quick-install target
Martin Koegler (4):
receive-pack: check object type of sha1 before using them as commits
receive-pack: reject invalid refnames
parse_tag_buffer: don't parse invalid tags
tree-walk: don't parse incorrect entries
Michael Stefaniuc (1):
git-am: Run git gc only once and not for every patch.
Michele Ballabio (1):
Document some default values in config.txt
Miklos Vajna (2):
git-sh-setup: document git_editor() and get_author_ident_from_commit()
t/t7001: avoid unnecessary ERE when using grep
Nicolas Pitre (1):
slightly better auto gc message
Paul Mackerras (2):
gitk: Recode de.po to UTF-8
gitk: Restore some widget options whose defaults changed in Tk 8.5
Peter Karlsson (1):
Added Swedish translation.
Ralf Wildenhues (1):
Documentation: typofix
Rogan Dawes (1):
Allow git-mergetool to handle paths with a leading space
Shawn O. Pearce (1):
git-gui: Handle file mode changes (644->755) in diff viewer
^ permalink raw reply [relevance 2%]
* Re: valgrind test script integration
@ 2008-01-12 11:36 4% ` Jeff King
0 siblings, 0 replies; 200+ results
From: Jeff King @ 2008-01-12 11:36 UTC (permalink / raw)
To: git
On Sat, Jan 12, 2008 at 06:10:44AM -0500, Jeff King wrote:
> - We only catch calls to 'git', not 'git-foo' (and in fact for that
> reason this doesn't catch the t7300 bug by itself, since that uses
> git-clean). A follow-on patch will deal with this.
And here it is.
This replaces all usage of "git-foo" with "git foo" in the
test scripts. The replacement was done semi-manually; a
fully automatic replacement won't work because the pattern
"git-" appears in several other contexts (e.g.,
"--git-dir=", ref names, filenames, etc).
Obviously another route would be intercepting git-* calls,
as well, but my impression is that we are ultimately heading
towards a "git foo is the right way" situation, in which
case this cleanup is eventually necessary anyway.
[the original got eaten by the list since the patch is almost 150K;
the diffstat is below, and I am making the patch available at
git://repo.or.cz/git/peff.git master
]
t/t1400-update-ref.sh | 10 +-
t/t2005-checkout-index-symlinks.sh | 4 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2102-update-index-symlinks.sh | 2 +-
t/t2200-add-update.sh | 12 +-
t/t3020-ls-files-error-unmatch.sh | 2 +-
t/t3030-merge-recursive.sh | 14 +-
t/t3200-branch.sh | 16 +-
t/t3210-pack-refs.sh | 4 +-
t/t3400-rebase.sh | 6 +-
t/t3401-rebase-partial.sh | 20 +-
t/t3500-cherry.sh | 12 +-
t/t3600-rm.sh | 4 +-
t/t3800-mktag.sh | 8 +-
t/t3900-i18n-commit.sh | 6 +-
t/t3901-i18n-patch.sh | 16 +-
t/t4012-diff-binary.sh | 2 +-
t/t4103-apply-binary.sh | 26 ++--
t/t5300-pack-object.sh | 14 +-
t/t5301-sliding-window.sh | 4 +-
t/t5302-pack-index.sh | 10 +-
t/t5400-send-pack.sh | 30 ++--
t/t5401-update-hooks.sh | 4 +-
t/t5402-post-merge-hook.sh | 4 +-
t/t5403-post-checkout-hook.sh | 4 +-
t/t5500-fetch-pack.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5530-upload-pack-error.sh | 4 +-
t/t5600-clone-fail-cleanup.sh | 6 +-
t/t6006-rev-list-format.sh | 6 +-
t/t6025-merge-symlinks.sh | 32 ++--
t/t6026-merge-attr.sh | 12 +-
t/t6030-bisect-porcelain.sh | 2 +-
t/t6120-describe.sh | 30 ++--
t/t6300-for-each-ref.sh | 28 ++--
t/t7001-mv.sh | 12 +-
t/t7003-filter-branch.sh | 18 +-
t/t7004-tag.sh | 316 ++++++++++++++++----------------
t/t7101-reset.sh | 6 +-
t/t7300-clean.sh | 38 ++--
t/t7400-submodule-basic.sh | 46 +++---
t/t7501-commit.sh | 44 +++---
t/t9100-git-svn-basic.sh | 44 +++---
t/t9101-git-svn-props.sh | 62 +++---
t/t9102-git-svn-deep-rmdir.sh | 6 +-
t/t9104-git-svn-follow-parent.sh | 36 ++--
t/t9105-git-svn-commit-diff.sh | 8 +-
t/t9106-git-svn-commit-diff-clobber.sh | 12 +-
t/t9107-git-svn-migrate.sh | 16 +-
t/t9108-git-svn-glob.sh | 4 +-
t/t9110-git-svn-use-svm-props.sh | 8 +-
t/t9111-git-svn-use-svnsync-props.sh | 8 +-
t/t9112-git-svn-md5less-file.sh | 4 +-
t/t9116-git-svn-log.sh | 4 +-
t/t9119-git-svn-info.sh | 120 ++++++------
t/t9200-git-cvsexportcommit.sh | 10 +-
t/t9300-fast-import.sh | 64 ++++----
t/t9400-git-cvsserver-server.sh | 30 ++--
58 files changed, 640 insertions(+), 640 deletions(-)
^ permalink raw reply [relevance 4%]
* [RFH/PATCH] prefix_path(): disallow absolute paths
@ 2008-01-28 12:33 4% ` Johannes Schindelin
2008-01-29 1:23 0% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Johannes Schindelin @ 2008-01-28 12:33 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Junio C Hamano, Shawn Bohrer, git
Without this fix, "git ls-files --others /" would list _all_ files,
except for those tracked in the current repository. Worse, "git clean /"
would start removing them.
Noticed by Johannes Sixt.
Incidentally, it fixes some strange code in builtin-mv.c by yours truly,
where a slash was added to "dst" but then ignored, and instead taken from
the source path. This triggered the new check for absolute paths.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
On Mon, 28 Jan 2008, Johannes Sixt wrote:
> Junio C Hamano schrieb:
> > Johannes Sixt <j.sixt@viscovery.net> writes:
> >
> >> The "problem" is not only with git-clean, but also in others,
> >> like git-ls-files. Try this in you favorite repository:
> >>
> >> $ git ls-files -o /*bin
> >>
> >> The output does not make a lot of sense. (Here it lists the
> >> contents of /bin and /sbin.) Not that it hurts with ls-files,
> >> but
> >>
> >> $ git clean -f /
> >>
> >> is basically a synonym for
> >>
> >> $ rm -rf /
> >
> > Yeah, /*bin is not inside the repository so it should not even
> > be reported as "others". Shouldn't the commands detect this
> > and reject feeding such paths outside the work tree to the
> > core, which always expect you to talk about paths inside?
>
> That's what I had expected. But look:
>
> $ git ls-files -o /
> [... tons of file names ...]
>
> $ git ls-files -o ..
> fatal: '..' is outside repository
>
> $ git clean -n / # with Shawn's patch
> Would remove /bin/
> [... etc ...]
>
> $ git clean -n ..
> fatal: '..' is outside repository
>
> Some mechanism for this is already there; it's just not complete
> enough.
This patch cannot be applied as-is: t3101 is failing (t7001 is
fixed by the builtin-mv.c part).
The failure of t3101 has something to do with ls-tree filtering
out invalid paths; I maintain that this behaviour is wrong to
begin with.
So the help I am requesting is this: so late in the game for 1.5.4
I would hate to introduce a change in prefix_path(), because it
affects apparently too much. However, the "git clean /" bug is a
real one, and should at least be prevented. What to do?
builtin-mv.c | 4 ++--
setup.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 990e213..94f6dd2 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -164,7 +164,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
}
dst = add_slash(dst);
- dst_len = strlen(dst) - 1;
+ dst_len = strlen(dst);
for (j = 0; j < last - first; j++) {
const char *path =
@@ -172,7 +172,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source[argc + j] = path;
destination[argc + j] =
prefix_path(dst, dst_len,
- path + length);
+ path + length + 1);
modes[argc + j] = INDEX;
}
argc += last - first;
diff --git a/setup.c b/setup.c
index 2174e78..5a4aadc 100644
--- a/setup.c
+++ b/setup.c
@@ -13,6 +13,8 @@ const char *get_current_prefix()
const char *prefix_path(const char *prefix, int len, const char *path)
{
const char *orig = path;
+ if (is_absolute_path(path))
+ die("no absolute paths allowed: '%s'", path);
for (;;) {
char c;
if (*path != '.')
--
1.5.4.rc5.15.g8231f
^ permalink raw reply related [relevance 4%]
* Re: [RFH/PATCH] prefix_path(): disallow absolute paths
2008-01-28 12:33 4% ` [RFH/PATCH] prefix_path(): disallow absolute paths Johannes Schindelin
@ 2008-01-29 1:23 0% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-01-29 1:23 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Johannes Sixt, Shawn Bohrer, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Without this fix, "git ls-files --others /" would list _all_ files,
> except for those tracked in the current repository. Worse, "git clean /"
> would start removing them.
> ...
> This patch cannot be applied as-is: t3101 is failing (t7001 is
> fixed by the builtin-mv.c part).
>
> The failure of t3101 has something to do with ls-tree filtering
> out invalid paths; I maintain that this behaviour is wrong to
> begin with.
>
> So the help I am requesting is this: so late in the game for 1.5.4
> I would hate to introduce a change in prefix_path(), because it
> affects apparently too much. However, the "git clean /" bug is a
> real one, and should at least be prevented. What to do?
> ...
> diff --git a/setup.c b/setup.c
> index 2174e78..5a4aadc 100644
> --- a/setup.c
> +++ b/setup.c
> @@ -13,6 +13,8 @@ const char *get_current_prefix()
> const char *prefix_path(const char *prefix, int len, const char *path)
> {
> const char *orig = path;
> + if (is_absolute_path(path))
> + die("no absolute paths allowed: '%s'", path);
> for (;;) {
> char c;
> if (*path != '.')
If we are touching the prefix_path(), I think we should try to
make its "ambiguous path rejection" more complete.
Currently, we:
- Remove "." path component (i.e. the directory leading part
specified) from the input;
- Remove ".." path component and strip one level of the prefix;
only from the beginning. So if you give nonsense pathspec from
the command line, you can end up calling prefix_path() with things
like "/README", "/absolute/path/to//repository/tracked/file", and
"fo//o/../o".
And not passing such ambiguous path like "fo//o" to the core
level but sanitizing matters. Then core level can always do
memcmp() with "fo/o" to see they are talking about the same
path.
I suspect that the right approach might be something like the
attached patch. It introduces a version of prefix_path() that
sanitizes path (but not prefix part, which comes from git itself
and hopefully there should not be a need to sanitize it) while
doing the prefixing. It also strips the leading absolute path
to the repository by comparing it with the value of work_tree.
A few things to note.
* Your mv fix is rolled in.
* This allows you to name a in-repository file as `pwd`/file,
or `pwd`//file (iow, double-slash is also sanitized). It may
kill the bird in another thread nearby.
* get_pathspec() drops paths outside of repository, so the
caller may end up getting a smaller number of paths than it
originally gave it. If an existing caller expects the same
number of paths to come back, it needs to be adjusted (I did
not check). We could alternatively die() but I couldn't
decide which one is a better behaviour.
This is not to be applied (especially before auditing the
callers), but to be thought about. Although it passes all the
tests...
builtin-mv.c | 4 +-
setup.c | 152 ++++++++++++++++++++++++++++++++++++++++++----------------
2 files changed, 112 insertions(+), 44 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 990e213..94f6dd2 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -164,7 +164,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
}
dst = add_slash(dst);
- dst_len = strlen(dst) - 1;
+ dst_len = strlen(dst);
for (j = 0; j < last - first; j++) {
const char *path =
@@ -172,7 +172,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source[argc + j] = path;
destination[argc + j] =
prefix_path(dst, dst_len,
- path + length);
+ path + length + 1);
modes[argc + j] = INDEX;
}
argc += last - first;
diff --git a/setup.c b/setup.c
index adede16..fdc6459 100644
--- a/setup.c
+++ b/setup.c
@@ -4,51 +4,114 @@
static int inside_git_dir = -1;
static int inside_work_tree = -1;
-const char *prefix_path(const char *prefix, int len, const char *path)
+static int sanitary_path_copy(char *dst, const char *src)
{
- const char *orig = path;
+ char *dst0 = dst;
+
+ if (*src == '/') {
+ *dst++ = '/';
+ while (*src == '/')
+ src++;
+ }
+
for (;;) {
- char c;
- if (*path != '.')
- break;
- c = path[1];
- /* "." */
- if (!c) {
- path++;
- break;
+ char c = *src;
+
+ /*
+ * A path component that begins with . could be
+ * special:
+ * (1) "." and ends -- ignore and terminate.
+ * (2) "./" -- ignore them, eat slash and continue.
+ * (3) ".." and ends -- strip one and terminate.
+ * (4) "../" -- strip one, eat slash and continue.
+ */
+ if (c == '.') {
+ switch (src[1]) {
+ case '\0':
+ /* (1) */
+ src++;
+ break;
+ case '/':
+ /* (2) */
+ src += 2;
+ while (*src == '/')
+ src++;
+ continue;
+ case '.':
+ switch (src[2]) {
+ case '\0':
+ /* (3) */
+ src += 2;
+ goto up_one;
+ case '/':
+ /* (4) */
+ src += 3;
+ while (*src == '/')
+ src++;
+ goto up_one;
+ }
+ }
}
- /* "./" */
+
+ /* copy up to the next '/', and eat all '/' */
+ while ((c = *src++) != '\0' && c != '/')
+ *dst++ = c;
if (c == '/') {
- path += 2;
- continue;
- }
- if (c != '.')
+ *dst++ = c;
+ while (c == '/')
+ c = *src++;
+ src--;
+ } else if (!c)
break;
- c = path[2];
- if (!c)
- path += 2;
- else if (c == '/')
- path += 3;
- else
- break;
- /* ".." and "../" */
- /* Remove last component of the prefix */
- do {
- if (!len)
- die("'%s' is outside repository", orig);
- len--;
- } while (len && prefix[len-1] != '/');
continue;
+
+ up_one:
+ /*
+ * dst0..dst is prefix portion, and dst[-1] is '/';
+ * go up one level.
+ */
+ dst -= 2; /* go past trailing '/' if any */
+ if (dst < dst0)
+ return -1;
+ while (1) {
+ if (dst <= dst0)
+ break;
+ c = *dst--;
+ if (c == '/') {
+ dst += 2;
+ break;
+ }
+ }
}
- if (len) {
- int speclen = strlen(path);
- char *n = xmalloc(speclen + len + 1);
+ *dst = '\0';
+ return 0;
+}
- memcpy(n, prefix, len);
- memcpy(n + len, path, speclen+1);
- path = n;
+const char *prefix_path(const char *prefix, int len, const char *path)
+{
+ const char *orig = path;
+ char *sanitized = xmalloc(len + strlen(path) + 1);
+ if (*orig == '/')
+ strcpy(sanitized, path);
+ else {
+ if (len)
+ memcpy(sanitized, prefix, len);
+ strcpy(sanitized + len, path);
}
- return path;
+ if (sanitary_path_copy(sanitized, sanitized))
+ goto error_out;
+ if (*orig == '/') {
+ const char *work_tree = get_git_work_tree();
+ size_t len = strlen(work_tree);
+ if (strncmp(sanitized, work_tree, len) ||
+ (sanitized[len] != '\0' && sanitized[len] != '/')) {
+ error_out:
+ error("'%s' is outside repository", orig);
+ free(sanitized);
+ return NULL;
+ }
+ }
+ return sanitized;
}
/*
@@ -114,7 +177,7 @@ void verify_non_filename(const char *prefix, const char *arg)
const char **get_pathspec(const char *prefix, const char **pathspec)
{
const char *entry = *pathspec;
- const char **p;
+ const char **src, **dst;
int prefixlen;
if (!prefix && !entry)
@@ -128,12 +191,17 @@ const char **get_pathspec(const char *prefix, const char **pathspec)
}
/* Otherwise we have to re-write the entries.. */
- p = pathspec;
+ src = pathspec;
+ dst = pathspec;
prefixlen = prefix ? strlen(prefix) : 0;
- do {
- *p = prefix_path(prefix, prefixlen, entry);
- } while ((entry = *++p) != NULL);
- return (const char **) pathspec;
+ while (*src) {
+ const char *p = prefix_path(prefix, prefixlen, *src);
+ if (p)
+ *(dst++) = p;
+ src++;
+ }
+ *dst = NULL;
+ return pathspec;
}
/*
^ permalink raw reply related [relevance 0%]
* [PATCH for post 1.5.4] Sane use of test_expect_failure
@ 2008-02-01 9:50 2% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-02-01 9:50 UTC (permalink / raw)
To: git
Originally, test_expect_failure was designed to be the opposite
of test_expect_success, but this was a bad decision. Most tests
run a series of commands that leads to the single command that
needs to be tested, like this:
test_expect_{success,failure} 'test title' '
setup1 &&
setup2 &&
setup3 &&
what is to be tested
'
And expecting a failure exit from the whole sequence misses the
point of writing tests. Your setup$N that are supposed to
succeed may have failed without even reaching what you are
trying to test. The only valid use of test_expect_failure is to
check a trivial single command that is expected to fail, which
is a minority in tests of Porcelain-ish commands.
This large-ish patch rewrites all uses of test_expect_failure to
use test_expect_success and rewrites the condition of what is
tested, like this:
test_expect_success 'test title' '
setup1 &&
setup2 &&
setup3 &&
! this command should fail
'
test_expect_failure is redefined to serve as a reminder that
that test *should* succeed but due to a known breakage in git it
currently does not pass. So if git-foo command should create a
file 'bar' but you discovered a bug that it doesn't, you can
write a test like this:
test_expect_failure 'git-foo should create bar' '
rm -f bar &&
git foo &&
test -f bar
'
This construct acts similar to test_expect_success, but instead
of reporting "ok/FAIL" like test_expect_success does, the
outcome is reported as "FIXED/still broken".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Junio C Hamano <gitster@pobox.com> writes:
> I'd like to make the _first_ patch after 1.5.4 to be a fix-up
> for tests that misuse test_expect_failure. After that, we can
> use test_expect_failure to mark tests that ought to pass but
> don't because of bugs in the commands. That way, people who are
> absolutely bored can grep for test_expect_failure to see what
> existing issues to tackle ;-).
This turned out to be a huge patch. I tried to be careful by
keeping the conversion mostly mechanical, but I am not sure
about some of the git-svn and git-cvsserver tests, some of which
may already have been using test_expect_failure to mark a known
breakage.
Eyeballing by area experts are very much appreciated.
t/README | 14 +--
t/t0000-basic.sh | 30 ++++--
t/t0030-stripspace.sh | 40 ++++----
t/t0040-parse-options.sh | 4 +-
t/t1000-read-tree-m-3way.sh | 161 ++++++++++++++++-------------
t/t1200-tutorial.sh | 8 +-
t/t1300-repo-config.sh | 39 ++++---
t/t1302-repo-version.sh | 5 +-
t/t1400-update-ref.sh | 24 ++--
t/t2000-checkout-cache-clash.sh | 4 +-
t/t2002-checkout-cache-u.sh | 4 +-
t/t2008-checkout-subdir.sh | 16 ++--
t/t2100-update-cache-badpath.sh | 4 +-
t/t3020-ls-files-error-unmatch.sh | 4 +-
t/t3200-branch.sh | 36 ++++---
t/t3210-pack-refs.sh | 26 +++---
t/t3400-rebase.sh | 4 +-
t/t3403-rebase-skip.sh | 6 +-
t/t3600-rm.sh | 17 ++--
t/t4103-apply-binary.sh | 68 +++++++------
t/t4113-apply-ending.sh | 8 +-
t/t5300-pack-object.sh | 4 +-
t/t5302-pack-index.sh | 32 +++---
t/t5401-update-hooks.sh | 8 +-
t/t5402-post-merge-hook.sh | 4 +-
t/t5500-fetch-pack.sh | 4 +-
t/t5510-fetch.sh | 12 +-
t/t5530-upload-pack-error.sh | 14 +--
t/t5600-clone-fail-cleanup.sh | 12 +-
t/t5710-info-alternate.sh | 14 ++-
t/t6023-merge-file.sh | 12 +-
t/t6024-recursive-merge.sh | 2 +-
t/t6025-merge-symlinks.sh | 21 ++--
t/t6101-rev-parse-parents.sh | 2 +-
t/t6300-for-each-ref.sh | 8 +-
t/t7001-mv.sh | 4 +-
t/t7002-grep.sh | 4 +-
t/t7004-tag.sh | 36 +++---
t/t7101-reset.sh | 24 ++--
t/t7501-commit.sh | 40 ++++----
t/t7503-pre-commit-hook.sh | 4 +-
t/t7504-commit-msg-hook.sh | 8 +-
t/t9100-git-svn-basic.sh | 28 +++---
t/t9106-git-svn-commit-diff-clobber.sh | 18 ++--
t/t9106-git-svn-dcommit-clobber-series.sh | 4 +-
t/t9300-fast-import.sh | 24 ++--
t/t9400-git-cvsserver-server.sh | 30 +++--
t/test-lib.sh | 30 +++++-
48 files changed, 498 insertions(+), 427 deletions(-)
diff --git a/t/README b/t/README
index 36f2517..73ed11b 100644
--- a/t/README
+++ b/t/README
@@ -160,14 +160,12 @@ library for your script to use.
- test_expect_failure <message> <script>
- This is the opposite of test_expect_success. If <script>
- yields success, test is considered a failure.
-
- Example:
-
- test_expect_failure \
- 'git-update-index without --add should fail adding.' \
- 'git-update-index should-be-empty'
+ This is NOT the opposite of test_expect_success, but is used
+ to mark a test that demonstrates a known breakage. Unlike
+ the usual test_expect_success tests, which say "ok" on
+ success and "FAIL" on failure, this will say "FIXED" on
+ success and "still broken" on failure. Failures from these
+ tests won't cause -i (immediate) to stop.
- test_debug <script>
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 4e49d59..cd0de50 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -47,12 +47,24 @@ test_expect_success \
'test $(wc -l < full-of-directories) = 3'
################################################################
+# Test harness
+test_expect_success 'success is reported like this' '
+ :
+'
+test_expect_failure 'pretend we have a known breakage' '
+ false
+'
+test_expect_failure 'pretend we have fixed a known breakage' '
+ :
+'
+
+################################################################
# Basics of the basics
# updating a new file without --add should fail.
-test_expect_failure \
- 'git update-index without --add should fail adding.' \
- 'git update-index should-be-empty'
+test_expect_success 'git update-index without --add should fail adding.' '
+ ! git update-index should-be-empty
+'
# and with --add it should succeed, even if it is empty (it used to fail).
test_expect_success \
@@ -70,9 +82,9 @@ test_expect_success \
# Removing paths.
rm -f should-be-empty full-of-directories
-test_expect_failure \
- 'git update-index without --remove should fail removing.' \
- 'git update-index should-be-empty'
+test_expect_success 'git update-index without --remove should fail removing.' '
+ ! git update-index should-be-empty
+'
test_expect_success \
'git update-index with --remove should be able to remove.' \
@@ -204,9 +216,9 @@ test_expect_success \
'put invalid objects into the index.' \
'git update-index --index-info < badobjects'
-test_expect_failure \
- 'writing this tree without --missing-ok.' \
- 'git write-tree'
+test_expect_success 'writing this tree without --missing-ok.' '
+ ! git write-tree
+'
test_expect_success \
'writing this tree with --missing-ok.' \
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
index cad95f3..818c862 100755
--- a/t/t0030-stripspace.sh
+++ b/t/t0030-stripspace.sh
@@ -243,14 +243,14 @@ test_expect_success \
test `printf "$ttt$sss$sss$sss" | git stripspace | wc -l` -gt 0
'
-test_expect_failure \
+test_expect_success \
'text plus spaces without newline at end should not show spaces' '
- printf "$ttt$sss" | git stripspace | grep -q " " ||
- printf "$ttt$ttt$sss" | git stripspace | grep -q " " ||
- printf "$ttt$ttt$ttt$sss" | git stripspace | grep -q " " ||
- printf "$ttt$sss$sss" | git stripspace | grep -q " " ||
- printf "$ttt$ttt$sss$sss" | git stripspace | grep -q " " ||
- printf "$ttt$sss$sss$sss" | git stripspace | grep -q " "
+ ! (printf "$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$sss$sss$sss" | git stripspace | grep -q " ")
'
test_expect_success \
@@ -280,14 +280,14 @@ test_expect_success \
git diff expect actual
'
-test_expect_failure \
+test_expect_success \
'text plus spaces at end should not show spaces' '
- echo "$ttt$sss" | git stripspace | grep -q " " ||
- echo "$ttt$ttt$sss" | git stripspace | grep -q " " ||
- echo "$ttt$ttt$ttt$sss" | git stripspace | grep -q " " ||
- echo "$ttt$sss$sss" | git stripspace | grep -q " " ||
- echo "$ttt$ttt$sss$sss" | git stripspace | grep -q " " ||
- echo "$ttt$sss$sss$sss" | git stripspace | grep -q " "
+ ! (echo "$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$sss$sss$sss" | git stripspace | grep -q " ")
'
test_expect_success \
@@ -339,13 +339,13 @@ test_expect_success \
git diff expect actual
'
-test_expect_failure \
+test_expect_success \
'spaces without newline at end should not show spaces' '
- printf "" | git stripspace | grep -q " " ||
- printf "$sss" | git stripspace | grep -q " " ||
- printf "$sss$sss" | git stripspace | grep -q " " ||
- printf "$sss$sss$sss" | git stripspace | grep -q " " ||
- printf "$sss$sss$sss$sss" | git stripspace | grep -q " "
+ ! (printf "" | git stripspace | grep -q " ") &&
+ ! (printf "$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$sss$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$sss$sss$sss$sss" | git stripspace | grep -q " ")
'
test_expect_success \
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 0a3b55d..2ecc283 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -87,9 +87,9 @@ test_expect_success 'unambiguously abbreviated option with "="' '
git diff expect output
'
-test_expect_failure 'ambiguously abbreviated option' '
+test_expect_success 'ambiguously abbreviated option' '
test-parse-options --strin 123;
- test $? != 129
+ test $? = 129
'
cat > expect << EOF
diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh
index 37add1b..6c065bf 100755
--- a/t/t1000-read-tree-m-3way.sh
+++ b/t/t1000-read-tree-m-3way.sh
@@ -210,12 +210,12 @@ DF (file) when tree B require DF to be a directory by having DF/DF
END_OF_CASE_TABLE
-test_expect_failure \
- '1 - must not have an entry not in A.' \
- "rm -f .git/index XX &&
+test_expect_success '1 - must not have an entry not in A.' "
+ rm -f .git/index XX &&
echo XX >XX &&
git update-index --add XX &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'2 - must match B in !O && !A && B case.' \
@@ -248,13 +248,14 @@ test_expect_success \
echo extra >>AN &&
git read-tree -m $tree_O $tree_A $tree_B"
-test_expect_failure \
- '3 (fail) - must match A in !O && A && !B case.' \
- "rm -f .git/index AN &&
+test_expect_success \
+ '3 (fail) - must match A in !O && A && !B case.' "
+ rm -f .git/index AN &&
cp .orig-A/AN AN &&
echo extra >>AN &&
git update-index --add AN &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'4 - must match and be up-to-date in !O && A && B && A!=B case.' \
@@ -264,21 +265,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' \
- "rm -f .git/index AA &&
+test_expect_success \
+ '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' "
+ rm -f .git/index AA &&
cp .orig-A/AA AA &&
git update-index --add AA &&
echo extra >>AA &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' \
- "rm -f .git/index AA &&
+test_expect_success \
+ '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' "
+ rm -f .git/index AA &&
cp .orig-A/AA AA &&
echo extra >>AA &&
git update-index --add AA &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'5 - must match in !O && A && B && A==B case.' \
@@ -297,34 +300,38 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '5 (fail) - must match A in !O && A && B && A==B case.' \
- "rm -f .git/index LL &&
+test_expect_success \
+ '5 (fail) - must match A in !O && A && B && A==B case.' "
+ rm -f .git/index LL &&
cp .orig-A/LL LL &&
echo extra >>LL &&
git update-index --add LL &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '6 - must not exist in O && !A && !B case' \
- "rm -f .git/index DD &&
+test_expect_success \
+ '6 - must not exist in O && !A && !B case' "
+ rm -f .git/index DD &&
echo DD >DD
git update-index --add DD &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '7 - must not exist in O && !A && B && O!=B case' \
- "rm -f .git/index DM &&
+test_expect_success \
+ '7 - must not exist in O && !A && B && O!=B case' "
+ rm -f .git/index DM &&
cp .orig-B/DM DM &&
git update-index --add DM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '8 - must not exist in O && !A && B && O==B case' \
- "rm -f .git/index DN &&
+test_expect_success \
+ '8 - must not exist in O && !A && B && O==B case' "
+ rm -f .git/index DN &&
cp .orig-B/DN DN &&
git update-index --add DN &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'9 - must match and be up-to-date in O && A && !B && O!=A case' \
@@ -334,21 +341,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' \
- "rm -f .git/index MD &&
+test_expect_success \
+ '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' "
+ rm -f .git/index MD &&
cp .orig-A/MD MD &&
git update-index --add MD &&
echo extra >>MD &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' \
- "rm -f .git/index MD &&
+test_expect_success \
+ '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' "
+ rm -f .git/index MD &&
cp .orig-A/MD MD &&
echo extra >>MD &&
git update-index --add MD &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'10 - must match and be up-to-date in O && A && !B && O==A case' \
@@ -358,21 +367,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' \
- "rm -f .git/index ND &&
+test_expect_success \
+ '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' "
+ rm -f .git/index ND &&
cp .orig-A/ND ND &&
git update-index --add ND &&
echo extra >>ND &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' \
- "rm -f .git/index ND &&
+test_expect_success \
+ '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' "
+ rm -f .git/index ND &&
cp .orig-A/ND ND &&
echo extra >>ND &&
git update-index --add ND &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'11 - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
@@ -382,21 +393,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
- "rm -f .git/index MM &&
+test_expect_success \
+ '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' "
+ rm -f .git/index MM &&
cp .orig-A/MM MM &&
git update-index --add MM &&
echo extra >>MM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
- "rm -f .git/index MM &&
+test_expect_success \
+ '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' "
+ rm -f .git/index MM &&
cp .orig-A/MM MM &&
echo extra >>MM &&
git update-index --add MM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'12 - must match A in O && A && B && O!=A && A==B case' \
@@ -415,13 +428,14 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '12 (fail) - must match A in O && A && B && O!=A && A==B case' \
- "rm -f .git/index SS &&
+test_expect_success \
+ '12 (fail) - must match A in O && A && B && O!=A && A==B case' "
+ rm -f .git/index SS &&
cp .orig-A/SS SS &&
echo extra >>SS &&
git update-index --add SS &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'13 - must match A in O && A && B && O!=A && O==B case' \
@@ -457,21 +471,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' \
- "rm -f .git/index NM &&
+test_expect_success \
+ '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' "
+ rm -f .git/index NM &&
cp .orig-A/NM NM &&
git update-index --add NM &&
echo extra >>NM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' \
- "rm -f .git/index NM &&
+test_expect_success \
+ '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' "
+ rm -f .git/index NM &&
cp .orig-A/NM NM &&
echo extra >>NM &&
git update-index --add NM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'15 - must match A in O && A && B && O==A && O==B case' \
@@ -490,13 +506,14 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '15 (fail) - must match A in O && A && B && O==A && O==B case' \
- "rm -f .git/index NN &&
+test_expect_success \
+ '15 (fail) - must match A in O && A && B && O==A && O==B case' "
+ rm -f .git/index NN &&
cp .orig-A/NN NN &&
echo extra >>NN &&
git update-index --add NN &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
# #16
test_expect_success \
diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
index 991d3c5..dcb3108 100755
--- a/t/t1200-tutorial.sh
+++ b/t/t1200-tutorial.sh
@@ -101,8 +101,8 @@ echo "Play, play, play" >>hello
echo "Lots of fun" >>example
git commit -m 'Some fun.' -i hello example
-test_expect_failure 'git resolve now fails' '
- git merge -m "Merge work in mybranch" mybranch
+test_expect_success 'git resolve now fails' '
+ ! git merge -m "Merge work in mybranch" mybranch
'
cat > hello << EOF
@@ -156,6 +156,8 @@ test_expect_success 'git show-branch' 'cmp show-branch2.expect show-branch2.outp
test_expect_success 'git repack' 'git repack'
test_expect_success 'git prune-packed' 'git prune-packed'
-test_expect_failure '-> only packed objects' 'find -type f .git/objects/[0-9a-f][0-9a-f]'
+test_expect_success '-> only packed objects' '
+ ! find -type f .git/objects/[0-9a-f][0-9a-f]
+'
test_done
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 42eac2a..a786c5c 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -181,8 +181,9 @@ test_expect_success 'non-match' \
test_expect_success 'non-match value' \
'test wow = $(git config --get nextsection.nonewline !for)'
-test_expect_failure 'ambiguous get' \
- 'git config --get nextsection.nonewline'
+test_expect_success 'ambiguous get' '
+ ! git config --get nextsection.nonewline
+'
test_expect_success 'get multivar' \
'git config --get-all nextsection.nonewline'
@@ -202,13 +203,17 @@ EOF
test_expect_success 'multivar replace' 'cmp .git/config expect'
-test_expect_failure 'ambiguous value' 'git config nextsection.nonewline'
+test_expect_success 'ambiguous value' '
+ ! git config nextsection.nonewline
+'
-test_expect_failure 'ambiguous unset' \
- 'git config --unset nextsection.nonewline'
+test_expect_success 'ambiguous unset' '
+ ! git config --unset nextsection.nonewline
+'
-test_expect_failure 'invalid unset' \
- 'git config --unset somesection.nonewline'
+test_expect_success 'invalid unset' '
+ ! git config --unset somesection.nonewline
+'
git config --unset nextsection.nonewline "wow3$"
@@ -224,7 +229,7 @@ EOF
test_expect_success 'multivar unset' 'cmp .git/config expect'
-test_expect_failure 'invalid key' 'git config inval.2key blabla'
+test_expect_success 'invalid key' '! git config inval.2key blabla'
test_expect_success 'correct key' 'git config 123456.a123 987'
@@ -382,8 +387,9 @@ EOF
test_expect_success "rename succeeded" "git diff expect .git/config"
-test_expect_failure "rename non-existing section" \
- 'git config --rename-section branch."world domination" branch.drei'
+test_expect_success "rename non-existing section" '
+ ! git config --rename-section branch."world domination" branch.drei
+'
test_expect_success "rename succeeded" "git diff expect .git/config"
@@ -494,14 +500,14 @@ test_expect_success bool '
done &&
cmp expect result'
-test_expect_failure 'invalid bool (--get)' '
+test_expect_success 'invalid bool (--get)' '
git config bool.nobool foobar &&
- git config --bool --get bool.nobool'
+ ! git config --bool --get bool.nobool'
-test_expect_failure 'invalid bool (set)' '
+test_expect_success 'invalid bool (set)' '
- git config --bool bool.nobool foobar'
+ ! git config --bool bool.nobool foobar'
rm .git/config
@@ -562,8 +568,9 @@ EOF
test_expect_success 'quoting' 'cmp .git/config expect'
-test_expect_failure 'key with newline' 'git config key.with\\\
-newline 123'
+test_expect_success 'key with newline' '
+ ! git config "key.with
+newline" 123'
test_expect_success 'value with newline' 'git config key.sub value.with\\\
newline'
diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh
index 37fc1c8..9be0770 100755
--- a/t/t1302-repo-version.sh
+++ b/t/t1302-repo-version.sh
@@ -40,7 +40,8 @@ test_expect_success 'gitdir required mode on normal repos' '
(git apply --check --index test.patch &&
cd test && git apply --check --index ../test.patch)'
-test_expect_failure 'gitdir required mode on unsupported repo' '
- (cd test2 && git apply --check --index ../test.patch)'
+test_expect_success 'gitdir required mode on unsupported repo' '
+ (cd test2 && ! git apply --check --index ../test.patch)
+'
test_done
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 71ab2dd..78cd412 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -51,23 +51,23 @@ test_expect_success \
test $B"' = $(cat .git/'"$m"')'
rm -f .git/$m
-test_expect_failure \
- '(not) create HEAD with old sha1' \
- "git update-ref HEAD $A $B"
-test_expect_failure \
- "(not) prior created .git/$m" \
- "test -f .git/$m"
+test_expect_success '(not) create HEAD with old sha1' "
+ ! git update-ref HEAD $A $B
+"
+test_expect_success "(not) prior created .git/$m" "
+ ! test -f .git/$m
+"
rm -f .git/$m
test_expect_success \
"create HEAD" \
"git update-ref HEAD $A"
-test_expect_failure \
- '(not) change HEAD with wrong SHA1' \
- "git update-ref HEAD $B $Z"
-test_expect_failure \
- "(not) changed .git/$m" \
- "test $B"' = $(cat .git/'"$m"')'
+test_expect_success '(not) change HEAD with wrong SHA1' "
+ ! git update-ref HEAD $B $Z
+"
+test_expect_success "(not) changed .git/$m" "
+ ! test $B"' = $(cat .git/'"$m"')
+'
rm -f .git/$m
: a repository with working tree always has reflog these days...
diff --git a/t/t2000-checkout-cache-clash.sh b/t/t2000-checkout-cache-clash.sh
index ac84335..5141fab 100755
--- a/t/t2000-checkout-cache-clash.sh
+++ b/t/t2000-checkout-cache-clash.sh
@@ -36,9 +36,9 @@ mkdir path0
date >path0/file0
date >path1
-test_expect_failure \
+test_expect_success \
'git checkout-index without -f should fail on conflicting work tree.' \
- 'git checkout-index -a'
+ '! git checkout-index -a'
test_expect_success \
'git checkout-index with -f should succeed.' \
diff --git a/t/t2002-checkout-cache-u.sh b/t/t2002-checkout-cache-u.sh
index f7a0055..0f441bc 100755
--- a/t/t2002-checkout-cache-u.sh
+++ b/t/t2002-checkout-cache-u.sh
@@ -16,12 +16,12 @@ echo frotz >path0 &&
git update-index --add path0 &&
t=$(git write-tree)'
-test_expect_failure \
+test_expect_success \
'without -u, git checkout-index smudges stat information.' '
rm -f path0 &&
git read-tree $t &&
git checkout-index -f -a &&
-git diff-files | diff - /dev/null'
+! git diff-files | diff - /dev/null'
test_expect_success \
'with -u, git checkout-index picks up stat information from new files.' '
diff --git a/t/t2008-checkout-subdir.sh b/t/t2008-checkout-subdir.sh
index f78945e..4a723dc 100755
--- a/t/t2008-checkout-subdir.sh
+++ b/t/t2008-checkout-subdir.sh
@@ -67,16 +67,16 @@ test_expect_success 'checkout with simple prefix' '
'
-test_expect_failure 'relative path outside tree should fail' \
- 'git checkout HEAD -- ../../Makefile'
+test_expect_success 'relative path outside tree should fail' \
+ '! git checkout HEAD -- ../../Makefile'
-test_expect_failure 'incorrect relative path to file should fail (1)' \
- 'git checkout HEAD -- ../file0'
+test_expect_success 'incorrect relative path to file should fail (1)' \
+ '! git checkout HEAD -- ../file0'
-test_expect_failure 'incorrect relative path should fail (2)' \
- '( cd dir1 && git checkout HEAD -- ./file0 )'
+test_expect_success 'incorrect relative path should fail (2)' \
+ '( cd dir1 && ! git checkout HEAD -- ./file0 )'
-test_expect_failure 'incorrect relative path should fail (3)' \
- '( cd dir1 && git checkout HEAD -- ../../file0 )'
+test_expect_success 'incorrect relative path should fail (3)' \
+ '( cd dir1 && ! git checkout HEAD -- ../../file0 )'
test_done
diff --git a/t/t2100-update-cache-badpath.sh b/t/t2100-update-cache-badpath.sh
index 04a1ed1..9beaecd 100755
--- a/t/t2100-update-cache-badpath.sh
+++ b/t/t2100-update-cache-badpath.sh
@@ -44,8 +44,8 @@ date >path1/file1
for p in path0/file0 path1/file1 path2 path3
do
- test_expect_failure \
+ test_expect_success \
"git update-index to add conflicting path $p should fail." \
- "git update-index --add -- $p"
+ "! git update-index --add -- $p"
done
test_done
diff --git a/t/t3020-ls-files-error-unmatch.sh b/t/t3020-ls-files-error-unmatch.sh
index c83f820..f4da869 100755
--- a/t/t3020-ls-files-error-unmatch.sh
+++ b/t/t3020-ls-files-error-unmatch.sh
@@ -15,9 +15,9 @@ touch foo bar
git update-index --add foo bar
git-commit -m "add foo bar"
-test_expect_failure \
+test_expect_success \
'git ls-files --error-unmatch should fail with unmatched path.' \
- 'git ls-files --error-unmatch foo bar-does-not-match'
+ '! git ls-files --error-unmatch foo bar-does-not-match'
test_expect_success \
'git ls-files --error-unmatch should succeed eith matched paths.' \
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index ef1eeb7..fe353ff 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -17,10 +17,11 @@ test_expect_success \
git-commit -m "Initial commit." &&
HEAD=$(git rev-parse --verify HEAD)'
-test_expect_failure \
- 'git branch --help should not have created a bogus branch' \
- 'git branch --help </dev/null >/dev/null 2>/dev/null || :
- test -f .git/refs/heads/--help'
+test_expect_success \
+ 'git branch --help should not have created a bogus branch' '
+ git branch --help </dev/null >/dev/null 2>/dev/null;
+ ! test -f .git/refs/heads/--help
+'
test_expect_success \
'git branch abc should create a branch' \
@@ -71,17 +72,17 @@ test_expect_success \
git branch -m n/n n
test -f .git/logs/refs/heads/n'
-test_expect_failure \
- 'git branch -m o/o o should fail when o/p exists' \
- 'git branch o/o &&
+test_expect_success 'git branch -m o/o o should fail when o/p exists' '
+ git branch o/o &&
git branch o/p &&
- git branch -m o/o o'
+ ! git branch -m o/o o
+'
-test_expect_failure \
- 'git branch -m q r/q should fail when r exists' \
- 'git branch q &&
- git branch r &&
- git branch -m q r/q'
+test_expect_success 'git branch -m q r/q should fail when r exists' '
+ git branch q &&
+ git branch r &&
+ ! git branch -m q r/q
+'
mv .git/config .git/config-saved
@@ -108,12 +109,13 @@ test_expect_success 'config information was renamed, too' \
"test $(git config branch.s.dummy) = Hello &&
! git config branch.s/s/dummy"
-test_expect_failure \
- 'git branch -m u v should fail when the reflog for u is a symlink' \
- 'git branch -l u &&
+test_expect_success \
+ 'git branch -m u v should fail when the reflog for u is a symlink' '
+ git branch -l u &&
mv .git/logs/refs/heads/u real-u &&
ln -s real-u .git/logs/refs/heads/u &&
- git branch -m u v'
+ ! git branch -m u v
+'
test_expect_success 'test tracking setup via --track' \
'git config remote.local.url . &&
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index 4ddc634..b64ccfb 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -39,12 +39,12 @@ test_expect_success \
git show-ref b >result &&
diff expect result'
-test_expect_failure \
- 'git branch c/d should barf if branch c exists' \
- 'git branch c &&
+test_expect_success 'git branch c/d should barf if branch c exists' '
+ git branch c &&
git pack-refs --all &&
- rm .git/refs/heads/c &&
- git branch c/d'
+ rm -f .git/refs/heads/c &&
+ ! git branch c/d
+'
test_expect_success \
'see if a branch still exists after git pack-refs --prune' \
@@ -54,11 +54,11 @@ test_expect_success \
git show-ref e >result &&
diff expect result'
-test_expect_failure \
- 'see if git pack-refs --prune remove ref files' \
- 'git branch f &&
+test_expect_success 'see if git pack-refs --prune remove ref files' '
+ git branch f &&
git pack-refs --all --prune &&
- ls .git/refs/heads/f'
+ ! test -f .git/refs/heads/f
+'
test_expect_success \
'git branch g should work when git branch g/h has been deleted' \
@@ -69,11 +69,11 @@ test_expect_success \
git pack-refs --all &&
git branch -d g'
-test_expect_failure \
- 'git branch i/j/k should barf if branch i exists' \
- 'git branch i &&
+test_expect_success 'git branch i/j/k should barf if branch i exists' '
+ git branch i &&
git pack-refs --all --prune &&
- git branch i/j/k'
+ ! git branch i/j/k
+'
test_expect_success \
'test git branch k after branch k/l/m and k/lm have been deleted' \
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 95e33b5..496f4ec 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -42,9 +42,9 @@ test_expect_success \
test_expect_success 'rebase against master' '
git rebase master'
-test_expect_failure \
+test_expect_success \
'the rebase operation should not have destroyed author information' \
- 'git log | grep "Author:" | grep "<>"'
+ '! git log | grep "Author:" | grep "<>"'
test_expect_success 'rebase after merge master' '
git reset --hard topic &&
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 657f681..0a26099 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -31,8 +31,8 @@ test_expect_success setup '
git branch skip-merge skip-reference
'
-test_expect_failure 'rebase with git am -3 (default)' '
- git rebase master
+test_expect_success 'rebase with git am -3 (default)' '
+ ! git rebase master
'
test_expect_success 'rebase --skip with am -3' '
@@ -53,7 +53,7 @@ test_expect_success 'rebase moves back to skip-reference' '
test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
-test_expect_failure 'rebase with --merge' 'git rebase --merge master'
+test_expect_success 'rebase with --merge' '! git rebase --merge master'
test_expect_success 'rebase --skip with --merge' '
git rebase --skip
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index b1ee622..f542f0a 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -59,15 +59,16 @@ test_expect_success \
echo "other content" > foo
git rm --cached foo'
-test_expect_failure \
- 'Test that git rm --cached foo fails if the index matches neither the file nor HEAD' \
- 'echo content > foo
+test_expect_success \
+ 'Test that git rm --cached foo fails if the index matches neither the file nor HEAD' '
+ echo content > foo
git add foo
git commit -m foo
echo "other content" > foo
git add foo
echo "yet another content" > foo
- git rm --cached foo'
+ ! git rm --cached foo
+'
test_expect_success \
'Test that git rm --cached -f foo works in case where --cached only did not' \
@@ -106,9 +107,9 @@ embedded'"
if test "$test_failed_remove" = y; then
chmod a-w .
-test_expect_failure \
+test_expect_success \
'Test that "git rm -f" fails if its rm fails' \
- 'git rm -f baz'
+ '! git rm -f baz'
chmod 775 .
else
test_expect_success 'skipping removal failure (perhaps running as root?)' :
@@ -212,8 +213,8 @@ test_expect_success 'Recursive with -r -f' '
! test -d frotz
'
-test_expect_failure 'Remove nonexistent file returns nonzero exit status' '
- git rm nonexistent
+test_expect_success 'Remove nonexistent file returns nonzero exit status' '
+ ! git rm nonexistent
'
test_done
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh
index 74f06ec..7c25634 100755
--- a/t/t4103-apply-binary.sh
+++ b/t/t4103-apply-binary.sh
@@ -46,21 +46,25 @@ test_expect_success 'stat binary diff (copy) -- should not fail.' \
'git-checkout master
git apply --stat --summary C.diff'
-test_expect_failure 'check binary diff -- should fail.' \
- 'git-checkout master
- git apply --check B.diff'
-
-test_expect_failure 'check binary diff (copy) -- should fail.' \
- 'git-checkout master
- git apply --check C.diff'
-
-test_expect_failure 'check incomplete binary diff with replacement -- should fail.' \
- 'git-checkout master
- git apply --check --allow-binary-replacement B.diff'
+test_expect_success 'check binary diff -- should fail.' \
+ 'git-checkout master &&
+ ! git apply --check B.diff'
+
+test_expect_success 'check binary diff (copy) -- should fail.' \
+ 'git-checkout master &&
+ ! git apply --check C.diff'
+
+test_expect_success \
+ 'check incomplete binary diff with replacement -- should fail.' '
+ git-checkout master &&
+ ! git apply --check --allow-binary-replacement B.diff
+'
-test_expect_failure 'check incomplete binary diff with replacement (copy) -- should fail.' \
- 'git-checkout master
- git apply --check --allow-binary-replacement C.diff'
+test_expect_success \
+ 'check incomplete binary diff with replacement (copy) -- should fail.' '
+ git-checkout master &&
+ ! git apply --check --allow-binary-replacement C.diff
+'
test_expect_success 'check binary diff with replacement.' \
'git-checkout master
@@ -73,42 +77,42 @@ test_expect_success 'check binary diff with replacement (copy).' \
# Now we start applying them.
do_reset () {
- rm -f file?
- git-reset --hard
+ rm -f file? &&
+ git-reset --hard &&
git-checkout -f master
}
-test_expect_failure 'apply binary diff -- should fail.' \
- 'do_reset
- git apply B.diff'
+test_expect_success 'apply binary diff -- should fail.' \
+ 'do_reset &&
+ ! git apply B.diff'
-test_expect_failure 'apply binary diff -- should fail.' \
- 'do_reset
- git apply --index B.diff'
+test_expect_success 'apply binary diff -- should fail.' \
+ 'do_reset &&
+ ! git apply --index B.diff'
-test_expect_failure 'apply binary diff (copy) -- should fail.' \
- 'do_reset
- git apply C.diff'
+test_expect_success 'apply binary diff (copy) -- should fail.' \
+ 'do_reset &&
+ ! git apply C.diff'
-test_expect_failure 'apply binary diff (copy) -- should fail.' \
- 'do_reset
- git apply --index C.diff'
+test_expect_success 'apply binary diff (copy) -- should fail.' \
+ 'do_reset &&
+ ! git apply --index C.diff'
test_expect_success 'apply binary diff without replacement.' \
- 'do_reset
+ 'do_reset &&
git apply BF.diff'
test_expect_success 'apply binary diff without replacement (copy).' \
- 'do_reset
+ 'do_reset &&
git apply CF.diff'
test_expect_success 'apply binary diff.' \
- 'do_reset
+ 'do_reset &&
git apply --allow-binary-replacement --index BF.diff &&
test -z "$(git diff --name-status binary)"'
test_expect_success 'apply binary diff (copy).' \
- 'do_reset
+ 'do_reset &&
git apply --allow-binary-replacement --index CF.diff &&
test -z "$(git diff --name-status binary)"'
diff --git a/t/t4113-apply-ending.sh b/t/t4113-apply-ending.sh
index 1c6bec0..d741039 100755
--- a/t/t4113-apply-ending.sh
+++ b/t/t4113-apply-ending.sh
@@ -29,8 +29,8 @@ test_expect_success setup \
# test
-test_expect_failure 'apply at the end' \
- 'git apply --index test-patch'
+test_expect_success 'apply at the end' \
+ '! git apply --index test-patch'
cat >test-patch <<\EOF
diff a/file b/file
@@ -47,7 +47,7 @@ b
c'
git update-index file
-test_expect_failure 'apply at the beginning' \
- 'git apply --index test-patch'
+test_expect_success 'apply at the beginning' \
+ '! git apply --index test-patch'
test_done
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 6e594bf..4f350dd 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -264,8 +264,8 @@ test_expect_success \
cp -f .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \
.git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67'
-test_expect_failure \
+test_expect_success \
'make sure index-pack detects the SHA1 collision' \
- 'git-index-pack -o bad.idx test-3.pack'
+ '! git-index-pack -o bad.idx test-3.pack'
test_done
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index 2a2878b..67b9a7b 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -42,9 +42,9 @@ test_expect_success \
'both packs should be identical' \
'cmp "test-1-${pack1}.pack" "test-2-${pack2}.pack"'
-test_expect_failure \
+test_expect_success \
'index v1 and index v2 should be different' \
- 'cmp "test-1-${pack1}.idx" "test-2-${pack2}.idx"'
+ '! cmp "test-1-${pack1}.idx" "test-2-${pack2}.idx"'
test_expect_success \
'index-pack with index version 1' \
@@ -78,9 +78,9 @@ test_expect_success \
'git verify-pack -v "test-3-${pack3}.pack"'
test "$have_64bits" &&
-test_expect_failure \
+test_expect_success \
'64-bit offsets: should be different from previous index v2 results' \
- 'cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
+ '! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
test "$have_64bits" &&
test_expect_success \
@@ -112,22 +112,22 @@ test_expect_success \
bs=1 count=20 conv=notrunc &&
git cat-file blob "$delta_sha1" > blob_2 )'
-test_expect_failure \
+test_expect_success \
'[index v1] 3) corrupted delta happily returned wrong data' \
- 'cmp blob_1 blob_2'
+ '! cmp blob_1 blob_2'
-test_expect_failure \
+test_expect_success \
'[index v1] 4) confirm that the pack is actually corrupted' \
- 'git fsck --full $commit'
+ '! git fsck --full $commit'
test_expect_success \
'[index v1] 5) pack-objects happily reuses corrupted data' \
'pack4=$(git pack-objects test-4 <obj-list) &&
test -f "test-4-${pack1}.pack"'
-test_expect_failure \
+test_expect_success \
'[index v1] 6) newly created pack is BAD !' \
- 'git verify-pack -v "test-4-${pack1}.pack"'
+ '! git verify-pack -v "test-4-${pack1}.pack"'
test_expect_success \
'[index v2] 1) stream pack to repository' \
@@ -150,16 +150,16 @@ test_expect_success \
bs=1 count=20 conv=notrunc &&
git cat-file blob "$delta_sha1" > blob_4 )'
-test_expect_failure \
+test_expect_success \
'[index v2] 3) corrupted delta happily returned wrong data' \
- 'cmp blob_3 blob_4'
+ '! cmp blob_3 blob_4'
-test_expect_failure \
+test_expect_success \
'[index v2] 4) confirm that the pack is actually corrupted' \
- 'git fsck --full $commit'
+ '! git fsck --full $commit'
-test_expect_failure \
+test_expect_success \
'[index v2] 5) pack-objects refuses to reuse corrupted data' \
- 'git pack-objects test-5 <obj-list'
+ '! git pack-objects test-5 <obj-list'
test_done
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index 9734fc5..9a12024 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -60,8 +60,8 @@ echo STDERR post-update >&2
EOF
chmod u+x victim/.git/hooks/post-update
-test_expect_failure push '
- git-send-pack --force ./victim/.git master tofail >send.out 2>send.err
+test_expect_success push '
+ ! git-send-pack --force ./victim/.git master tofail >send.out 2>send.err
'
test_expect_success 'updated as expected' '
@@ -112,8 +112,8 @@ test_expect_success 'all *-receive hook args are empty' '
! test -s victim/.git/post-receive.args
'
-test_expect_failure 'send-pack produced no output' '
- test -s send.out
+test_expect_success 'send-pack produced no output' '
+ ! test -s send.out
'
cat <<EOF >expect
diff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh
index 1c4b0b3..1394047 100755
--- a/t/t5402-post-merge-hook.sh
+++ b/t/t5402-post-merge-hook.sh
@@ -30,9 +30,9 @@ EOF
chmod u+x clone${clone}/.git/hooks/post-merge
done
-test_expect_failure 'post-merge does not run for up-to-date ' '
+test_expect_success 'post-merge does not run for up-to-date ' '
GIT_DIR=clone1/.git git merge $commit0 &&
- test -e clone1/.git/post-merge.args
+ ! test -f clone1/.git/post-merge.args
'
test_expect_success 'post-merge runs as expected ' '
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 7b6798d..788b4a5 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -176,7 +176,7 @@ test_expect_success "deepening fetch in shallow repo" \
test_expect_success "clone shallow object count" \
"test \"count: 18\" = \"$(grep count count.shallow)\""
-test_expect_failure "pull in shallow repo with missing merge base" \
- "(cd shallow; git pull --depth 4 .. A)"
+test_expect_success "pull in shallow repo with missing merge base" \
+ "(cd shallow && ! git pull --depth 4 .. A)"
test_done
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 02882c1..9b948c1 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -95,7 +95,7 @@ test_expect_success 'fetch following tags' '
'
-test_expect_failure 'fetch must not resolve short tag name' '
+test_expect_success 'fetch must not resolve short tag name' '
cd "$D" &&
@@ -103,11 +103,11 @@ test_expect_failure 'fetch must not resolve short tag name' '
cd five &&
git init &&
- git fetch .. anno:five
+ ! git fetch .. anno:five
'
-test_expect_failure 'fetch must not resolve short remote name' '
+test_expect_success 'fetch must not resolve short remote name' '
cd "$D" &&
git-update-ref refs/remotes/six/HEAD HEAD
@@ -116,7 +116,7 @@ test_expect_failure 'fetch must not resolve short remote name' '
cd six &&
git init &&
- git fetch .. six:six
+ ! git fetch .. six:six
'
@@ -139,10 +139,10 @@ test_expect_success 'create bundle 2' '
git bundle create bundle2 master~2..master
'
-test_expect_failure 'unbundle 1' '
+test_expect_success 'unbundle 1' '
cd "$D/bundle" &&
git checkout -b some-branch &&
- git fetch "$D/bundle1" master:master
+ ! git fetch "$D/bundle1" master:master
'
test_expect_success 'bundle 1 has only 3 files ' '
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh
index cc8949e..8b05091 100755
--- a/t/t5530-upload-pack-error.sh
+++ b/t/t5530-upload-pack-error.sh
@@ -26,9 +26,8 @@ test_expect_success 'setup and corrupt repository' '
'
-test_expect_failure 'fsck fails' '
-
- git fsck
+test_expect_success 'fsck fails' '
+ ! git fsck
'
test_expect_success 'upload-pack fails due to error in pack-objects' '
@@ -46,9 +45,8 @@ test_expect_success 'corrupt repo differently' '
'
-test_expect_failure 'fsck fails' '
-
- git fsck
+test_expect_success 'fsck fails' '
+ ! git fsck
'
test_expect_success 'upload-pack fails due to error in rev-list' '
@@ -66,9 +64,9 @@ test_expect_success 'create empty repository' '
'
-test_expect_failure 'fetch fails' '
+test_expect_success 'fetch fails' '
- git fetch .. master
+ ! git fetch .. master
'
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index 1776b37..acf34ce 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -11,13 +11,13 @@ remove the directory before attempting a clone again.'
. ./test-lib.sh
-test_expect_failure \
+test_expect_success \
'clone of non-existent source should fail' \
- 'git-clone foo bar'
+ '! git-clone foo bar'
-test_expect_failure \
+test_expect_success \
'failed clone should not leave a directory' \
- 'cd bar'
+ '! test -d bar'
# Need a repo to clone
test_create_repo foo
@@ -27,9 +27,9 @@ test_create_repo foo
# source repository given to git-clone should be relative to the
# current path not to the target dir
-test_expect_failure \
+test_expect_success \
'clone of non-existent (relative to $PWD) source should fail' \
- 'git-clone ../foo baz'
+ '! git-clone ../foo baz'
test_expect_success \
'clone should work now that source exists' \
diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
index 1908dc8..910ccb4 100755
--- a/t/t5710-info-alternate.sh
+++ b/t/t5710-info-alternate.sh
@@ -87,10 +87,10 @@ test_valid_repo"
cd "$base_dir"
-test_expect_failure 'that info/alternates is necessary' \
+test_expect_success 'that info/alternates is necessary' \
'cd C &&
-rm .git/objects/info/alternates &&
-test_valid_repo'
+rm -f .git/objects/info/alternates &&
+! (test_valid_repo)'
cd "$base_dir"
@@ -101,9 +101,11 @@ test_valid_repo'
cd "$base_dir"
-test_expect_failure 'that relative alternate is only possible for current dir' \
-'cd D &&
-test_valid_repo'
+test_expect_success \
+ 'that relative alternate is only possible for current dir' '
+ cd D &&
+ ! (test_valid_repo)
+'
cd "$base_dir"
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index ae3b6f2..8641996 100755
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
@@ -66,8 +66,8 @@ test_expect_success "merge result added missing LF" \
"git diff test.txt test2.txt"
cp test.txt backup.txt
-test_expect_failure "merge with conflicts" \
- "git merge-file test.txt orig.txt new3.txt"
+test_expect_success "merge with conflicts" \
+ "! git merge-file test.txt orig.txt new3.txt"
cat > expect.txt << EOF
<<<<<<< test.txt
@@ -89,8 +89,8 @@ EOF
test_expect_success "expected conflict markers" "git diff test.txt expect.txt"
cp backup.txt test.txt
-test_expect_failure "merge with conflicts, using -L" \
- "git merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
+test_expect_success "merge with conflicts, using -L" \
+ "! git merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
cat > expect.txt << EOF
<<<<<<< 1
@@ -113,8 +113,8 @@ test_expect_success "expected conflict markers, with -L" \
"git diff test.txt expect.txt"
sed "s/ tu / TU /" < new1.txt > new5.txt
-test_expect_failure "conflict in removed tail" \
- "git merge-file -p orig.txt new1.txt new5.txt > out"
+test_expect_success "conflict in removed tail" \
+ "! git merge-file -p orig.txt new1.txt new5.txt > out"
cat > expect << EOF
Dominus regit me,
diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh
index c154f03..149ea85 100755
--- a/t/t6024-recursive-merge.sh
+++ b/t/t6024-recursive-merge.sh
@@ -60,7 +60,7 @@ git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
'
-test_expect_failure "combined merge conflicts" "git merge -m final G"
+test_expect_success "combined merge conflicts" "! git merge -m final G"
cat > expect << EOF
<<<<<<< HEAD:a1
diff --git a/t/t6025-merge-symlinks.sh b/t/t6025-merge-symlinks.sh
index 950c2e9..6004deb 100755
--- a/t/t6025-merge-symlinks.sh
+++ b/t/t6025-merge-symlinks.sh
@@ -30,30 +30,29 @@ echo plain-file > symlink &&
git add symlink &&
git-commit -m b-file'
-test_expect_failure \
+test_expect_success \
'merge master into b-symlink, which has a different symbolic link' '
-! git-checkout b-symlink ||
-git-merge master'
+git-checkout b-symlink &&
+! git-merge master'
test_expect_success \
'the merge result must be a file' '
test -f symlink'
-test_expect_failure \
+test_expect_success \
'merge master into b-file, which has a file instead of a symbolic link' '
-! (git-reset --hard &&
-git-checkout b-file) ||
-git-merge master'
+git-reset --hard && git-checkout b-file &&
+! git-merge master'
test_expect_success \
'the merge result must be a file' '
test -f symlink'
-test_expect_failure \
+test_expect_success \
'merge b-file, which has a file instead of a symbolic link, into master' '
-! (git-reset --hard &&
-git-checkout master) ||
-git-merge b-file'
+git-reset --hard &&
+git-checkout master &&
+! git-merge b-file'
test_expect_success \
'the merge result must be a file' '
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index 0724864..2328b69 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -26,7 +26,7 @@ test_expect_success 'final^1^1^1 = final^^^' "test $(git rev-parse final^1^1^1)
test_expect_success 'final^1^2' "test $(git rev-parse start2) = $(git rev-parse final^1^2)"
test_expect_success 'final^1^2 != final^1^1' "test $(git rev-parse final^1^2) != $(git rev-parse final^1^1)"
test_expect_success 'final^1^3 not valid' "if git rev-parse --verify final^1^3; then false; else :; fi"
-test_expect_failure '--verify start2^1' 'git rev-parse --verify start2^1'
+test_expect_success '--verify start2^1' '! git rev-parse --verify start2^1'
test_expect_success '--verify start2^0' 'git rev-parse --verify start2^0'
test_expect_success 'repack for next test' 'git repack -a -d'
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 8a23aaf..f46ec93 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -43,8 +43,8 @@ test_expect_success 'Check atom names are valid' '
test -z "$bad"
'
-test_expect_failure 'Check invalid atoms names are errors' '
- git-for-each-ref --format="%(INVALID)" refs/heads
+test_expect_success 'Check invalid atoms names are errors' '
+ ! git-for-each-ref --format="%(INVALID)" refs/heads
'
test_expect_success 'Check format specifiers are ignored in naming date atoms' '
@@ -63,8 +63,8 @@ test_expect_success 'Check valid format specifiers for date fields' '
git-for-each-ref --format="%(authordate:rfc2822)" refs/heads
'
-test_expect_failure 'Check invalid format specifiers are errors' '
- git-for-each-ref --format="%(authordate:INVALID)" refs/heads
+test_expect_success 'Check invalid format specifiers are errors' '
+ ! git-for-each-ref --format="%(authordate:INVALID)" refs/heads
'
cat >expected <<\EOF
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b730c90..b1243b4 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -78,9 +78,9 @@ test_expect_success \
git diff-tree -r -M --name-status HEAD^ HEAD | \
grep "^R100..*path2/README..*path1/path2/README"'
-test_expect_failure \
+test_expect_success \
'do not move directory over existing directory' \
- 'mkdir path0 && mkdir path0/path2 && git mv path2 path0'
+ 'mkdir path0 && mkdir path0/path2 && ! git mv path2 path0'
test_expect_success \
'move into "."' \
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index 68b2b92..8d3a8eb 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -107,8 +107,8 @@ do
diff expected actual
'
- test_expect_failure "grep -c $L (no /dev/null)" '
- git grep -c test $H | grep -q "/dev/null"
+ test_expect_success "grep -c $L (no /dev/null)" '
+ ! git grep -c test $H | grep -q /dev/null
'
done
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index df496a9..75cd33b 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -26,8 +26,8 @@ test_expect_success 'listing all tags in an empty tree should output nothing' '
test `git-tag | wc -l` -eq 0
'
-test_expect_failure 'looking for a tag in an empty tree should fail' \
- 'tag_exists mytag'
+test_expect_success 'looking for a tag in an empty tree should fail' \
+ '! (tag_exists mytag)'
test_expect_success 'creating a tag in an empty tree should fail' '
! git-tag mynotag &&
@@ -83,9 +83,9 @@ test_expect_success \
# special cases for creating tags:
-test_expect_failure \
+test_expect_success \
'trying to create a tag with the name of one existing should fail' \
- 'git tag mytag'
+ '! git tag mytag'
test_expect_success \
'trying to create a tag with a non-valid name should fail' '
@@ -146,8 +146,8 @@ test_expect_success \
! tag_exists myhead
'
-test_expect_failure 'trying to delete an already deleted tag should fail' \
- 'git-tag -d mytag'
+test_expect_success 'trying to delete an already deleted tag should fail' \
+ '! git-tag -d mytag'
# listing various tags with pattern matching:
@@ -265,16 +265,16 @@ test_expect_success \
test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
'
-test_expect_failure 'trying to verify an unknown tag should fail' \
- 'git-tag -v unknown-tag'
+test_expect_success 'trying to verify an unknown tag should fail' \
+ '! git-tag -v unknown-tag'
-test_expect_failure \
+test_expect_success \
'trying to verify a non-annotated and non-signed tag should fail' \
- 'git-tag -v non-annotated-tag'
+ '! git-tag -v non-annotated-tag'
-test_expect_failure \
+test_expect_success \
'trying to verify many non-annotated or unknown tags, should fail' \
- 'git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
+ '! git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
# creating annotated tags:
@@ -1027,21 +1027,21 @@ test_expect_success \
# try to sign with bad user.signingkey
git config user.signingkey BobTheMouse
-test_expect_failure \
+test_expect_success \
'git-tag -s fails if gpg is misconfigured' \
- 'git tag -s -m tail tag-gpg-failure'
+ '! git tag -s -m tail tag-gpg-failure'
git config --unset user.signingkey
# try to verify without gpg:
rm -rf gpghome
-test_expect_failure \
+test_expect_success \
'verify signed tag fails when public key is not present' \
- 'git-tag -v signed-tag'
+ '! git-tag -v signed-tag'
-test_expect_failure \
+test_expect_success \
'git-tag -a fails if tag annotation is empty' '
- GIT_EDITOR=cat git tag -a initial-comment
+ ! (GIT_EDITOR=cat git tag -a initial-comment)
'
test_expect_success \
diff --git a/t/t7101-reset.sh b/t/t7101-reset.sh
index 66d4043..0d9874b 100755
--- a/t/t7101-reset.sh
+++ b/t/t7101-reset.sh
@@ -36,28 +36,28 @@ test_expect_success \
'test -d path0 &&
test -f path0/COPYING'
-test_expect_failure \
+test_expect_success \
'checking lack of path1/path2/COPYING' \
- 'test -f path1/path2/COPYING'
+ '! test -f path1/path2/COPYING'
-test_expect_failure \
+test_expect_success \
'checking lack of path1/COPYING' \
- 'test -f path1/COPYING'
+ '! test -f path1/COPYING'
-test_expect_failure \
+test_expect_success \
'checking lack of COPYING' \
- 'test -f COPYING'
+ '! test -f COPYING'
-test_expect_failure \
+test_expect_success \
'checking checking lack of path1/COPYING-TOO' \
- 'test -f path0/COPYING-TOO'
+ '! test -f path0/COPYING-TOO'
-test_expect_failure \
+test_expect_success \
'checking lack of path1/path2' \
- 'test -d path1/path2'
+ '! test -d path1/path2'
-test_expect_failure \
+test_expect_success \
'checking lack of path1' \
- 'test -d path1'
+ '! test -d path1'
test_done
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index d1a415a..21dcf55 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -17,49 +17,49 @@ test_expect_success \
git-add file && \
git-status | grep 'Initial commit'"
-test_expect_failure \
+test_expect_success \
"fail initial amend" \
- "git-commit --amend"
+ "! git-commit --amend"
test_expect_success \
"initial commit" \
"git-commit -m initial"
-test_expect_failure \
+test_expect_success \
"invalid options 1" \
- "git-commit -m foo -m bar -F file"
+ "! git-commit -m foo -m bar -F file"
-test_expect_failure \
+test_expect_success \
"invalid options 2" \
- "git-commit -C HEAD -m illegal"
+ "! git-commit -C HEAD -m illegal"
-test_expect_failure \
+test_expect_success \
"using paths with -a" \
"echo King of the bongo >file &&
- git-commit -m foo -a file"
+ ! git-commit -m foo -a file"
-test_expect_failure \
+test_expect_success \
"using paths with --interactive" \
"echo bong-o-bong >file &&
- echo 7 | git-commit -m foo --interactive file"
+ ! echo 7 | git-commit -m foo --interactive file"
-test_expect_failure \
+test_expect_success \
"using invalid commit with -C" \
- "git-commit -C bogus"
+ "! git-commit -C bogus"
-test_expect_failure \
+test_expect_success \
"testing nothing to commit" \
- "git-commit -m initial"
+ "! git-commit -m initial"
test_expect_success \
"next commit" \
"echo 'bongo bongo bongo' >file \
git-commit -m next -a"
-test_expect_failure \
+test_expect_success \
"commit message from non-existing file" \
"echo 'more bongo: bongo bongo bongo bongo' >file && \
- git-commit -F gah -a"
+ ! git-commit -F gah -a"
# Empty except stray tabs and spaces on a few lines.
sed -e 's/@$//' >msg <<EOF
@@ -68,9 +68,9 @@ sed -e 's/@$//' >msg <<EOF
@
Signed-off-by: hula
EOF
-test_expect_failure \
+test_expect_success \
"empty commit message" \
- "git-commit -F msg -a"
+ "! git-commit -F msg -a"
test_expect_success \
"commit message from file" \
@@ -88,10 +88,10 @@ test_expect_success \
"amend commit" \
"VISUAL=./editor git-commit --amend"
-test_expect_failure \
+test_expect_success \
"passing -m and -F" \
"echo 'enough with the bongos' >file && \
- git-commit -F msg -m amending ."
+ ! git-commit -F msg -m amending ."
test_expect_success \
"using message from other commit" \
diff --git a/t/t7503-pre-commit-hook.sh b/t/t7503-pre-commit-hook.sh
index d787cac..2dd5a5e 100755
--- a/t/t7503-pre-commit-hook.sh
+++ b/t/t7503-pre-commit-hook.sh
@@ -52,11 +52,11 @@ cat > "$HOOK" <<EOF
exit 1
EOF
-test_expect_failure 'with failing hook' '
+test_expect_success 'with failing hook' '
echo "another" >> file &&
git add file &&
- git commit -m "another"
+ ! git commit -m "another"
'
diff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh
index 751b113..eff36aa 100755
--- a/t/t7504-commit-msg-hook.sh
+++ b/t/t7504-commit-msg-hook.sh
@@ -98,20 +98,20 @@ cat > "$HOOK" <<EOF
exit 1
EOF
-test_expect_failure 'with failing hook' '
+test_expect_success 'with failing hook' '
echo "another" >> file &&
git add file &&
- git commit -m "another"
+ ! git commit -m "another"
'
-test_expect_failure 'with failing hook (editor)' '
+test_expect_success 'with failing hook (editor)' '
echo "more another" >> file &&
git add file &&
echo "more another" > FAKE_MSG &&
- GIT_EDITOR="$FAKE_EDITOR" git commit
+ ! (GIT_EDITOR="$FAKE_EDITOR" git commit)
'
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 614cf50..1078f87 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -56,19 +56,19 @@ test_expect_success "$name" "
name='detect node change from file to directory #1'
-test_expect_failure "$name" "
+test_expect_success "$name" "
mkdir dir/new_file &&
mv dir/file dir/new_file/file &&
mv dir/new_file dir/file &&
git update-index --remove dir/file &&
git update-index --add dir/file/file &&
- git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ git commit -m '$name' &&
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch" || true
name='detect node change from directory to file #1'
-test_expect_failure "$name" "
+test_expect_success "$name" "
rm -rf dir '$GIT_DIR'/index &&
git checkout -f -b mybranch2 remotes/git-svn &&
mv bar/zzz zzz &&
@@ -77,12 +77,12 @@ test_expect_failure "$name" "
git update-index --remove -- bar/zzz &&
git update-index --add -- bar &&
git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch2" || true
name='detect node change from file to directory #2'
-test_expect_failure "$name" "
+test_expect_success "$name" "
rm -f '$GIT_DIR'/index &&
git checkout -f -b mybranch3 remotes/git-svn &&
rm bar/zzz &&
@@ -91,12 +91,12 @@ test_expect_failure "$name" "
echo yyy > bar/zzz/yyy &&
git update-index --add bar/zzz/yyy &&
git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch3" || true
name='detect node change from directory to file #2'
-test_expect_failure "$name" "
+test_expect_success "$name" "
rm -f '$GIT_DIR'/index &&
git checkout -f -b mybranch4 remotes/git-svn &&
rm -rf dir &&
@@ -105,7 +105,7 @@ test_expect_failure "$name" "
echo asdf > dir &&
git update-index --add -- dir &&
git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch4" || true
@@ -213,18 +213,18 @@ EOF
test_expect_success "$name" "git diff a expected"
-test_expect_failure 'exit if remote refs are ambigious' "
+test_expect_success 'exit if remote refs are ambigious' "
git config --add svn-remote.svn.fetch \
bar:refs/remotes/git-svn &&
- git-svn migrate
- "
+ ! git-svn migrate
+"
-test_expect_failure 'exit if init-ing a would clobber a URL' "
+test_expect_success 'exit if init-ing a would clobber a URL' "
svnadmin create ${PWD}/svnrepo2 &&
svn mkdir -m 'mkdir bar' ${svnrepo}2/bar &&
git config --unset svn-remote.svn.fetch \
'^bar:refs/remotes/git-svn$' &&
- git-svn init ${svnrepo}2/bar
+ ! git-svn init ${svnrepo}2/bar
"
test_expect_success \
diff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh
index 79b7968..f74ab12 100755
--- a/t/t9106-git-svn-commit-diff-clobber.sh
+++ b/t/t9106-git-svn-commit-diff-clobber.sh
@@ -24,11 +24,11 @@ test_expect_success 'commit change from svn side' "
rm -rf t.svn
"
-test_expect_failure 'commit conflicting change from git' "
+test_expect_success 'commit conflicting change from git' "
echo second line from git >> file &&
git commit -a -m 'second line from git' &&
- git-svn commit-diff -r1 HEAD~1 HEAD $svnrepo
- " || true
+ ! git-svn commit-diff -r1 HEAD~1 HEAD $svnrepo
+"
test_expect_success 'commit complementing change from git' "
git reset --hard HEAD~1 &&
@@ -39,7 +39,7 @@ test_expect_success 'commit complementing change from git' "
git-svn commit-diff -r2 HEAD~1 HEAD $svnrepo
"
-test_expect_failure 'dcommit fails to commit because of conflict' "
+test_expect_success 'dcommit fails to commit because of conflict' "
git-svn init $svnrepo &&
git-svn fetch &&
git reset --hard refs/remotes/git-svn &&
@@ -52,8 +52,8 @@ test_expect_failure 'dcommit fails to commit because of conflict' "
rm -rf t.svn &&
echo 'fourth line from git' >> file &&
git commit -a -m 'fourth line from git' &&
- git-svn dcommit
- " || true
+ ! git-svn dcommit
+ "
test_expect_success 'dcommit does the svn equivalent of an index merge' "
git reset --hard refs/remotes/git-svn &&
@@ -76,15 +76,15 @@ test_expect_success 'commit another change from svn side' "
rm -rf t.svn
"
-test_expect_failure 'multiple dcommit from git-svn will not clobber svn' "
+test_expect_success 'multiple dcommit from git-svn will not clobber svn' "
git reset --hard refs/remotes/git-svn &&
echo new file >> new-file &&
git update-index --add new-file &&
git commit -a -m 'new file' &&
echo clobber > file &&
git commit -a -m 'clobber' &&
- git svn dcommit
- " || true
+ ! git svn dcommit
+ "
test_expect_success 'check that rebase really failed' 'test -d .dotest'
diff --git a/t/t9106-git-svn-dcommit-clobber-series.sh b/t/t9106-git-svn-dcommit-clobber-series.sh
index 7452546..ca8a00e 100755
--- a/t/t9106-git-svn-dcommit-clobber-series.sh
+++ b/t/t9106-git-svn-dcommit-clobber-series.sh
@@ -54,10 +54,10 @@ test_expect_success 'change file but in unrelated area' "
test x\"\`sed -n -e 61p < file\`\" = x6611
"
-test_expect_failure 'attempt to dcommit with a dirty index' '
+test_expect_success 'attempt to dcommit with a dirty index' '
echo foo >>file &&
git add file &&
- git svn dcommit
+ ! git svn dcommit
'
test_done
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 0595041..cceedbb 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -165,9 +165,9 @@ from refs/heads/master
M 755 0000000000000000000000000000000000000001 zero1
INPUT_END
-test_expect_failure \
- 'B: fail on invalid blob sha1' \
- 'git-fast-import <input'
+test_expect_success 'B: fail on invalid blob sha1' '
+ ! git-fast-import <input
+'
rm -f .git/objects/pack_* .git/objects/index_*
cat >input <<INPUT_END
@@ -180,9 +180,9 @@ COMMIT
from refs/heads/master
INPUT_END
-test_expect_failure \
- 'B: fail on invalid branch name ".badbranchname"' \
- 'git-fast-import <input'
+test_expect_success 'B: fail on invalid branch name ".badbranchname"' '
+ ! git-fast-import <input
+'
rm -f .git/objects/pack_* .git/objects/index_*
cat >input <<INPUT_END
@@ -195,9 +195,9 @@ COMMIT
from refs/heads/master
INPUT_END
-test_expect_failure \
- 'B: fail on invalid branch name "bad[branch]name"' \
- 'git-fast-import <input'
+test_expect_success 'B: fail on invalid branch name "bad[branch]name"' '
+ ! git-fast-import <input
+'
rm -f .git/objects/pack_* .git/objects/index_*
cat >input <<INPUT_END
@@ -339,9 +339,9 @@ COMMIT
from refs/heads/branch^0
INPUT_END
-test_expect_failure \
- 'E: rfc2822 date, --date-format=raw' \
- 'git-fast-import --date-format=raw <input'
+test_expect_success 'E: rfc2822 date, --date-format=raw' '
+ ! git-fast-import --date-format=raw <input
+'
test_expect_success \
'E: rfc2822 date, --date-format=rfc2822' \
'git-fast-import --date-format=rfc2822 <input'
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 75d1ce4..0a20971 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -156,15 +156,19 @@ test_expect_success 'req_Root (strict paths)' \
'cat request-anonymous | git-cvsserver --strict-paths pserver $SERVERDIR >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (strict-paths)' \
- 'cat request-anonymous | git-cvsserver --strict-paths pserver $WORKDIR >log 2>&1'
+test_expect_success 'req_Root failure (strict-paths)' '
+ ! cat request-anonymous |
+ git-cvsserver --strict-paths pserver $WORKDIR >log 2>&1
+'
test_expect_success 'req_Root (w/o strict-paths)' \
'cat request-anonymous | git-cvsserver pserver $WORKDIR/ >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (w/o strict-paths)' \
- 'cat request-anonymous | git-cvsserver pserver $WORKDIR/gitcvs >log 2>&1'
+test_expect_success 'req_Root failure (w/o strict-paths)' '
+ ! cat request-anonymous |
+ git-cvsserver pserver $WORKDIR/gitcvs >log 2>&1
+'
cat >request-base <<EOF
BEGIN AUTH REQUEST
@@ -179,8 +183,10 @@ test_expect_success 'req_Root (base-path)' \
'cat request-base | git-cvsserver --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (base-path)' \
- 'cat request-anonymous | git-cvsserver --strict-paths --base-path $WORKDIR pserver $SERVERDIR >log 2>&1'
+test_expect_success 'req_Root failure (base-path)' '
+ ! cat request-anonymous |
+ git-cvsserver --strict-paths --base-path $WORKDIR pserver $SERVERDIR >log 2>&1
+'
GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false || exit 1
@@ -188,9 +194,8 @@ test_expect_success 'req_Root (export-all)' \
'cat request-anonymous | git-cvsserver --export-all pserver $WORKDIR >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (export-all w/o whitelist)' \
- 'cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 ||
- false'
+test_expect_success 'req_Root failure (export-all w/o whitelist)' \
+ '! (cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 || false)'
test_expect_success 'req_Root (everything together)' \
'cat request-base | git-cvsserver --export-all --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 &&
@@ -290,15 +295,16 @@ test_expect_success 'cvs update (update existing file)' \
cd "$WORKDIR"
#TODO: cvsserver doesn't support update w/o -d
-test_expect_failure "cvs update w/o -d doesn't create subdir (TODO)" \
- 'mkdir test &&
+test_expect_failure "cvs update w/o -d doesn't create subdir (TODO)" '
+ mkdir test &&
echo >test/empty &&
git add test &&
git commit -q -m "Single Subdirectory" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
- test ! -d test'
+ test ! -d test
+'
cd "$WORKDIR"
test_expect_success 'cvs update (subdirectories)' \
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 142540e..9a3c0b4 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -139,6 +139,8 @@ fi
test_failure=0
test_count=0
+test_fixed=0
+test_broken=0
trap 'echo >&5 "FATAL: Unexpected exit with code $?"; exit 1' exit
@@ -171,6 +173,17 @@ test_failure_ () {
test "$immediate" = "" || { trap - exit; exit 1; }
}
+test_known_broken_ok_ () {
+ test_count=$(expr "$test_count" + 1)
+ test_fixed=$(($test_fixed+1))
+ say_color "" " FIXED $test_count: $@"
+}
+
+test_known_broken_failure_ () {
+ test_count=$(expr "$test_count" + 1)
+ test_broken=$(($test_broken+1))
+ say_color skip " still broken $test_count: $@"
+}
test_debug () {
test "$debug" = "" || eval "$1"
@@ -211,13 +224,13 @@ test_expect_failure () {
error "bug in the test script: not 2 parameters to test-expect-failure"
if ! test_skip "$@"
then
- say >&3 "expecting failure: $2"
+ say >&3 "checking known breakage: $2"
test_run_ "$2"
- if [ "$?" = 0 -a "$eval_ret" != 0 -a "$eval_ret" -lt 129 ]
+ if [ "$?" = 0 -a "$eval_ret" = 0 ]
then
- test_ok_ "$1"
+ test_known_broken_ok_ "$1"
else
- test_failure_ "$@"
+ test_known_broken_failure_ "$1"
fi
fi
echo >&3 ""
@@ -274,6 +287,15 @@ test_create_repo () {
test_done () {
trap - exit
+
+ if test "$test_fixed" != 0
+ then
+ say_color pass "fixed $test_fixed known breakage(s)"
+ fi
+ if test "$test_broken" != 0
+ then
+ say_color error "still have $test_broken known breakage(s)"
+ fi
case "$test_failure" in
0)
# We could:
^ permalink raw reply related [relevance 2%]
* [PATCH] builtin-mv: minimum fix to avoid losing files
@ 2008-02-04 8:09 11% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-02-04 8:09 UTC (permalink / raw)
To: git; +Cc: Johannes Schindelin
An incorrect command "git mv subdir /outer/space" threw the
subdirectory to outside of the repository and then noticed that
/outer/space/subdir/ would be outside of the repository. The
error checking is backwards.
This fixes the issue by being careful about use of the return
value of get_pathspec(). Since the implementation already has
handcrafted loop to munge each path on the command line, we use
prefix_path() instead.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* This minimally fixes the issue and applies on top of the
"setup: sanitize absolute and funny paths in get_pathspec()"
patch I showed during the rc freeze.
Dscho CC'ed as he owns the largest number of lines in this
source file.
builtin-mv.c | 6 +++++-
t/t7001-mv.sh | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 94f6dd2..68aa2a6 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -19,6 +19,7 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec,
int count, int base_name)
{
int i;
+ int len = prefix ? strlen(prefix) : 0;
const char **result = xmalloc((count + 1) * sizeof(const char *));
memcpy(result, pathspec, count * sizeof(const char *));
result[count] = NULL;
@@ -32,8 +33,11 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec,
if (last_slash)
result[i] = last_slash + 1;
}
+ result[i] = prefix_path(prefix, len, result[i]);
+ if (!result[i])
+ exit(1); /* error already given */
}
- return get_pathspec(prefix, result);
+ return result;
}
static void show_list(const char *label, struct path_list *list)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b1243b4..fa382c5 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -118,4 +118,42 @@ test_expect_success "Sergey Vlasov's test case" '
git mv ab a
'
+test_expect_success 'absolute pathname' '(
+
+ rm -fr mine &&
+ mkdir mine &&
+ cd mine &&
+ test_create_repo one &&
+ cd one &&
+ mkdir sub &&
+ >sub/file &&
+ git add sub/file &&
+
+ git mv sub "$(pwd)/in" &&
+ ! test -d sub &&
+ test -d in &&
+ git ls-files --error-unmatch in/file
+
+
+)'
+
+test_expect_success 'absolute pathname outside should fail' '(
+
+ rm -fr mine &&
+ mkdir mine &&
+ cd mine &&
+ out=$(pwd) &&
+ test_create_repo one &&
+ cd one &&
+ mkdir sub &&
+ >sub/file &&
+ git add sub/file &&
+
+ ! git mv sub "$out/out" &&
+ test -d sub &&
+ ! test -d ../in &&
+ git ls-files --error-unmatch sub/file
+
+)'
+
test_done
--
1.5.4.18.gd0b8
^ permalink raw reply related [relevance 11%]
* [PATCH 0/5] Extend make remove-dashes
@ 2008-07-11 0:12 3% Miklos Vajna
0 siblings, 0 replies; 200+ results
From: Miklos Vajna @ 2008-07-11 0:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi,
This series extends what make remove-dashes did so far, now it uses not
only builtins but other programs (git-daemon, etc.) and the shell/perl
scripts as well.
The first two patch does minor changes to avoid unwanted renames.
The third patch changes the output of git bisect log to use a dash-less
form.
The 4th patch updates Linus' fixup-builtins script. It was used to
generate the last 'huge' patch.
The idea behind this series is to avoid commands in the source code and
tests which is not available in PATH; in other words I *think* is not a
'necessary' but a 'sooner or later we will have to do this' series.
The last patch is more a demonstration than a patch for inclusion at the
moment, since problem this is not the right time to do such a big
rename.
Miklos Vajna (5):
t0001-init.sh: change confusing directory name
t1007-hash-object.sh: use quotes for the test description
git-bisect: use dash-less form on git bisect log
make remove-dashes: apply to scripts and programs as well, not just
to builtins
Rewrite "git-frotz" to "git frotz" for scripts and programs as well
Makefile | 2 +-
contrib/examples/git-checkout.sh | 2 +-
contrib/examples/git-clean.sh | 2 +-
contrib/examples/git-clone.sh | 24 ++--
contrib/examples/git-commit.sh | 6 +-
contrib/examples/git-fetch.sh | 6 +-
contrib/examples/git-gc.sh | 2 +-
contrib/examples/git-ls-remote.sh | 2 +-
contrib/examples/git-resolve.sh | 4 +-
contrib/examples/git-revert.sh | 22 ++--
contrib/examples/git-tag.sh | 6 +-
fixup-builtins | 18 +-
git-am.sh | 22 ++--
git-bisect.sh | 10 +-
git-instaweb.sh | 4 +-
git-merge-octopus.sh | 2 +-
git-merge-one-file.sh | 8 +-
git-merge-resolve.sh | 2 +-
git-merge.sh | 10 +-
git-parse-remote.sh | 6 +-
git-pull.sh | 10 +-
git-quiltimport.sh | 2 +-
git-rebase.sh | 14 +-
git-repack.sh | 12 +-
git-sh-setup.sh | 2 +-
git-stash.sh | 10 +-
git-submodule.sh | 12 +-
git-web--browse.sh | 2 +-
t/t0001-init.sh | 6 +-
t/t0050-filesystem.sh | 2 +-
t/t1007-hash-object.sh | 2 +-
t/t1200-tutorial.sh | 2 +-
t/t1303-wacky-config.sh | 2 +-
t/t1400-update-ref.sh | 10 +-
t/t1503-rev-parse-verify.sh | 2 +-
t/t2005-checkout-index-symlinks.sh | 4 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2101-update-index-reupdate.sh | 2 +-
t/t2102-update-index-symlinks.sh | 2 +-
t/t2200-add-update.sh | 12 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 2 +-
t/t3030-merge-recursive.sh | 14 +-
t/t3200-branch.sh | 58 +++---
t/t3210-pack-refs.sh | 4 +-
t/t3400-rebase.sh | 6 +-
t/t3401-rebase-partial.sh | 22 ++--
t/t3403-rebase-skip.sh | 2 +-
t/t3404-rebase-interactive.sh | 2 +-
t/t3407-rebase-abort.sh | 2 +-
t/t3500-cherry.sh | 12 +-
t/t3600-rm.sh | 4 +-
t/t3800-mktag.sh | 12 +-
t/t3900-i18n-commit.sh | 6 +-
t/t3901-i18n-patch.sh | 16 +-
t/t3903-stash.sh | 2 +-
t/t4012-diff-binary.sh | 4 +-
t/t4103-apply-binary.sh | 26 ++--
t/t4124-apply-ws-rule.sh | 2 +-
t/t4127-apply-same-fn.sh | 4 +-
t/t4150-am.sh | 2 +-
t/t5300-pack-object.sh | 14 +-
t/t5301-sliding-window.sh | 4 +-
t/t5302-pack-index.sh | 12 +-
t/t5400-send-pack.sh | 30 ++--
t/t5401-update-hooks.sh | 4 +-
t/t5402-post-merge-hook.sh | 4 +-
t/t5403-post-checkout-hook.sh | 4 +-
t/t5500-fetch-pack.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5530-upload-pack-error.sh | 4 +-
t/t5600-clone-fail-cleanup.sh | 12 +-
t/t6006-rev-list-format.sh | 6 +-
t/t6025-merge-symlinks.sh | 32 ++--
t/t6026-merge-attr.sh | 12 +-
t/t6030-bisect-porcelain.sh | 4 +-
t/t6120-describe.sh | 30 ++--
t/t6300-for-each-ref.sh | 28 ++--
t/t7001-mv.sh | 12 +-
t/t7003-filter-branch.sh | 20 +-
t/t7004-tag.sh | 318 +++++++++++++++++-----------------
t/t7101-reset.sh | 8 +-
t/t7102-reset.sh | 4 +-
t/t7103-reset-bare.sh | 2 +-
t/t7201-co.sh | 2 +-
t/t7300-clean.sh | 76 ++++----
t/t7400-submodule-basic.sh | 48 +++---
t/t7401-submodule-summary.sh | 2 +-
t/t7500-commit.sh | 2 +-
t/t7501-commit.sh | 48 +++---
t/t7502-status.sh | 2 +-
t/t7505-prepare-commit-msg-hook.sh | 2 +-
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7610-mergetool.sh | 2 +-
t/t7701-repack-unpack-unreachable.sh | 2 +-
t/t9001-send-email.sh | 2 +-
t/t9101-git-svn-props.sh | 28 ++--
t/t9119-git-svn-info.sh | 44 +++---
t/t9200-git-cvsexportcommit.sh | 14 +-
t/t9300-fast-import.sh | 66 ++++----
t/t9301-fast-export.sh | 2 +-
t/t9400-git-cvsserver-server.sh | 40 ++--
t/t9401-git-cvsserver-crlf.sh | 10 +-
t/t9600-cvsimport.sh | 2 +-
t/t9700-perl-git.sh | 16 +-
106 files changed, 731 insertions(+), 731 deletions(-)
^ permalink raw reply [relevance 3%]
* [PATCH 2/2] t/: Use "test_must_fail git" instead of "! git"
@ 2008-07-12 15:47 2% ` Stephan Beyer
0 siblings, 0 replies; 200+ results
From: Stephan Beyer @ 2008-07-12 15:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Stephan Beyer
This patch changes every occurrence of "! git" -- with the meaning
that a git call has to fail -- into "test_must_fail git".
This is useful to
- make sure the test does not fail because of a signal,
e.g. SIGSEGV, and
- advertise the use of "test_must_fail" for new tests.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
Because test_must_fail has been introduced by Junio, this patch
is only "To:"'ed to him and not to all the authors of the test
cases. I hope this is ok. ;)
t/t0000-basic.sh | 6 +-
t/t0020-crlf.sh | 8 ++--
t/t0050-filesystem.sh | 2 +-
t/t1200-tutorial.sh | 2 +-
t/t1300-repo-config.sh | 19 ++++----
t/t1302-repo-version.sh | 2 +-
t/t1400-update-ref.sh | 4 +-
t/t2000-checkout-cache-clash.sh | 2 +-
t/t2100-update-cache-badpath.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 2 +-
t/t3200-branch.sh | 8 ++--
t/t3210-pack-refs.sh | 4 +-
t/t3403-rebase-skip.sh | 8 ++-
t/t3502-cherry-pick-merge.sh | 12 +++---
t/t3600-rm.sh | 26 ++++++------
t/t3700-add.sh | 4 +-
t/t4015-diff-whitespace.sh | 28 ++++++------
t/t4018-diff-funcname.sh | 2 +-
t/t4103-apply-binary.sh | 16 +++---
t/t4113-apply-ending.sh | 4 +-
t/t4150-am.sh | 8 ++--
t/t4200-rerere.sh | 10 ++--
t/t5300-pack-object.sh | 2 +-
t/t5302-pack-index.sh | 11 +++--
t/t5401-update-hooks.sh | 3 +-
t/t5404-tracking-branches.sh | 4 +-
t/t5406-remote-rejects.sh | 2 +-
t/t5500-fetch-pack.sh | 2 +-
t/t5505-remote.sh | 14 +++---
t/t5510-fetch.sh | 12 +++---
t/t5516-fetch-push.sh | 8 ++--
t/t5530-upload-pack-error.sh | 6 +-
t/t5540-http-push.sh | 2 +-
t/t5600-clone-fail-cleanup.sh | 4 +-
t/t6023-merge-file.sh | 14 +++---
t/t6024-recursive-merge.sh | 6 ++-
t/t6025-merge-symlinks.sh | 6 +-
t/t6101-rev-parse-parents.sh | 2 +-
t/t7001-mv.sh | 4 +-
t/t7004-tag.sh | 67 +++++++++++++++--------------
t/t7102-reset.sh | 48 ++++++++++----------
t/t7103-reset-bare.sh | 2 +-
t/t7300-clean.sh | 4 +-
t/t7400-submodule-basic.sh | 2 +-
t/t7402-submodule-rebase.sh | 2 +-
t/t7500-commit.sh | 8 ++--
t/t7501-commit.sh | 18 ++++----
t/t7503-pre-commit-hook.sh | 2 +-
t/t7504-commit-msg-hook.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7610-mergetool.sh | 2 +-
t/t9100-git-svn-basic.sh | 12 +++---
t/t9106-git-svn-commit-diff-clobber.sh | 6 +-
t/t9106-git-svn-dcommit-clobber-series.sh | 2 +-
t/t9200-git-cvsexportcommit.sh | 6 +-
t/t9300-fast-import.sh | 8 ++--
t/t9301-fast-export.sh | 4 +-
57 files changed, 246 insertions(+), 232 deletions(-)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index d7cbc5c..70df15c 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -63,7 +63,7 @@ test_expect_failure 'pretend we have fixed a known breakage' '
# updating a new file without --add should fail.
test_expect_success 'git update-index without --add should fail adding.' '
- ! git update-index should-be-empty
+ test_must_fail git update-index should-be-empty
'
# and with --add it should succeed, even if it is empty (it used to fail).
@@ -83,7 +83,7 @@ test_expect_success \
# Removing paths.
rm -f should-be-empty full-of-directories
test_expect_success 'git update-index without --remove should fail removing.' '
- ! git update-index should-be-empty
+ test_must_fail git update-index should-be-empty
'
test_expect_success \
@@ -217,7 +217,7 @@ test_expect_success \
'git update-index --index-info < badobjects'
test_expect_success 'writing this tree without --missing-ok.' '
- ! git write-tree
+ test_must_fail git write-tree
'
test_expect_success \
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 2bfeac9..1be7446 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -52,7 +52,7 @@ test_expect_success 'safecrlf: autocrlf=input, all CRLF' '
git config core.safecrlf true &&
for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
- ! git add allcrlf
+ test_must_fail git add allcrlf
'
test_expect_success 'safecrlf: autocrlf=input, mixed LF/CRLF' '
@@ -61,7 +61,7 @@ test_expect_success 'safecrlf: autocrlf=input, mixed LF/CRLF' '
git config core.safecrlf true &&
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed &&
- ! git add mixed
+ test_must_fail git add mixed
'
test_expect_success 'safecrlf: autocrlf=true, all LF' '
@@ -70,7 +70,7 @@ test_expect_success 'safecrlf: autocrlf=true, all LF' '
git config core.safecrlf true &&
for w in I am all LF; do echo $w; done >alllf &&
- ! git add alllf
+ test_must_fail git add alllf
'
test_expect_success 'safecrlf: autocrlf=true mixed LF/CRLF' '
@@ -79,7 +79,7 @@ test_expect_success 'safecrlf: autocrlf=true mixed LF/CRLF' '
git config core.safecrlf true &&
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed &&
- ! git add mixed
+ test_must_fail git add mixed
'
test_expect_success 'safecrlf: print warning only once' '
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index c5360e2..b177174 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -43,7 +43,7 @@ test_expect_success "detection of case insensitive filesystem during repo init"
else
test_expect_success "detection of case insensitive filesystem during repo init" '
- ! git config --bool core.ignorecase >/dev/null ||
+ test_must_fail git config --bool core.ignorecase >/dev/null ||
test $(git config --bool core.ignorecase) = false
'
fi
diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
index dcb3108..09a8199 100755
--- a/t/t1200-tutorial.sh
+++ b/t/t1200-tutorial.sh
@@ -102,7 +102,7 @@ echo "Lots of fun" >>example
git commit -m 'Some fun.' -i hello example
test_expect_success 'git resolve now fails' '
- ! git merge -m "Merge work in mybranch" mybranch
+ test_must_fail git merge -m "Merge work in mybranch" mybranch
'
cat > hello << EOF
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index afe7e66..64567fb 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -201,7 +201,7 @@ test_expect_success 'non-match value' \
'test wow = $(git config --get nextsection.nonewline !for)'
test_expect_success 'ambiguous get' '
- ! git config --get nextsection.nonewline
+ test_must_fail git config --get nextsection.nonewline
'
test_expect_success 'get multivar' \
@@ -223,15 +223,15 @@ EOF
test_expect_success 'multivar replace' 'cmp .git/config expect'
test_expect_success 'ambiguous value' '
- ! git config nextsection.nonewline
+ test_must_fail git config nextsection.nonewline
'
test_expect_success 'ambiguous unset' '
- ! git config --unset nextsection.nonewline
+ test_must_fail git config --unset nextsection.nonewline
'
test_expect_success 'invalid unset' '
- ! git config --unset somesection.nonewline
+ test_must_fail git config --unset somesection.nonewline
'
git config --unset nextsection.nonewline "wow3$"
@@ -248,7 +248,7 @@ EOF
test_expect_success 'multivar unset' 'cmp .git/config expect'
-test_expect_success 'invalid key' '! git config inval.2key blabla'
+test_expect_success 'invalid key' 'test_must_fail git config inval.2key blabla'
test_expect_success 'correct key' 'git config 123456.a123 987'
@@ -430,7 +430,8 @@ EOF
test_expect_success "rename succeeded" "test_cmp expect .git/config"
test_expect_success "rename non-existing section" '
- ! git config --rename-section branch."world domination" branch.drei
+ test_must_fail git config --rename-section \
+ branch."world domination" branch.drei
'
test_expect_success "rename succeeded" "test_cmp expect .git/config"
@@ -545,11 +546,11 @@ test_expect_success bool '
test_expect_success 'invalid bool (--get)' '
git config bool.nobool foobar &&
- ! git config --bool --get bool.nobool'
+ test_must_fail git config --bool --get bool.nobool'
test_expect_success 'invalid bool (set)' '
- ! git config --bool bool.nobool foobar'
+ test_must_fail git config --bool bool.nobool foobar'
rm .git/config
@@ -669,7 +670,7 @@ EOF
test_expect_success 'quoting' 'cmp .git/config expect'
test_expect_success 'key with newline' '
- ! git config "key.with
+ test_must_fail git config "key.with
newline" 123'
test_expect_success 'value with newline' 'git config key.sub value.with\\\
diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh
index 9be0770..8d305b4 100755
--- a/t/t1302-repo-version.sh
+++ b/t/t1302-repo-version.sh
@@ -41,7 +41,7 @@ test_expect_success 'gitdir required mode on normal repos' '
cd test && git apply --check --index ../test.patch)'
test_expect_success 'gitdir required mode on unsupported repo' '
- (cd test2 && ! git apply --check --index ../test.patch)
+ (cd test2 && test_must_fail git apply --check --index ../test.patch)
'
test_done
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index ca99d37..b31e4b1 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -76,7 +76,7 @@ test_expect_success "delete $m (by HEAD)" '
rm -f .git/$m
test_expect_success '(not) create HEAD with old sha1' "
- ! git update-ref HEAD $A $B
+ test_must_fail git update-ref HEAD $A $B
"
test_expect_success "(not) prior created .git/$m" "
! test -f .git/$m
@@ -87,7 +87,7 @@ test_expect_success \
"create HEAD" \
"git update-ref HEAD $A"
test_expect_success '(not) change HEAD with wrong SHA1' "
- ! git update-ref HEAD $B $Z
+ test_must_fail git update-ref HEAD $B $Z
"
test_expect_success "(not) changed .git/$m" "
! test $B"' = $(cat .git/'"$m"')
diff --git a/t/t2000-checkout-cache-clash.sh b/t/t2000-checkout-cache-clash.sh
index 5141fab..f7e1a73 100755
--- a/t/t2000-checkout-cache-clash.sh
+++ b/t/t2000-checkout-cache-clash.sh
@@ -38,7 +38,7 @@ date >path1
test_expect_success \
'git checkout-index without -f should fail on conflicting work tree.' \
- '! git checkout-index -a'
+ 'test_must_fail git checkout-index -a'
test_expect_success \
'git checkout-index with -f should succeed.' \
diff --git a/t/t2100-update-cache-badpath.sh b/t/t2100-update-cache-badpath.sh
index 9beaecd..6ef2dcf 100755
--- a/t/t2100-update-cache-badpath.sh
+++ b/t/t2100-update-cache-badpath.sh
@@ -46,6 +46,6 @@ for p in path0/file0 path1/file1 path2 path3
do
test_expect_success \
"git update-index to add conflicting path $p should fail." \
- "! git update-index --add -- $p"
+ "test_must_fail git update-index --add -- $p"
done
test_done
diff --git a/t/t3020-ls-files-error-unmatch.sh b/t/t3020-ls-files-error-unmatch.sh
index f4da869..af8c412 100755
--- a/t/t3020-ls-files-error-unmatch.sh
+++ b/t/t3020-ls-files-error-unmatch.sh
@@ -17,7 +17,7 @@ git-commit -m "add foo bar"
test_expect_success \
'git ls-files --error-unmatch should fail with unmatched path.' \
- '! git ls-files --error-unmatch foo bar-does-not-match'
+ 'test_must_fail git ls-files --error-unmatch foo bar-does-not-match'
test_expect_success \
'git ls-files --error-unmatch should succeed eith matched paths.' \
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 8d87686..7c583c8 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -78,13 +78,13 @@ test_expect_success \
test_expect_success 'git branch -m o/o o should fail when o/p exists' '
git branch o/o &&
git branch o/p &&
- ! git branch -m o/o o
+ test_must_fail git branch -m o/o o
'
test_expect_success 'git branch -m q r/q should fail when r exists' '
git branch q &&
git branch r &&
- ! git branch -m q r/q
+ test_must_fail git branch -m q r/q
'
mv .git/config .git/config-saved
@@ -110,14 +110,14 @@ test_expect_success \
test_expect_success 'config information was renamed, too' \
"test $(git config branch.s.dummy) = Hello &&
- ! git config branch.s/s/dummy"
+ test_must_fail git config branch.s/s/dummy"
test_expect_success \
'git branch -m u v should fail when the reflog for u is a symlink' '
git branch -l u &&
mv .git/logs/refs/heads/u real-u &&
ln -s real-u .git/logs/refs/heads/u &&
- ! git branch -m u v
+ test_must_fail git branch -m u v
'
test_expect_success 'test tracking setup via --track' \
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index b64ccfb..c2dec1c 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -43,7 +43,7 @@ test_expect_success 'git branch c/d should barf if branch c exists' '
git branch c &&
git pack-refs --all &&
rm -f .git/refs/heads/c &&
- ! git branch c/d
+ test_must_fail git branch c/d
'
test_expect_success \
@@ -72,7 +72,7 @@ test_expect_success \
test_expect_success 'git branch i/j/k should barf if branch i exists' '
git branch i &&
git pack-refs --all --prune &&
- ! git branch i/j/k
+ test_must_fail git branch i/j/k
'
test_expect_success \
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 0a26099..0d33c71 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -32,7 +32,7 @@ test_expect_success setup '
'
test_expect_success 'rebase with git am -3 (default)' '
- ! git rebase master
+ test_must_fail git rebase master
'
test_expect_success 'rebase --skip with am -3' '
@@ -43,7 +43,7 @@ test_expect_success 'rebase moves back to skip-reference' '
test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
git branch post-rebase &&
git reset --hard pre-rebase &&
- ! git rebase master &&
+ test_must_fail git rebase master &&
echo "hello" > hello &&
git add hello &&
git rebase --continue &&
@@ -53,7 +53,9 @@ test_expect_success 'rebase moves back to skip-reference' '
test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
-test_expect_success 'rebase with --merge' '! git rebase --merge master'
+test_expect_success 'rebase with --merge' '
+ test_must_fail git rebase --merge master
+'
test_expect_success 'rebase --skip with --merge' '
git rebase --skip
diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh
index 7c92e26..0ab52da 100755
--- a/t/t3502-cherry-pick-merge.sh
+++ b/t/t3502-cherry-pick-merge.sh
@@ -35,7 +35,7 @@ test_expect_success 'cherry-pick a non-merge with -m should fail' '
git reset --hard &&
git checkout a^0 &&
- ! git cherry-pick -m 1 b &&
+ test_must_fail git cherry-pick -m 1 b &&
git diff --exit-code a --
'
@@ -44,7 +44,7 @@ test_expect_success 'cherry pick a merge without -m should fail' '
git reset --hard &&
git checkout a^0 &&
- ! git cherry-pick c &&
+ test_must_fail git cherry-pick c &&
git diff --exit-code a --
'
@@ -71,7 +71,7 @@ test_expect_success 'cherry pick a merge relative to nonexistent parent should f
git reset --hard &&
git checkout b^0 &&
- ! git cherry-pick -m 3 c
+ test_must_fail git cherry-pick -m 3 c
'
@@ -79,7 +79,7 @@ test_expect_success 'revert a non-merge with -m should fail' '
git reset --hard &&
git checkout c^0 &&
- ! git revert -m 1 b &&
+ test_must_fail git revert -m 1 b &&
git diff --exit-code c
'
@@ -88,7 +88,7 @@ test_expect_success 'revert a merge without -m should fail' '
git reset --hard &&
git checkout c^0 &&
- ! git revert c &&
+ test_must_fail git revert c &&
git diff --exit-code c
'
@@ -115,7 +115,7 @@ test_expect_success 'revert a merge relative to nonexistent parent should fail'
git reset --hard &&
git checkout c^0 &&
- ! git revert -m 3 c &&
+ test_must_fail git revert -m 3 c &&
git diff --exit-code c
'
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index f542f0a..316775e 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -67,7 +67,7 @@ test_expect_success \
echo "other content" > foo
git add foo
echo "yet another content" > foo
- ! git rm --cached foo
+ test_must_fail git rm --cached foo
'
test_expect_success \
@@ -82,7 +82,7 @@ test_expect_success \
test_expect_success \
'Post-check that foo exists but is not in index after git rm foo' \
- '[ -f foo ] && ! git ls-files --error-unmatch foo'
+ '[ -f foo ] && test_must_fail git ls-files --error-unmatch foo'
test_expect_success \
'Pre-check that bar exists and is in index before "git rm bar"' \
@@ -94,7 +94,7 @@ test_expect_success \
test_expect_success \
'Post-check that bar does not exist and is not in index after "git rm -f bar"' \
- '! [ -f bar ] && ! git ls-files --error-unmatch bar'
+ '! [ -f bar ] && test_must_fail git ls-files --error-unmatch bar'
test_expect_success \
'Test that "git rm -- -q" succeeds (remove a file that looks like an option)' \
@@ -109,7 +109,7 @@ if test "$test_failed_remove" = y; then
chmod a-w .
test_expect_success \
'Test that "git rm -f" fails if its rm fails' \
- '! git rm -f baz'
+ 'test_must_fail git rm -f baz'
chmod 775 .
else
test_expect_success 'skipping removal failure (perhaps running as root?)' :
@@ -151,7 +151,7 @@ test_expect_success 'Re-add foo and baz' '
test_expect_success 'Modify foo -- rm should refuse' '
echo >>foo &&
- ! git rm foo baz &&
+ test_must_fail git rm foo baz &&
test -f foo &&
test -f baz &&
git ls-files --error-unmatch foo baz
@@ -161,8 +161,8 @@ test_expect_success 'Modified foo -- rm -f should work' '
git rm -f foo baz &&
test ! -f foo &&
test ! -f baz &&
- ! git ls-files --error-unmatch foo &&
- ! git ls-files --error-unmatch bar
+ test_must_fail git ls-files --error-unmatch foo &&
+ test_must_fail git ls-files --error-unmatch bar
'
test_expect_success 'Re-add foo and baz for HEAD tests' '
@@ -173,7 +173,7 @@ test_expect_success 'Re-add foo and baz for HEAD tests' '
'
test_expect_success 'foo is different in index from HEAD -- rm should refuse' '
- ! git rm foo baz &&
+ test_must_fail git rm foo baz &&
test -f foo &&
test -f baz &&
git ls-files --error-unmatch foo baz
@@ -183,8 +183,8 @@ test_expect_success 'but with -f it should work.' '
git rm -f foo baz &&
test ! -f foo &&
test ! -f baz &&
- ! git ls-files --error-unmatch foo
- ! git ls-files --error-unmatch baz
+ test_must_fail git ls-files --error-unmatch foo
+ test_must_fail git ls-files --error-unmatch baz
'
test_expect_success 'Recursive test setup' '
@@ -195,14 +195,14 @@ test_expect_success 'Recursive test setup' '
'
test_expect_success 'Recursive without -r fails' '
- ! git rm frotz &&
+ test_must_fail git rm frotz &&
test -d frotz &&
test -f frotz/nitfol
'
test_expect_success 'Recursive with -r but dirty' '
echo qfwfq >>frotz/nitfol
- ! git rm -r frotz &&
+ test_must_fail git rm -r frotz &&
test -d frotz &&
test -f frotz/nitfol
'
@@ -214,7 +214,7 @@ test_expect_success 'Recursive with -r -f' '
'
test_expect_success 'Remove nonexistent file returns nonzero exit status' '
- ! git rm nonexistent
+ test_must_fail git rm nonexistent
'
test_done
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index e83fa1f..7d123d1 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -85,12 +85,12 @@ test_expect_success '.gitignore is honored' '
'
test_expect_success 'error out when attempting to add ignored ones without -f' '
- ! git add a.?? &&
+ test_must_fail git add a.?? &&
! (git ls-files | grep "\\.ig")
'
test_expect_success 'error out when attempting to add ignored ones without -f' '
- ! git add d.?? &&
+ test_must_fail git add d.?? &&
! (git ls-files | grep "\\.ig")
'
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index 0922c70..a27fccc 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -144,7 +144,7 @@ test_expect_success 'check with no whitespace errors' '
test_expect_success 'check with trailing whitespace' '
echo "foo(); " > x &&
- ! git diff --check
+ test_must_fail git diff --check
'
@@ -152,7 +152,7 @@ test_expect_success 'check with space before tab in indent' '
# indent has space followed by hard tab
echo " foo();" > x &&
- ! git diff --check
+ test_must_fail git diff --check
'
@@ -181,7 +181,7 @@ test_expect_success 'check staged with trailing whitespace' '
echo "foo(); " > x &&
git add x &&
- ! git diff --cached --check
+ test_must_fail git diff --cached --check
'
@@ -190,7 +190,7 @@ test_expect_success 'check staged with space before tab in indent' '
# indent has space followed by hard tab
echo " foo();" > x &&
git add x &&
- ! git diff --cached --check
+ test_must_fail git diff --cached --check
'
@@ -206,7 +206,7 @@ test_expect_success 'check with trailing whitespace (diff-index)' '
echo "foo(); " > x &&
git add x &&
- ! git diff-index --check HEAD
+ test_must_fail git diff-index --check HEAD
'
@@ -215,7 +215,7 @@ test_expect_success 'check with space before tab in indent (diff-index)' '
# indent has space followed by hard tab
echo " foo();" > x &&
git add x &&
- ! git diff-index --check HEAD
+ test_must_fail git diff-index --check HEAD
'
@@ -231,7 +231,7 @@ test_expect_success 'check staged with trailing whitespace (diff-index)' '
echo "foo(); " > x &&
git add x &&
- ! git diff-index --cached --check HEAD
+ test_must_fail git diff-index --cached --check HEAD
'
@@ -240,7 +240,7 @@ test_expect_success 'check staged with space before tab in indent (diff-index)'
# indent has space followed by hard tab
echo " foo();" > x &&
git add x &&
- ! git diff-index --cached --check HEAD
+ test_must_fail git diff-index --cached --check HEAD
'
@@ -256,7 +256,7 @@ test_expect_success 'check with trailing whitespace (diff-tree)' '
echo "foo(); " > x &&
git commit -m "another commit" x &&
- ! git diff-tree --check HEAD^ HEAD
+ test_must_fail git diff-tree --check HEAD^ HEAD
'
@@ -265,7 +265,7 @@ test_expect_success 'check with space before tab in indent (diff-tree)' '
# indent has space followed by hard tab
echo " foo();" > x &&
git commit -m "yet another" x &&
- ! git diff-tree --check HEAD^ HEAD
+ test_must_fail git diff-tree --check HEAD^ HEAD
'
@@ -281,7 +281,7 @@ test_expect_success 'check trailing whitespace (trailing-space: on)' '
git config core.whitespace "trailing-space" &&
echo "foo (); " > x &&
- ! git diff --check
+ test_must_fail git diff --check
'
@@ -299,7 +299,7 @@ test_expect_success 'check space before tab in indent (space-before-tab: on)' '
# indent contains space followed by HT
git config core.whitespace "space-before-tab" &&
echo " foo (); " > x &&
- ! git diff --check
+ test_must_fail git diff --check
'
@@ -315,7 +315,7 @@ test_expect_success 'check spaces as indentation (indent-with-non-tab: on)' '
git config core.whitespace "indent-with-non-tab" &&
echo " foo ();" > x &&
- ! git diff --check
+ test_must_fail git diff --check
'
@@ -323,7 +323,7 @@ test_expect_success 'check tabs and spaces as indentation (indent-with-non-tab:
git config core.whitespace "indent-with-non-tab" &&
echo " foo ();" > x &&
- ! git diff --check
+ test_must_fail git diff --check
'
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 6d3ef6c..833d6cb 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -54,7 +54,7 @@ test_expect_success 'custom pattern' '
test_expect_success 'last regexp must not be negated' '
git config diff.java.funcname "!static" &&
- ! git diff --no-index Beer.java Beer-correct.java
+ test_must_fail git diff --no-index Beer.java Beer-correct.java
'
test_done
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh
index 1b58233..7da0b4b 100755
--- a/t/t4103-apply-binary.sh
+++ b/t/t4103-apply-binary.sh
@@ -48,22 +48,22 @@ test_expect_success 'stat binary diff (copy) -- should not fail.' \
test_expect_success 'check binary diff -- should fail.' \
'git-checkout master &&
- ! git apply --check B.diff'
+ test_must_fail git apply --check B.diff'
test_expect_success 'check binary diff (copy) -- should fail.' \
'git-checkout master &&
- ! git apply --check C.diff'
+ test_must_fail git apply --check C.diff'
test_expect_success \
'check incomplete binary diff with replacement -- should fail.' '
git-checkout master &&
- ! git apply --check --allow-binary-replacement B.diff
+ test_must_fail git apply --check --allow-binary-replacement B.diff
'
test_expect_success \
'check incomplete binary diff with replacement (copy) -- should fail.' '
git-checkout master &&
- ! git apply --check --allow-binary-replacement C.diff
+ test_must_fail git apply --check --allow-binary-replacement C.diff
'
test_expect_success 'check binary diff with replacement.' \
@@ -84,19 +84,19 @@ do_reset () {
test_expect_success 'apply binary diff -- should fail.' \
'do_reset &&
- ! git apply B.diff'
+ test_must_fail git apply B.diff'
test_expect_success 'apply binary diff -- should fail.' \
'do_reset &&
- ! git apply --index B.diff'
+ test_must_fail git apply --index B.diff'
test_expect_success 'apply binary diff (copy) -- should fail.' \
'do_reset &&
- ! git apply C.diff'
+ test_must_fail git apply C.diff'
test_expect_success 'apply binary diff (copy) -- should fail.' \
'do_reset &&
- ! git apply --index C.diff'
+ test_must_fail git apply --index C.diff'
test_expect_success 'apply binary diff without replacement.' \
'do_reset &&
diff --git a/t/t4113-apply-ending.sh b/t/t4113-apply-ending.sh
index d741039..66fa515 100755
--- a/t/t4113-apply-ending.sh
+++ b/t/t4113-apply-ending.sh
@@ -30,7 +30,7 @@ test_expect_success setup \
# test
test_expect_success 'apply at the end' \
- '! git apply --index test-patch'
+ 'test_must_fail git apply --index test-patch'
cat >test-patch <<\EOF
diff a/file b/file
@@ -48,6 +48,6 @@ c'
git update-index file
test_expect_success 'apply at the beginning' \
- '! git apply --index test-patch'
+ 'test_must_fail git apply --index test-patch'
test_done
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index bc98260..476f20b 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -182,7 +182,7 @@ test_expect_success 'am -3 falls back to 3-way merge' '
test_expect_success 'am pauses on conflict' '
git checkout lorem2^^ &&
- ! git am lorem-move.patch &&
+ test_must_fail git am lorem-move.patch &&
test -d .dotest
'
@@ -195,7 +195,7 @@ test_expect_success 'am --skip works' '
test_expect_success 'am --resolved works' '
git checkout lorem2^^ &&
- ! git am lorem-move.patch &&
+ test_must_fail git am lorem-move.patch &&
test -d .dotest &&
echo resolved >>file &&
git add file &&
@@ -212,13 +212,13 @@ test_expect_success 'am takes patches from a Pine mailbox' '
'
test_expect_success 'am fails on mail without patch' '
- ! git am <failmail &&
+ test_must_fail git am <failmail &&
rm -r .dotest/
'
test_expect_success 'am fails on empty patch' '
echo "---" >>failmail &&
- ! git am <failmail &&
+ test_must_fail git am <failmail &&
git am --skip &&
! test -d .dotest
'
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index a64727d..746d61f 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -41,7 +41,7 @@ git commit -q -a -m second
test_expect_success 'nothing recorded without rerere' '
(rm -rf .git/rr-cache; git config rerere.enabled false) &&
- ! git merge first &&
+ test_must_fail git merge first &&
! test -d .git/rr-cache
'
@@ -50,7 +50,7 @@ test_expect_success 'conflicting merge' '
git reset --hard &&
mkdir .git/rr-cache &&
git config --unset rerere.enabled &&
- ! git merge first
+ test_must_fail git merge first
'
sha1=$(sed -e 's/ .*//' .git/rr-cache/MERGE_RR)
@@ -61,7 +61,7 @@ test_expect_success 'rerere.enabled works, too' '
rm -rf .git/rr-cache &&
git config rerere.enabled true &&
git reset --hard &&
- ! git merge first &&
+ test_must_fail git merge first &&
grep ======= $rr/preimage
'
@@ -120,7 +120,7 @@ test_expect_success 'another conflicting merge' '
git checkout -b third master &&
git show second^:a1 | sed "s/To die: t/To die! T/" > a1 &&
git commit -q -a -m third &&
- ! git pull . first
+ test_must_fail git pull . first
'
git show first:a1 | sed 's/To die: t/To die! T/' > expect
@@ -175,7 +175,7 @@ test_expect_success 'file2 added differently in two branches' '
echo Bello > file2 &&
git add file2 &&
git commit -m version2 &&
- ! git merge fourth &&
+ test_must_fail git merge fourth &&
sha1=$(sed -e "s/ .*//" .git/rr-cache/MERGE_RR) &&
rr=.git/rr-cache/$sha1 &&
echo Cello > file2 &&
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 983a393..645583f 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -266,7 +266,7 @@ test_expect_success \
test_expect_success \
'make sure index-pack detects the SHA1 collision' \
- '! git-index-pack -o bad.idx test-3.pack'
+ 'test_must_fail git-index-pack -o bad.idx test-3.pack'
test_expect_success \
'honor pack.packSizeLimit' \
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index ecec591..0639772 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -118,7 +118,7 @@ test_expect_success \
test_expect_success \
'[index v1] 4) confirm that the pack is actually corrupted' \
- '! git fsck --full $commit'
+ 'test_must_fail git fsck --full $commit'
test_expect_success \
'[index v1] 5) pack-objects happily reuses corrupted data' \
@@ -127,7 +127,7 @@ test_expect_success \
test_expect_success \
'[index v1] 6) newly created pack is BAD !' \
- '! git verify-pack -v "test-4-${pack1}.pack"'
+ 'test_must_fail git verify-pack -v "test-4-${pack1}.pack"'
test_expect_success \
'[index v2] 1) stream pack to repository' \
@@ -156,11 +156,11 @@ test_expect_success \
test_expect_success \
'[index v2] 4) confirm that the pack is actually corrupted' \
- '! git fsck --full $commit'
+ 'test_must_fail git fsck --full $commit'
test_expect_success \
'[index v2] 5) pack-objects refuses to reuse corrupted data' \
- '! git pack-objects test-5 <obj-list'
+ 'test_must_fail git pack-objects test-5 <obj-list'
test_expect_success \
'[index v2] 6) verify-pack detects CRC mismatch' \
@@ -173,7 +173,8 @@ test_expect_success \
( while read obj
do git cat-file -p $obj >/dev/null || exit 1
done <obj-list ) &&
- err=$(! git verify-pack ".git/objects/pack/pack-${pack1}.pack" 2>&1) &&
+ err=$(test_must_fail git verify-pack \
+ ".git/objects/pack/pack-${pack1}.pack" 2>&1) &&
echo "$err" | grep "CRC mismatch"'
test_done
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index 2fff300..ee769d6 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -61,7 +61,8 @@ EOF
chmod u+x victim/.git/hooks/post-update
test_expect_success push '
- ! git-send-pack --force ./victim/.git master tofail >send.out 2>send.err
+ test_must_fail git-send-pack --force ./victim/.git \
+ master tofail >send.out 2>send.err
'
test_expect_success 'updated as expected' '
diff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh
index 64fe261..c240035 100755
--- a/t/t5404-tracking-branches.sh
+++ b/t/t5404-tracking-branches.sh
@@ -35,7 +35,9 @@ test_expect_success 'prepare pushable branches' '
git commit -a -m aa-master
'
-test_expect_success 'mixed-success push returns error' '! git push'
+test_expect_success 'mixed-success push returns error' '
+ test_must_fail git push
+'
test_expect_success 'check tracking branches updated correctly after push' '
test "$(git rev-parse origin/master)" = "$(git rev-parse master)"
diff --git a/t/t5406-remote-rejects.sh b/t/t5406-remote-rejects.sh
index 46b2cb4..59e80a5 100755
--- a/t/t5406-remote-rejects.sh
+++ b/t/t5406-remote-rejects.sh
@@ -17,7 +17,7 @@ test_expect_success 'setup' '
git commit -a -m 2
'
-test_expect_success 'push reports error' '! git push 2>stderr'
+test_expect_success 'push reports error' 'test_must_fail git push 2>stderr'
test_expect_success 'individual ref reports error' 'grep rejected stderr'
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 140e874..362cf7e 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -177,6 +177,6 @@ test_expect_success "clone shallow object count" \
"test \"count: 18\" = \"$(grep count count.shallow)\""
test_expect_success "pull in shallow repo with missing merge base" \
- "(cd shallow && ! git pull --depth 4 .. A)"
+ "(cd shallow && test_must_fail git pull --depth 4 .. A)"
test_done
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 1e192a2..be9ee93 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -164,7 +164,7 @@ test_expect_success 'prune' '
git fetch origin &&
git remote prune origin &&
git rev-parse refs/remotes/origin/side2 &&
- ! git rev-parse refs/remotes/origin/side)
+ test_must_fail git rev-parse refs/remotes/origin/side)
'
cat > test/expect << EOF
@@ -179,7 +179,7 @@ test_expect_success 'prune --dry-run' '
(cd test &&
git remote prune --dry-run origin > output &&
git rev-parse refs/remotes/origin/side2 &&
- ! git rev-parse refs/remotes/origin/side &&
+ test_must_fail git rev-parse refs/remotes/origin/side &&
(cd ../one &&
git branch -m side side2) &&
test_cmp expect output)
@@ -194,10 +194,10 @@ test_expect_success 'add --mirror && prune' '
git branch -m side2 side) &&
(cd mirror &&
git rev-parse --verify refs/heads/side2 &&
- ! git rev-parse --verify refs/heads/side &&
+ test_must_fail git rev-parse --verify refs/heads/side &&
git fetch origin &&
git remote prune origin &&
- ! git rev-parse --verify refs/heads/side2 &&
+ test_must_fail git rev-parse --verify refs/heads/side2 &&
git rev-parse --verify refs/heads/side)
'
@@ -212,10 +212,10 @@ test_expect_success 'add alt && prune' '
git branch -m side side2) &&
(cd alttst &&
git rev-parse --verify refs/remotes/origin/side &&
- ! git rev-parse --verify refs/remotes/origin/side2 &&
+ test_must_fail git rev-parse --verify refs/remotes/origin/side2 &&
git fetch alt &&
git remote prune alt &&
- ! git rev-parse --verify refs/remotes/origin/side &&
+ test_must_fail git rev-parse --verify refs/remotes/origin/side &&
git rev-parse --verify refs/remotes/origin/side2)
'
@@ -320,7 +320,7 @@ test_expect_success '"remote show" does not show symbolic refs' '
test_expect_success 'reject adding remote with an invalid name' '
- ! git remote add some:url desired-name
+ test_must_fail git remote add some:url desired-name
'
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index df7750f..13d1d82 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -104,7 +104,7 @@ test_expect_success 'fetch must not resolve short tag name' '
cd five &&
git init &&
- ! git fetch .. anno:five
+ test_must_fail git fetch .. anno:five
'
@@ -117,7 +117,7 @@ test_expect_success 'fetch must not resolve short remote name' '
cd six &&
git init &&
- ! git fetch .. six:six
+ test_must_fail git fetch .. six:six
'
@@ -143,7 +143,7 @@ test_expect_success 'create bundle 2' '
test_expect_success 'unbundle 1' '
cd "$D/bundle" &&
git checkout -b some-branch &&
- ! git fetch "$D/bundle1" master:master
+ test_must_fail git fetch "$D/bundle1" master:master
'
test_expect_success 'bundle 1 has only 3 files ' '
@@ -236,7 +236,7 @@ test_expect_success 'fetch with a non-applying branch.<name>.merge' '
# the strange name is: a\!'b
test_expect_success 'quoting of a strangely named repo' '
- ! git fetch "a\\!'\''b" > result 2>&1 &&
+ test_must_fail git fetch "a\\!'\''b" > result 2>&1 &&
cat result &&
grep "fatal: '\''a\\\\!'\''b'\''" result
'
@@ -264,7 +264,7 @@ test_expect_success 'explicit fetch should not update tracking' '
git fetch origin master &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" = "$n" &&
- ! git rev-parse --verify refs/remotes/origin/side
+ test_must_fail git rev-parse --verify refs/remotes/origin/side
)
'
@@ -278,7 +278,7 @@ test_expect_success 'explicit pull should not update tracking' '
git pull origin master &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" = "$n" &&
- ! git rev-parse --verify refs/remotes/origin/side
+ test_must_fail git rev-parse --verify refs/remotes/origin/side
)
'
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 6805032..f0030ad 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -178,7 +178,7 @@ test_expect_success 'failed (non-fast-forward) push with matching heads' '
mk_test heads/master &&
git push testrepo : &&
git commit --amend -massaged &&
- ! git push testrepo &&
+ test_must_fail git push testrepo &&
check_push_result $the_commit heads/master &&
git reset --hard $the_commit
@@ -374,7 +374,7 @@ test_expect_success 'push with +HEAD' '
# Without force rewinding should fail
git reset --hard HEAD^ &&
- ! git push testrepo HEAD &&
+ test_must_fail git push testrepo HEAD &&
check_push_result $the_commit heads/local &&
# With force rewinding should succeed
@@ -448,7 +448,7 @@ test_expect_success 'push does not update local refs on failure' '
git clone parent child &&
(cd child &&
echo two >foo && git commit -a -m two &&
- ! git push &&
+ test_must_fail git push &&
test $(git rev-parse master) != \
$(git rev-parse remotes/origin/master))
@@ -459,7 +459,7 @@ test_expect_success 'allow deleting an invalid remote ref' '
pwd &&
rm -f testrepo/.git/objects/??/* &&
git push testrepo :refs/heads/master &&
- (cd testrepo && ! git rev-parse --verify refs/heads/master)
+ (cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)
'
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh
index 8b05091..1a15817 100755
--- a/t/t5530-upload-pack-error.sh
+++ b/t/t5530-upload-pack-error.sh
@@ -27,7 +27,7 @@ test_expect_success 'setup and corrupt repository' '
'
test_expect_success 'fsck fails' '
- ! git fsck
+ test_must_fail git fsck
'
test_expect_success 'upload-pack fails due to error in pack-objects' '
@@ -46,7 +46,7 @@ test_expect_success 'corrupt repo differently' '
'
test_expect_success 'fsck fails' '
- ! git fsck
+ test_must_fail git fsck
'
test_expect_success 'upload-pack fails due to error in rev-list' '
@@ -66,7 +66,7 @@ test_expect_success 'create empty repository' '
test_expect_success 'fetch fails' '
- ! git fetch .. master
+ test_must_fail git fetch .. master
'
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index 21dbb55..f8c17cd 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -73,7 +73,7 @@ test_expect_failure 'create and delete remote branch' '
git push origin :dev &&
git branch -d -r origin/dev &&
git fetch &&
- ! git show-ref --verify refs/remotes/origin/dev
+ test_must_fail git show-ref --verify refs/remotes/origin/dev
'
stop_httpd
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index acf34ce..3c013e2 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -13,7 +13,7 @@ remove the directory before attempting a clone again.'
test_expect_success \
'clone of non-existent source should fail' \
- '! git-clone foo bar'
+ 'test_must_fail git-clone foo bar'
test_expect_success \
'failed clone should not leave a directory' \
@@ -29,7 +29,7 @@ test_create_repo foo
# current path not to the target dir
test_expect_success \
'clone of non-existent (relative to $PWD) source should fail' \
- '! git-clone ../foo baz'
+ 'test_must_fail git-clone ../foo baz'
test_expect_success \
'clone should work now that source exists' \
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index 74e9e66..f674c48 100755
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
@@ -67,7 +67,7 @@ test_expect_success "merge result added missing LF" \
cp test.txt backup.txt
test_expect_success "merge with conflicts" \
- "! git merge-file test.txt orig.txt new3.txt"
+ "test_must_fail git merge-file test.txt orig.txt new3.txt"
cat > expect.txt << EOF
<<<<<<< test.txt
@@ -90,7 +90,7 @@ test_expect_success "expected conflict markers" "test_cmp test.txt expect.txt"
cp backup.txt test.txt
test_expect_success "merge with conflicts, using -L" \
- "! git merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
+ "test_must_fail git merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
cat > expect.txt << EOF
<<<<<<< 1
@@ -114,7 +114,7 @@ test_expect_success "expected conflict markers, with -L" \
sed "s/ tu / TU /" < new1.txt > new5.txt
test_expect_success "conflict in removed tail" \
- "! git merge-file -p orig.txt new1.txt new5.txt > out"
+ "test_must_fail git merge-file -p orig.txt new1.txt new5.txt > out"
cat > expect << EOF
Dominus regit me,
@@ -135,7 +135,8 @@ EOF
test_expect_success "expected conflict markers" "test_cmp expect out"
test_expect_success 'binary files cannot be merged' '
- ! git merge-file -p orig.txt ../test4012.png new1.txt 2> merge.err &&
+ test_must_fail git merge-file -p \
+ orig.txt ../test4012.png new1.txt 2> merge.err &&
grep "Cannot merge binary files" merge.err
'
@@ -144,7 +145,7 @@ sed -e "s/deerit.$/deerit,/" -e "s/me;$/me,/" < new5.txt > new7.txt
test_expect_success 'MERGE_ZEALOUS simplifies non-conflicts' '
- ! git merge-file -p new6.txt new5.txt new7.txt > output &&
+ test_must_fail git merge-file -p new6.txt new5.txt new7.txt > output &&
test 1 = $(grep ======= < output | wc -l)
'
@@ -154,7 +155,8 @@ sed -e 's/deerit./&\n\n\n\n/' -e "s/locavit,/locavit --/" < new7.txt > new9.txt
test_expect_success 'ZEALOUS_ALNUM' '
- ! git merge-file -p new8.txt new5.txt new9.txt > merge.out &&
+ test_must_fail git merge-file -p \
+ new8.txt new5.txt new9.txt > merge.out &&
test 1 = $(grep ======= < merge.out | wc -l)
'
diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh
index 6a6a130..802d0d0 100755
--- a/t/t6024-recursive-merge.sh
+++ b/t/t6024-recursive-merge.sh
@@ -60,7 +60,9 @@ git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
'
-test_expect_success "combined merge conflicts" "! git merge -m final G"
+test_expect_success "combined merge conflicts" "
+ test_must_fail git merge -m final G
+"
cat > expect << EOF
<<<<<<< HEAD:a1
@@ -90,7 +92,7 @@ test_expect_success 'refuse to merge binary files' '
printf "\0\0" > binary-file &&
git add binary-file &&
git commit -m binary2 &&
- ! git merge F > merge.out 2> merge.err &&
+ test_must_fail git merge F > merge.out 2> merge.err &&
grep "Cannot merge binary files: HEAD:binary-file vs. F:binary-file" \
merge.err
'
diff --git a/t/t6025-merge-symlinks.sh b/t/t6025-merge-symlinks.sh
index 6004deb..fc58456 100755
--- a/t/t6025-merge-symlinks.sh
+++ b/t/t6025-merge-symlinks.sh
@@ -33,7 +33,7 @@ git-commit -m b-file'
test_expect_success \
'merge master into b-symlink, which has a different symbolic link' '
git-checkout b-symlink &&
-! git-merge master'
+test_must_fail git-merge master'
test_expect_success \
'the merge result must be a file' '
@@ -42,7 +42,7 @@ test -f symlink'
test_expect_success \
'merge master into b-file, which has a file instead of a symbolic link' '
git-reset --hard && git-checkout b-file &&
-! git-merge master'
+test_must_fail git-merge master'
test_expect_success \
'the merge result must be a file' '
@@ -52,7 +52,7 @@ test_expect_success \
'merge b-file, which has a file instead of a symbolic link, into master' '
git-reset --hard &&
git-checkout master &&
-! git-merge b-file'
+test_must_fail git-merge b-file'
test_expect_success \
'the merge result must be a file' '
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index 2328b69..efc8313 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -26,7 +26,7 @@ test_expect_success 'final^1^1^1 = final^^^' "test $(git rev-parse final^1^1^1)
test_expect_success 'final^1^2' "test $(git rev-parse start2) = $(git rev-parse final^1^2)"
test_expect_success 'final^1^2 != final^1^1' "test $(git rev-parse final^1^2) != $(git rev-parse final^1^1)"
test_expect_success 'final^1^3 not valid' "if git rev-parse --verify final^1^3; then false; else :; fi"
-test_expect_success '--verify start2^1' '! git rev-parse --verify start2^1'
+test_expect_success '--verify start2^1' 'test_must_fail git rev-parse --verify start2^1'
test_expect_success '--verify start2^0' 'git rev-parse --verify start2^0'
test_expect_success 'repack for next test' 'git repack -a -d'
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index fa382c5..336cfaa 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -80,7 +80,7 @@ test_expect_success \
test_expect_success \
'do not move directory over existing directory' \
- 'mkdir path0 && mkdir path0/path2 && ! git mv path2 path0'
+ 'mkdir path0 && mkdir path0/path2 && test_must_fail git mv path2 path0'
test_expect_success \
'move into "."' \
@@ -149,7 +149,7 @@ test_expect_success 'absolute pathname outside should fail' '(
>sub/file &&
git add sub/file &&
- ! git mv sub "$out/out" &&
+ test_must_fail git mv sub "$out/out" &&
test -d sub &&
! test -d ../in &&
git ls-files --error-unmatch sub/file
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 241c70d..bc7ce2c 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -30,17 +30,17 @@ test_expect_success 'looking for a tag in an empty tree should fail' \
'! (tag_exists mytag)'
test_expect_success 'creating a tag in an empty tree should fail' '
- ! git-tag mynotag &&
+ test_must_fail git-tag mynotag &&
! tag_exists mynotag
'
test_expect_success 'creating a tag for HEAD in an empty tree should fail' '
- ! git-tag mytaghead HEAD &&
+ test_must_fail git-tag mytaghead HEAD &&
! tag_exists mytaghead
'
test_expect_success 'creating a tag for an unknown revision should fail' '
- ! git-tag mytagnorev aaaaaaaaaaa &&
+ test_must_fail git-tag mytagnorev aaaaaaaaaaa &&
! tag_exists mytagnorev
'
@@ -85,16 +85,16 @@ test_expect_success \
test_expect_success \
'trying to create a tag with the name of one existing should fail' \
- '! git tag mytag'
+ 'test_must_fail git tag mytag'
test_expect_success \
'trying to create a tag with a non-valid name should fail' '
test `git-tag -l | wc -l` -eq 1 &&
- ! git tag "" &&
- ! git tag .othertag &&
- ! git tag "other tag" &&
- ! git tag "othertag^" &&
- ! git tag "other~tag" &&
+ test_must_fail git tag "" &&
+ test_must_fail git tag .othertag &&
+ test_must_fail git tag "other tag" &&
+ test_must_fail git tag "othertag^" &&
+ test_must_fail git tag "other~tag" &&
test `git-tag -l | wc -l` -eq 1
'
@@ -107,7 +107,7 @@ test_expect_success 'creating a tag using HEAD directly should succeed' '
test_expect_success 'trying to delete an unknown tag should fail' '
! tag_exists unknown-tag &&
- ! git-tag -d unknown-tag
+ test_must_fail git-tag -d unknown-tag
'
cat >expect <<EOF
@@ -141,13 +141,13 @@ test_expect_success \
'trying to delete two tags, existing and not, should fail in the 2nd' '
tag_exists mytag &&
! tag_exists myhead &&
- ! git-tag -d mytag anothertag &&
+ test_must_fail git-tag -d mytag anothertag &&
! tag_exists mytag &&
! tag_exists myhead
'
test_expect_success 'trying to delete an already deleted tag should fail' \
- '! git-tag -d mytag'
+ 'test_must_fail git-tag -d mytag'
# listing various tags with pattern matching:
@@ -266,15 +266,15 @@ test_expect_success \
'
test_expect_success 'trying to verify an unknown tag should fail' \
- '! git-tag -v unknown-tag'
+ 'test_must_fail git-tag -v unknown-tag'
test_expect_success \
'trying to verify a non-annotated and non-signed tag should fail' \
- '! git-tag -v non-annotated-tag'
+ 'test_must_fail git-tag -v non-annotated-tag'
test_expect_success \
'trying to verify many non-annotated or unknown tags, should fail' \
- '! git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
+ 'test_must_fail git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
# creating annotated tags:
@@ -334,7 +334,7 @@ test_expect_success \
'trying to create a tag with a non-existing -F file should fail' '
! test -f nonexistingfile &&
! tag_exists notag &&
- ! git-tag -F nonexistingfile notag &&
+ test_must_fail git-tag -F nonexistingfile notag &&
! tag_exists notag
'
@@ -343,11 +343,12 @@ test_expect_success \
echo "message file 1" >msgfile1 &&
echo "message file 2" >msgfile2 &&
! tag_exists msgtag &&
- ! git-tag -m "message 1" -F msgfile1 msgtag &&
+ test_must_fail git-tag -m "message 1" -F msgfile1 msgtag &&
! tag_exists msgtag &&
- ! git-tag -F msgfile1 -m "message 1" msgtag &&
+ test_must_fail git-tag -F msgfile1 -m "message 1" msgtag &&
! tag_exists msgtag &&
- ! git-tag -m "message 1" -F msgfile1 -m "message 2" msgtag &&
+ test_must_fail git-tag -m "message 1" -F msgfile1 \
+ -m "message 2" msgtag &&
! tag_exists msgtag
'
@@ -591,19 +592,19 @@ fi
test_expect_success \
'trying to verify an annotated non-signed tag should fail' '
tag_exists annotated-tag &&
- ! git-tag -v annotated-tag
+ test_must_fail git-tag -v annotated-tag
'
test_expect_success \
'trying to verify a file-annotated non-signed tag should fail' '
tag_exists file-annotated-tag &&
- ! git-tag -v file-annotated-tag
+ test_must_fail git-tag -v file-annotated-tag
'
test_expect_success \
'trying to verify two annotated non-signed tags should fail' '
tag_exists annotated-tag file-annotated-tag &&
- ! git-tag -v annotated-tag file-annotated-tag
+ test_must_fail git-tag -v annotated-tag file-annotated-tag
'
# creating and verifying signed tags:
@@ -651,13 +652,14 @@ test_expect_success 'sign with a given key id' '
test_expect_success 'sign with an unknown id (1)' '
- ! git tag -u author@example.com -m "Another message" o-signed-tag
+ test_must_fail git tag -u author@example.com \
+ -m "Another message" o-signed-tag
'
test_expect_success 'sign with an unknown id (2)' '
- ! git tag -u DEADBEEF -m "Another message" o-signed-tag
+ test_must_fail git tag -u DEADBEEF -m "Another message" o-signed-tag
'
@@ -718,7 +720,7 @@ test_expect_success \
'trying to create a signed tag with non-existing -F file should fail' '
! test -f nonexistingfile &&
! tag_exists nosigtag &&
- ! git-tag -s -F nonexistingfile nosigtag &&
+ test_must_fail git-tag -s -F nonexistingfile nosigtag &&
! tag_exists nosigtag
'
@@ -730,10 +732,11 @@ test_expect_success 'verifying two signed tags in one command should succeed' \
test_expect_success \
'verifying many signed and non-signed tags should fail' '
- ! git-tag -v signed-tag annotated-tag &&
- ! git-tag -v file-annotated-tag file-signed-tag &&
- ! git-tag -v annotated-tag file-signed-tag file-annotated-tag &&
- ! git-tag -v signed-tag annotated-tag file-signed-tag
+ test_must_fail git-tag -v signed-tag annotated-tag &&
+ test_must_fail git-tag -v file-annotated-tag file-signed-tag &&
+ test_must_fail git-tag -v annotated-tag \
+ file-signed-tag file-annotated-tag &&
+ test_must_fail git-tag -v signed-tag annotated-tag file-signed-tag
'
test_expect_success 'verifying a forged tag should fail' '
@@ -741,7 +744,7 @@ test_expect_success 'verifying a forged tag should fail' '
sed -e "s/signed-tag/forged-tag/" |
git mktag) &&
git tag forged-tag $forged &&
- ! git-tag -v forged-tag
+ test_must_fail git-tag -v forged-tag
'
# blank and empty messages for signed tags:
@@ -1031,7 +1034,7 @@ test_expect_success \
git config user.signingkey BobTheMouse
test_expect_success \
'git-tag -s fails if gpg is misconfigured' \
- '! git tag -s -m tail tag-gpg-failure'
+ 'test_must_fail git tag -s -m tail tag-gpg-failure'
git config --unset user.signingkey
# try to verify without gpg:
@@ -1039,7 +1042,7 @@ git config --unset user.signingkey
rm -rf gpghome
test_expect_success \
'verify signed tag fails when public key is not present' \
- '! git-tag -v signed-tag'
+ 'test_must_fail git-tag -v signed-tag'
test_expect_success \
'git-tag -a fails if tag annotation is empty' '
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index 96d1508..0bfc1e9 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -52,10 +52,10 @@ secondfile:
EOF
test_expect_success 'giving a non existing revision should fail' '
- ! git reset aaaaaa &&
- ! git reset --mixed aaaaaa &&
- ! git reset --soft aaaaaa &&
- ! git reset --hard aaaaaa &&
+ test_must_fail git reset aaaaaa &&
+ test_must_fail git reset --mixed aaaaaa &&
+ test_must_fail git reset --soft aaaaaa &&
+ test_must_fail git reset --hard aaaaaa &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
'
@@ -63,29 +63,29 @@ test_expect_success 'reset --soft with unmerged index should fail' '
touch .git/MERGE_HEAD &&
echo "100644 44c5b5884550c17758737edcced463447b91d42b 1 un" |
git update-index --index-info &&
- ! git reset --soft HEAD &&
+ test_must_fail git reset --soft HEAD &&
rm .git/MERGE_HEAD &&
git rm --cached -- un
'
test_expect_success \
'giving paths with options different than --mixed should fail' '
- ! git reset --soft -- first &&
- ! git reset --hard -- first &&
- ! git reset --soft HEAD^ -- first &&
- ! git reset --hard HEAD^ -- first &&
+ test_must_fail git reset --soft -- first &&
+ test_must_fail git reset --hard -- first &&
+ test_must_fail git reset --soft HEAD^ -- first &&
+ test_must_fail git reset --hard HEAD^ -- first &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
'
test_expect_success 'giving unrecognized options should fail' '
- ! git reset --other &&
- ! git reset -o &&
- ! git reset --mixed --other &&
- ! git reset --mixed -o &&
- ! git reset --soft --other &&
- ! git reset --soft -o &&
- ! git reset --hard --other &&
- ! git reset --hard -o &&
+ test_must_fail git reset --other &&
+ test_must_fail git reset -o &&
+ test_must_fail git reset --mixed --other &&
+ test_must_fail git reset --mixed -o &&
+ test_must_fail git reset --soft --other &&
+ test_must_fail git reset --soft -o &&
+ test_must_fail git reset --hard --other &&
+ test_must_fail git reset --hard -o &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
'
@@ -102,8 +102,8 @@ test_expect_success \
echo "3rd line in branch2" >>secondfile &&
git commit -a -m "change in branch2" &&
- ! git merge branch1 &&
- ! git reset --soft &&
+ test_must_fail git merge branch1 &&
+ test_must_fail git reset --soft &&
printf "1st line 2nd file\n2nd line 2nd file\n3rd line" >secondfile &&
git commit -a -m "the change in branch2" &&
@@ -126,7 +126,7 @@ test_expect_success \
echo "3rd line in branch4" >>secondfile &&
git checkout -m branch3 &&
- ! git reset --soft &&
+ test_must_fail git reset --soft &&
printf "1st line 2nd file\n2nd line 2nd file\n3rd line" >secondfile &&
git commit -a -m "the line in branch3" &&
@@ -326,7 +326,7 @@ test_expect_success '--hard reset to HEAD should clear a failed merge' '
echo "3rd line in branch2" >>secondfile &&
git commit -a -m "change in branch2" &&
- ! git pull . branch1 &&
+ test_must_fail git pull . branch1 &&
git reset --hard &&
check_changes 77abb337073fb4369a7ad69ff6f5ec0e4d6b54bb
'
@@ -388,7 +388,7 @@ test_expect_success 'test --mixed <paths>' '
echo 4 > file4 &&
echo 5 > file1 &&
git add file1 file3 file4 &&
- ! git reset HEAD -- file1 file2 file3 &&
+ test_must_fail git reset HEAD -- file1 file2 file3 &&
git diff > output &&
test_cmp output expect &&
git diff --cached > output &&
@@ -402,11 +402,11 @@ test_expect_success 'test resetting the index at give paths' '
>sub/file2 &&
git update-index --add sub/file1 sub/file2 &&
T=$(git write-tree) &&
- ! git reset HEAD sub/file2 &&
+ test_must_fail git reset HEAD sub/file2 &&
U=$(git write-tree) &&
echo "$T" &&
echo "$U" &&
- ! git diff-index --cached --exit-code "$T" &&
+ test_must_fail git diff-index --cached --exit-code "$T" &&
test "$T" != "$U"
'
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index b25a77f..cdecebe 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -17,7 +17,7 @@ test_expect_success 'setup bare' '
'
test_expect_success 'hard reset is not allowed' '
- ! git reset --hard HEAD^
+ test_must_fail git reset --hard HEAD^
'
test_expect_success 'soft reset is allowed' '
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index bd77239..2b51c0d 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -316,14 +316,14 @@ test_expect_success 'git-clean -d -X' '
test_expect_success 'clean.requireForce defaults to true' '
git config --unset clean.requireForce &&
- ! git-clean
+ test_must_fail git clean
'
test_expect_success 'clean.requireForce' '
git config clean.requireForce true &&
- ! git-clean
+ test_must_fail git clean
'
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 6c7b902..cbc0c34 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -75,7 +75,7 @@ test_expect_success 'init should register submodule url in .git/config' '
then
echo "[OOPS] init succeeded but submodule url is wrong"
false
- elif ! git config submodule.example.url ./.subrepo
+ elif test_must_fail git config submodule.example.url ./.subrepo
then
echo "[OOPS] init succeeded but update of url failed"
false
diff --git a/t/t7402-submodule-rebase.sh b/t/t7402-submodule-rebase.sh
index 5becb3e..f919c8d 100755
--- a/t/t7402-submodule-rebase.sh
+++ b/t/t7402-submodule-rebase.sh
@@ -71,7 +71,7 @@ test_expect_success 'rebase with dirty file and submodule fails' '
test_tick &&
git commit -m rewrite file &&
echo dirty > file &&
- ! git rebase --onto HEAD~2 HEAD^
+ test_must_fail git rebase --onto HEAD~2 HEAD^
'
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index baed6ce..d89f91a 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -23,12 +23,12 @@ test_expect_success 'a basic commit in an empty tree should succeed' '
test_expect_success 'nonexistent template file should return error' '
echo changes >> foo &&
git add foo &&
- ! git commit --template "$PWD"/notexist
+ test_must_fail git commit --template "$PWD"/notexist
'
test_expect_success 'nonexistent template file in config should return error' '
git config commit.template "$PWD"/notexist &&
- ! git commit &&
+ test_must_fail git commit &&
git config --unset commit.template
'
@@ -37,12 +37,12 @@ TEMPLATE="$PWD"/template
test_expect_success 'unedited template should not commit' '
echo "template line" > "$TEMPLATE" &&
- ! git commit --template "$TEMPLATE"
+ test_must_fail git commit --template "$TEMPLATE"
'
test_expect_success 'unedited template with comments should not commit' '
echo "# comment in template" >> "$TEMPLATE" &&
- ! git commit --template "$TEMPLATE"
+ test_must_fail git commit --template "$TEMPLATE"
'
test_expect_success 'a Signed-off-by line by itself should not commit' '
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index d3370ff..0edd9dd 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -19,7 +19,7 @@ test_expect_success \
test_expect_success \
"fail initial amend" \
- "! git-commit --amend"
+ "test_must_fail git-commit --amend"
test_expect_success \
"initial commit" \
@@ -27,16 +27,16 @@ test_expect_success \
test_expect_success \
"invalid options 1" \
- "! git-commit -m foo -m bar -F file"
+ "test_must_fail git-commit -m foo -m bar -F file"
test_expect_success \
"invalid options 2" \
- "! git-commit -C HEAD -m illegal"
+ "test_must_fail git-commit -C HEAD -m illegal"
test_expect_success \
"using paths with -a" \
"echo King of the bongo >file &&
- ! git-commit -m foo -a file"
+ test_must_fail git-commit -m foo -a file"
test_expect_success \
"using paths with --interactive" \
@@ -45,11 +45,11 @@ test_expect_success \
test_expect_success \
"using invalid commit with -C" \
- "! git-commit -C bogus"
+ "test_must_fail git-commit -C bogus"
test_expect_success \
"testing nothing to commit" \
- "! git-commit -m initial"
+ "test_must_fail git-commit -m initial"
test_expect_success \
"next commit" \
@@ -59,7 +59,7 @@ test_expect_success \
test_expect_success \
"commit message from non-existing file" \
"echo 'more bongo: bongo bongo bongo bongo' >file && \
- ! git-commit -F gah -a"
+ test_must_fail git-commit -F gah -a"
# Empty except stray tabs and spaces on a few lines.
sed -e 's/@$//' >msg <<EOF
@@ -70,7 +70,7 @@ Signed-off-by: hula
EOF
test_expect_success \
"empty commit message" \
- "! git-commit -F msg -a"
+ "test_must_fail git-commit -F msg -a"
test_expect_success \
"commit message from file" \
@@ -91,7 +91,7 @@ test_expect_success \
test_expect_success \
"passing -m and -F" \
"echo 'enough with the bongos' >file && \
- ! git-commit -F msg -m amending ."
+ test_must_fail git-commit -F msg -m amending ."
test_expect_success \
"using message from other commit" \
diff --git a/t/t7503-pre-commit-hook.sh b/t/t7503-pre-commit-hook.sh
index 2dd5a5e..b069095 100755
--- a/t/t7503-pre-commit-hook.sh
+++ b/t/t7503-pre-commit-hook.sh
@@ -56,7 +56,7 @@ test_expect_success 'with failing hook' '
echo "another" >> file &&
git add file &&
- ! git commit -m "another"
+ test_must_fail git commit -m "another"
'
diff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh
index 88577af..47680e6 100755
--- a/t/t7504-commit-msg-hook.sh
+++ b/t/t7504-commit-msg-hook.sh
@@ -105,7 +105,7 @@ test_expect_success 'with failing hook' '
echo "another" >> file &&
git add file &&
- ! git commit -m "another"
+ test_must_fail git commit -m "another"
'
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index d21cd29..7d182b5 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -126,7 +126,7 @@ verify_merge() {
echo "[OOPS] unmerged files"
false
fi &&
- if ! git diff --exit-code
+ if test_must_fail git diff --exit-code
then
echo "[OOPS] working tree != index"
false
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 6b0483f..9285071 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -35,7 +35,7 @@ test_expect_success 'custom mergetool' '
git config mergetool.mytool.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
git config mergetool.mytool.trustExitCode true &&
git checkout branch1 &&
- ! git merge master >/dev/null 2>&1 &&
+ test_must_fail git merge master >/dev/null 2>&1 &&
( yes "" | git mergetool file1>/dev/null 2>&1 ) &&
( yes "" | git mergetool file2>/dev/null 2>&1 ) &&
test "$(cat file1)" = "master updated" &&
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 3bc6164..843a501 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -63,7 +63,7 @@ test_expect_success "$name" "
git update-index --remove dir/file &&
git update-index --add dir/file/file &&
git commit -m '$name' &&
- ! git-svn set-tree --find-copies-harder --rmdir \
+ test_must_fail git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch" || true
@@ -77,7 +77,7 @@ test_expect_success "$name" '
git update-index --remove -- bar/zzz &&
git update-index --add -- bar &&
git commit -m "$name" &&
- ! git-svn set-tree --find-copies-harder --rmdir \
+ test_must_fail git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch2' || true
@@ -91,7 +91,7 @@ test_expect_success "$name" '
echo yyy > bar/zzz/yyy &&
git update-index --add bar/zzz/yyy &&
git commit -m "$name" &&
- ! git-svn set-tree --find-copies-harder --rmdir \
+ test_must_fail git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch3' || true
@@ -105,7 +105,7 @@ test_expect_success "$name" '
echo asdf > dir &&
git update-index --add -- dir &&
git commit -m "$name" &&
- ! git-svn set-tree --find-copies-harder --rmdir \
+ test_must_fail git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch4' || true
@@ -216,7 +216,7 @@ test_expect_success "$name" "test_cmp a expected"
test_expect_success 'exit if remote refs are ambigious' "
git config --add svn-remote.svn.fetch \
bar:refs/remotes/git-svn &&
- ! git-svn migrate
+ test_must_fail git-svn migrate
"
test_expect_success 'exit if init-ing a would clobber a URL' '
@@ -224,7 +224,7 @@ test_expect_success 'exit if init-ing a would clobber a URL' '
svn mkdir -m "mkdir bar" "${svnrepo}2/bar" &&
git config --unset svn-remote.svn.fetch \
"^bar:refs/remotes/git-svn$" &&
- ! git-svn init "${svnrepo}2/bar"
+ test_must_fail git-svn init "${svnrepo}2/bar"
'
test_expect_success \
diff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh
index 58a3a7b..a57ff68 100755
--- a/t/t9106-git-svn-commit-diff-clobber.sh
+++ b/t/t9106-git-svn-commit-diff-clobber.sh
@@ -27,7 +27,7 @@ test_expect_success 'commit change from svn side' '
test_expect_success 'commit conflicting change from git' '
echo second line from git >> file &&
git commit -a -m "second line from git" &&
- ! git-svn commit-diff -r1 HEAD~1 HEAD "$svnrepo"
+ test_must_fail git-svn commit-diff -r1 HEAD~1 HEAD "$svnrepo"
'
test_expect_success 'commit complementing change from git' '
@@ -52,7 +52,7 @@ test_expect_success 'dcommit fails to commit because of conflict' '
rm -rf t.svn &&
echo "fourth line from git" >> file &&
git commit -a -m "fourth line from git" &&
- ! git-svn dcommit
+ test_must_fail git-svn dcommit
'
test_expect_success 'dcommit does the svn equivalent of an index merge' "
@@ -83,7 +83,7 @@ test_expect_success 'multiple dcommit from git-svn will not clobber svn' "
git commit -a -m 'new file' &&
echo clobber > file &&
git commit -a -m 'clobber' &&
- ! git svn dcommit
+ test_must_fail git svn dcommit
"
diff --git a/t/t9106-git-svn-dcommit-clobber-series.sh b/t/t9106-git-svn-dcommit-clobber-series.sh
index f8f4718..bc37db9 100755
--- a/t/t9106-git-svn-dcommit-clobber-series.sh
+++ b/t/t9106-git-svn-dcommit-clobber-series.sh
@@ -57,7 +57,7 @@ test_expect_success 'change file but in unrelated area' "
test_expect_success 'attempt to dcommit with a dirty index' '
echo foo >>file &&
git add file &&
- ! git svn dcommit
+ test_must_fail git svn dcommit
'
test_done
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index b1dc32d..3e32e84 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -100,7 +100,7 @@ test_expect_success \
git commit -a -m "generation 2" &&
id=$(git rev-list --max-count=1 HEAD) &&
(cd "$CVSWORK" &&
- ! git cvsexportcommit -c $id
+ test_must_fail git cvsexportcommit -c $id
)'
#test_expect_success \
@@ -112,7 +112,7 @@ test_expect_success \
# git commit -a -m "generation 3" &&
# id=$(git rev-list --max-count=1 HEAD) &&
# (cd "$CVSWORK" &&
-# ! git cvsexportcommit -c $id
+# test_must_fail git cvsexportcommit -c $id
# )'
# We reuse the state from two tests back here
@@ -222,7 +222,7 @@ test_expect_success \
git commit -a -m "Update two" &&
id=$(git rev-list --max-count=1 HEAD) &&
(cd "$CVSWORK" &&
- ! git-cvsexportcommit -c $id
+ test_must_fail git-cvsexportcommit -c $id
)'
case "$(git config --bool core.filemode)" in
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 5edf56f..e17afa8 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -166,7 +166,7 @@ M 755 0000000000000000000000000000000000000001 zero1
INPUT_END
test_expect_success 'B: fail on invalid blob sha1' '
- ! git-fast-import <input
+ test_must_fail git-fast-import <input
'
rm -f .git/objects/pack_* .git/objects/index_*
@@ -181,7 +181,7 @@ from refs/heads/master
INPUT_END
test_expect_success 'B: fail on invalid branch name ".badbranchname"' '
- ! git-fast-import <input
+ test_must_fail git-fast-import <input
'
rm -f .git/objects/pack_* .git/objects/index_*
@@ -196,7 +196,7 @@ from refs/heads/master
INPUT_END
test_expect_success 'B: fail on invalid branch name "bad[branch]name"' '
- ! git-fast-import <input
+ test_must_fail git-fast-import <input
'
rm -f .git/objects/pack_* .git/objects/index_*
@@ -340,7 +340,7 @@ from refs/heads/branch^0
INPUT_END
test_expect_success 'E: rfc2822 date, --date-format=raw' '
- ! git-fast-import --date-format=raw <input
+ test_must_fail git-fast-import --date-format=raw <input
'
test_expect_success \
'E: rfc2822 date, --date-format=rfc2822' \
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index f1bc5ce..0959f2f 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -59,7 +59,7 @@ test_expect_success 'fast-export master~2..master' '
test $MASTER != $(git rev-parse --verify refs/heads/partial) &&
git diff master..partial &&
git diff master^..partial^ &&
- ! git rev-parse partial~2)
+ test_must_fail git rev-parse partial~2)
'
@@ -125,7 +125,7 @@ test_expect_success 'set up faked signed tag' '
test_expect_success 'signed-tags=abort' '
- ! git fast-export --signed-tags=abort sign-your-name
+ test_must_fail git fast-export --signed-tags=abort sign-your-name
'
--
1.5.6.2.303.g79662
^ permalink raw reply related [relevance 2%]
* [PATCH] git-mv: Keep moved index entries inact
@ 2008-07-17 22:31 8% ` Petr Baudis
2008-07-19 23:54 0% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Petr Baudis @ 2008-07-17 22:31 UTC (permalink / raw)
To: git; +Cc: gitster
The rewrite of git-mv from a shell script to a builtin was perhaps
a little too straightforward: the git add and git rm queues were
emulated directly, which resulted in a rather complicated code and
caused an inconsistent behaviour when moving dirty index entries;
git mv would update the entry based on working tree state,
except in case of overwrites, where the new entry would still have
sha1 of the old file.
This patch introduces rename_index_entry_at() into the index toolkit,
which will rename an entry while removing any entries the new entry
might render duplicate. This is then used in git mv instead
of all the file queues, resulting in a major simplification
of the code and an inevitable change in git mv -n output format.
A new test has been added to the testsuite to reflect this change.
Also, based on suggestion by Junio about desired symlink behaviour
of git mv, I have added two tests for that; however, I do not have
need or desire to spend time fixing this, so they are expected
to fail for now until someone gets around to fixing that.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
This patch might depend on git-mv: Remove dead code branch.
builtin-mv.c | 62 ++++++++-------------------------------------------------
cache.h | 2 ++
read-cache.c | 15 ++++++++++++++
t/t7001-mv.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 83 insertions(+), 53 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 33ad082..28ebc9c 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -36,17 +36,6 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec,
return get_pathspec(prefix, result);
}
-static void show_list(const char *label, struct path_list *list)
-{
- if (list->nr > 0) {
- int i;
- printf("%s", label);
- for (i = 0; i < list->nr; i++)
- printf("%s%s", i > 0 ? ", " : "", list->items[i].path);
- putchar('\n');
- }
-}
-
static const char *add_slash(const char *path)
{
int len = strlen(path);
@@ -75,11 +64,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
const char **source, **destination, **dest_path;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
- struct path_list overwritten = {NULL, 0, 0, 0};
struct path_list src_for_dst = {NULL, 0, 0, 0};
- struct path_list added = {NULL, 0, 0, 0};
- struct path_list deleted = {NULL, 0, 0, 0};
- struct path_list changed = {NULL, 0, 0, 0};
git_config(git_default_config, NULL);
@@ -189,7 +174,6 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
" will overwrite!\n",
bad);
bad = NULL;
- path_list_insert(dst, &overwritten);
} else
bad = "Cannot overwrite";
}
@@ -218,6 +202,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
for (i = 0; i < argc; i++) {
const char *src = source[i], *dst = destination[i];
enum update_mode mode = modes[i];
+ int pos;
if (show_only || verbose)
printf("Renaming %s to %s\n", src, dst);
if (!show_only && mode != INDEX &&
@@ -227,45 +212,16 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
if (mode == WORKING_DIRECTORY)
continue;
- assert(cache_name_pos(src, strlen(src)) >= 0);
-
- path_list_insert(src, &deleted);
- /* destination can be a directory with 1 file inside */
- if (path_list_has_path(&overwritten, dst))
- path_list_insert(dst, &changed);
- else
- path_list_insert(dst, &added);
+ pos = cache_name_pos(src, strlen(src));
+ assert(pos >= 0);
+ if (!show_only)
+ rename_cache_entry_at(pos, dst);
}
- if (show_only) {
- show_list("Changed : ", &changed);
- show_list("Adding : ", &added);
- show_list("Deleting : ", &deleted);
- } else {
- for (i = 0; i < changed.nr; i++) {
- const char *path = changed.items[i].path;
- int j = cache_name_pos(path, strlen(path));
- struct cache_entry *ce = active_cache[j];
-
- if (j < 0)
- die ("Huh? Cache entry for %s unknown?", path);
- refresh_cache_entry(ce, 0);
- }
-
- for (i = 0; i < added.nr; i++) {
- const char *path = added.items[i].path;
- if (add_file_to_cache(path, verbose ? ADD_CACHE_VERBOSE : 0))
- die("updating index entries failed");
- }
-
- for (i = 0; i < deleted.nr; i++)
- remove_file_from_cache(deleted.items[i].path);
-
- if (active_cache_changed) {
- if (write_cache(newfd, active_cache, active_nr) ||
- commit_locked_index(&lock_file))
- die("Unable to write new index file");
- }
+ if (active_cache_changed) {
+ if (write_cache(newfd, active_cache, active_nr) ||
+ commit_locked_index(&lock_file))
+ die("Unable to write new index file");
}
return 0;
diff --git a/cache.h b/cache.h
index a779d92..6f1d003 100644
--- a/cache.h
+++ b/cache.h
@@ -260,6 +260,7 @@ static inline void remove_name_hash(struct cache_entry *ce)
#define unmerged_cache() unmerged_index(&the_index)
#define cache_name_pos(name, namelen) index_name_pos(&the_index,(name),(namelen))
#define add_cache_entry(ce, option) add_index_entry(&the_index, (ce), (option))
+#define rename_cache_entry_at(pos, new_name) rename_index_entry_at(&the_index, (pos), (new_name))
#define remove_cache_entry_at(pos) remove_index_entry_at(&the_index, (pos))
#define remove_file_from_cache(path) remove_file_from_index(&the_index, (path))
#define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags))
@@ -370,6 +371,7 @@ extern int index_name_pos(const struct index_state *, const char *name, int name
#define ADD_CACHE_JUST_APPEND 8 /* Append only; tree.c::read_tree() */
extern int add_index_entry(struct index_state *, struct cache_entry *ce, int option);
extern struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really);
+extern void rename_index_entry_at(struct index_state *, int pos, const char *new_name);
extern int remove_index_entry_at(struct index_state *, int pos);
extern int remove_file_from_index(struct index_state *, const char *path);
#define ADD_CACHE_VERBOSE 1
diff --git a/read-cache.c b/read-cache.c
index 1648428..70e5f57 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -38,6 +38,21 @@ static void replace_index_entry(struct index_state *istate, int nr, struct cache
istate->cache_changed = 1;
}
+void rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
+{
+ struct cache_entry *old = istate->cache[nr], *new;
+ int namelen = strlen(new_name);
+
+ new = xmalloc(cache_entry_size(namelen));
+ copy_cache_entry(new, old);
+ new->ce_flags = (new->ce_flags & ~CE_NAMEMASK) | namelen;
+ memcpy(new->name, new_name, namelen);
+
+ cache_tree_invalidate_path(istate->cache_tree, old->name);
+ remove_index_entry_at(istate, nr);
+ add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
+}
+
/*
* This only updates the "non-critical" parts of the directory
* cache, ie the parts that aren't tracked by GIT, and only used
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 336cfaa..6b615f8 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -156,4 +156,61 @@ test_expect_success 'absolute pathname outside should fail' '(
)'
+# git mv meets angry Git maintainer
+
+test_expect_success 'git mv should not change sha1 of moved cache entry' '
+
+ rm -fr .git &&
+ git init &&
+ echo 1 >dirty &&
+ git add dirty &&
+ entry="$(git ls-files --stage dirty | cut -f 1)"
+ git mv dirty dirty2 &&
+ [ "$entry" = "$(git ls-files --stage dirty2 | cut -f 1)" ] &&
+ echo 2 >dirty2 &&
+ git mv dirty2 dirty &&
+ [ "$entry" = "$(git ls-files --stage dirty | cut -f 1)" ]
+
+'
+
+rm -f dirty dirty2
+
+test_expect_failure 'git mv should overwrite symlink to a file' '
+
+ rm -fr .git &&
+ git init &&
+ echo 1 >moved &&
+ ln -s moved symlink &&
+ git add moved symlink &&
+ ! git mv moved symlink &&
+ git mv -f moved symlink &&
+ [ ! -e moved ] &&
+ [ -f symlink ] &&
+ [ $(cat symlink) = 1 ] &&
+ git diff-files --quiet
+
+'
+
+rm -f moved symlink
+
+test_expect_failure 'git mv should follow symlink to a directory' '
+
+ rm -fr .git &&
+ git init &&
+ echo 1 >moved &&
+ mkdir -p dir &&
+ touch dir/.keep &&
+ ln -s dir symlink &&
+ git add moved dir/.keep symlink &&
+ git mv moved symlink &&
+ [ ! -e moved ] &&
+ [ -f symlink/moved ] &&
+ [ $(cat symlink/moved) = 1 ] &&
+ [ "$(ls dir)" = "$(ls symlink)" ] &&
+ git diff-files --quiet
+
+'
+
+rm -rf moved symlink dir
+
test_done
^ permalink raw reply related [relevance 8%]
* Re: [PATCH] git-mv: Keep moved index entries inact
2008-07-17 22:31 8% ` [PATCH] git-mv: Keep moved index entries inact Petr Baudis
@ 2008-07-19 23:54 0% ` Junio C Hamano
2008-07-21 0:23 0% ` Petr Baudis
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2008-07-19 23:54 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
Petr Baudis <pasky@suse.cz> writes:
> A new test has been added to the testsuite to reflect this change.
> Also, based on suggestion by Junio about desired symlink behaviour
> of git mv, I have added two tests for that; however, I do not have
> need or desire to spend time fixing this, so they are expected
> to fail for now until someone gets around to fixing that.
Well, somebody would eventually come to help, then ;-).
> builtin-mv.c | 62 ++++++++-------------------------------------------------
> cache.h | 2 ++
> read-cache.c | 15 ++++++++++++++
> t/t7001-mv.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 83 insertions(+), 53 deletions(-)
Very nice code reduction, isn't it?
> diff --git a/read-cache.c b/read-cache.c
> index 1648428..70e5f57 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -38,6 +38,21 @@ static void replace_index_entry(struct index_state *istate, int nr, struct cache
> istate->cache_changed = 1;
> }
>
> +void rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
> +{
> + struct cache_entry *old = istate->cache[nr], *new;
> + int namelen = strlen(new_name);
> +
> + new = xmalloc(cache_entry_size(namelen));
> + copy_cache_entry(new, old);
> + new->ce_flags = (new->ce_flags & ~CE_NAMEMASK) | namelen;
> + memcpy(new->name, new_name, namelen);
> +
> + cache_tree_invalidate_path(istate->cache_tree, old->name);
> + remove_index_entry_at(istate, nr);
> + add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
> +}
Hmm, would this use of copy_cache_entry() kosher, I have to wonder. This
new copy of cache entry begins its life unhashed, doesn't it? Shouldn't
we be not copying its hashed/unhashed bits from the old one?
Also setting of that ce_flags looks wrong when namelen does not fit within
the width of CE_NAMEMASK. Shouldn't it be doing the same thing as
create_ce_flags()?
> diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
> index 336cfaa..6b615f8 100755
> --- a/t/t7001-mv.sh
> +++ b/t/t7001-mv.sh
> @@ -156,4 +156,61 @@ test_expect_success 'absolute pathname outside should fail' '(
>
> )'
>
> +# git mv meets angry Git maintainer
What's this comment about?
> +test_expect_success 'git mv should not change sha1 of moved cache entry' '
> +
> + rm -fr .git &&
> + git init &&
> + echo 1 >dirty &&
> + git add dirty &&
> + entry="$(git ls-files --stage dirty | cut -f 1)"
"rev-parse :dirty"?
^ permalink raw reply [relevance 0%]
* Re: [PATCH] git-mv: Keep moved index entries inact
2008-07-19 23:54 0% ` Junio C Hamano
@ 2008-07-21 0:23 0% ` Petr Baudis
2008-07-21 0:25 8% ` [PATCHv2] " Petr Baudis
0 siblings, 1 reply; 200+ results
From: Petr Baudis @ 2008-07-21 0:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Sat, Jul 19, 2008 at 04:54:20PM -0700, Junio C Hamano wrote:
> Petr Baudis <pasky@suse.cz> writes:
>
> > diff --git a/read-cache.c b/read-cache.c
> > index 1648428..70e5f57 100644
> > --- a/read-cache.c
> > +++ b/read-cache.c
> > @@ -38,6 +38,21 @@ static void replace_index_entry(struct index_state *istate, int nr, struct cache
> > istate->cache_changed = 1;
> > }
> >
> > +void rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
> > +{
> > + struct cache_entry *old = istate->cache[nr], *new;
> > + int namelen = strlen(new_name);
> > +
> > + new = xmalloc(cache_entry_size(namelen));
> > + copy_cache_entry(new, old);
> > + new->ce_flags = (new->ce_flags & ~CE_NAMEMASK) | namelen;
> > + memcpy(new->name, new_name, namelen);
> > +
> > + cache_tree_invalidate_path(istate->cache_tree, old->name);
> > + remove_index_entry_at(istate, nr);
> > + add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
> > +}
>
> Hmm, would this use of copy_cache_entry() kosher, I have to wonder. This
> new copy of cache entry begins its life unhashed, doesn't it? Shouldn't
> we be not copying its hashed/unhashed bits from the old one?
>
> Also setting of that ce_flags looks wrong when namelen does not fit within
> the width of CE_NAMEMASK. Shouldn't it be doing the same thing as
> create_ce_flags()?
I have to admit that I don't clearly understand all the index entry
intricacies. It is good you didn't see my earlier misguided attempts.
:-) I have patched the two mistakes you pointed out. It is too bad I
cannot simply use existing functions for this, but I want to keep a
different set of traits that either copy_cache_entry() or
create_ce_flags() assumes.
> > diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
> > index 336cfaa..6b615f8 100755
> > --- a/t/t7001-mv.sh
> > +++ b/t/t7001-mv.sh
> > @@ -156,4 +156,61 @@ test_expect_success 'absolute pathname outside should fail' '(
> >
> > )'
> >
> > +# git mv meets angry Git maintainer
>
> What's this comment about?
Oh. Well, you sounded agitated in your original mail, but this actually
just slipped through. :-)
> > +test_expect_success 'git mv should not change sha1 of moved cache entry' '
> > +
> > + rm -fr .git &&
> > + git init &&
> > + echo 1 >dirty &&
> > + git add dirty &&
> > + entry="$(git ls-files --stage dirty | cut -f 1)"
>
> "rev-parse :dirty"?
I want to make sure the whole index entry is intact, not just the sha1.
--
Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name. -- Ken Thompson and Dennis M. Ritchie
^ permalink raw reply [relevance 0%]
* [PATCHv2] git-mv: Keep moved index entries inact
2008-07-21 0:23 0% ` Petr Baudis
@ 2008-07-21 0:25 8% ` Petr Baudis
0 siblings, 1 reply; 200+ results
From: Petr Baudis @ 2008-07-21 0:25 UTC (permalink / raw)
To: gitster; +Cc: git
The rewrite of git-mv from a shell script to a builtin was perhaps
a little too straightforward: the git add and git rm queues were
emulated directly, which resulted in a rather complicated code and
caused an inconsistent behaviour when moving dirty index entries;
git mv would update the entry based on working tree state,
except in case of overwrites, where the new entry would still have
sha1 of the old file.
This patch introduces rename_index_entry_at() into the index toolkit,
which will rename an entry while removing any entries the new entry
might render duplicate. This is then used in git mv instead
of all the file queues, resulting in a major simplification
of the code and an inevitable change in git mv -n output format.
A new test has been added to the testsuite to reflect this change.
Also, based on suggestion by Junio about desired symlink behaviour
of git mv, I have added two tests for that; however, I do not have
need or desire to spend time fixing this, so they are expected
to fail for now until someone gets around to fixing that.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
builtin-mv.c | 62 ++++++++-------------------------------------------------
cache.h | 2 ++
read-cache.c | 17 ++++++++++++++++
t/t7001-mv.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 83 insertions(+), 53 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 33ad082..28ebc9c 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -36,17 +36,6 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec,
return get_pathspec(prefix, result);
}
-static void show_list(const char *label, struct path_list *list)
-{
- if (list->nr > 0) {
- int i;
- printf("%s", label);
- for (i = 0; i < list->nr; i++)
- printf("%s%s", i > 0 ? ", " : "", list->items[i].path);
- putchar('\n');
- }
-}
-
static const char *add_slash(const char *path)
{
int len = strlen(path);
@@ -75,11 +64,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
const char **source, **destination, **dest_path;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
- struct path_list overwritten = {NULL, 0, 0, 0};
struct path_list src_for_dst = {NULL, 0, 0, 0};
- struct path_list added = {NULL, 0, 0, 0};
- struct path_list deleted = {NULL, 0, 0, 0};
- struct path_list changed = {NULL, 0, 0, 0};
git_config(git_default_config, NULL);
@@ -189,7 +174,6 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
" will overwrite!\n",
bad);
bad = NULL;
- path_list_insert(dst, &overwritten);
} else
bad = "Cannot overwrite";
}
@@ -218,6 +202,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
for (i = 0; i < argc; i++) {
const char *src = source[i], *dst = destination[i];
enum update_mode mode = modes[i];
+ int pos;
if (show_only || verbose)
printf("Renaming %s to %s\n", src, dst);
if (!show_only && mode != INDEX &&
@@ -227,45 +212,16 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
if (mode == WORKING_DIRECTORY)
continue;
- assert(cache_name_pos(src, strlen(src)) >= 0);
-
- path_list_insert(src, &deleted);
- /* destination can be a directory with 1 file inside */
- if (path_list_has_path(&overwritten, dst))
- path_list_insert(dst, &changed);
- else
- path_list_insert(dst, &added);
+ pos = cache_name_pos(src, strlen(src));
+ assert(pos >= 0);
+ if (!show_only)
+ rename_cache_entry_at(pos, dst);
}
- if (show_only) {
- show_list("Changed : ", &changed);
- show_list("Adding : ", &added);
- show_list("Deleting : ", &deleted);
- } else {
- for (i = 0; i < changed.nr; i++) {
- const char *path = changed.items[i].path;
- int j = cache_name_pos(path, strlen(path));
- struct cache_entry *ce = active_cache[j];
-
- if (j < 0)
- die ("Huh? Cache entry for %s unknown?", path);
- refresh_cache_entry(ce, 0);
- }
-
- for (i = 0; i < added.nr; i++) {
- const char *path = added.items[i].path;
- if (add_file_to_cache(path, verbose ? ADD_CACHE_VERBOSE : 0))
- die("updating index entries failed");
- }
-
- for (i = 0; i < deleted.nr; i++)
- remove_file_from_cache(deleted.items[i].path);
-
- if (active_cache_changed) {
- if (write_cache(newfd, active_cache, active_nr) ||
- commit_locked_index(&lock_file))
- die("Unable to write new index file");
- }
+ if (active_cache_changed) {
+ if (write_cache(newfd, active_cache, active_nr) ||
+ commit_locked_index(&lock_file))
+ die("Unable to write new index file");
}
return 0;
diff --git a/cache.h b/cache.h
index a779d92..6f1d003 100644
--- a/cache.h
+++ b/cache.h
@@ -260,6 +260,7 @@ static inline void remove_name_hash(struct cache_entry *ce)
#define unmerged_cache() unmerged_index(&the_index)
#define cache_name_pos(name, namelen) index_name_pos(&the_index,(name),(namelen))
#define add_cache_entry(ce, option) add_index_entry(&the_index, (ce), (option))
+#define rename_cache_entry_at(pos, new_name) rename_index_entry_at(&the_index, (pos), (new_name))
#define remove_cache_entry_at(pos) remove_index_entry_at(&the_index, (pos))
#define remove_file_from_cache(path) remove_file_from_index(&the_index, (path))
#define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags))
@@ -370,6 +371,7 @@ extern int index_name_pos(const struct index_state *, const char *name, int name
#define ADD_CACHE_JUST_APPEND 8 /* Append only; tree.c::read_tree() */
extern int add_index_entry(struct index_state *, struct cache_entry *ce, int option);
extern struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really);
+extern void rename_index_entry_at(struct index_state *, int pos, const char *new_name);
extern int remove_index_entry_at(struct index_state *, int pos);
extern int remove_file_from_index(struct index_state *, const char *path);
#define ADD_CACHE_VERBOSE 1
diff --git a/read-cache.c b/read-cache.c
index 1648428..e93ee3c 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -38,6 +38,23 @@ static void replace_index_entry(struct index_state *istate, int nr, struct cache
istate->cache_changed = 1;
}
+void rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
+{
+ struct cache_entry *old = istate->cache[nr], *new;
+ int namelen = strlen(new_name);
+
+ new = xmalloc(cache_entry_size(namelen));
+ copy_cache_entry(new, old);
+ new->ce_flags = (new->ce_flags & ~CE_HASHED) | CE_UNHASHED;
+ new->ce_flags = (new->ce_flags & ~CE_NAMEMASK)
+ | (namelen >= CE_NAMEMASK ? CE_NAMEMASK : namelen);
+ memcpy(new->name, new_name, namelen);
+
+ cache_tree_invalidate_path(istate->cache_tree, old->name);
+ remove_index_entry_at(istate, nr);
+ add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
+}
+
/*
* This only updates the "non-critical" parts of the directory
* cache, ie the parts that aren't tracked by GIT, and only used
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 336cfaa..7e47931 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -156,4 +156,59 @@ test_expect_success 'absolute pathname outside should fail' '(
)'
+test_expect_success 'git mv should not change sha1 of moved cache entry' '
+
+ rm -fr .git &&
+ git init &&
+ echo 1 >dirty &&
+ git add dirty &&
+ entry="$(git ls-files --stage dirty | cut -f 1)"
+ git mv dirty dirty2 &&
+ [ "$entry" = "$(git ls-files --stage dirty2 | cut -f 1)" ] &&
+ echo 2 >dirty2 &&
+ git mv dirty2 dirty &&
+ [ "$entry" = "$(git ls-files --stage dirty | cut -f 1)" ]
+
+'
+
+rm -f dirty dirty2
+
+test_expect_failure 'git mv should overwrite symlink to a file' '
+
+ rm -fr .git &&
+ git init &&
+ echo 1 >moved &&
+ ln -s moved symlink &&
+ git add moved symlink &&
+ ! git mv moved symlink &&
+ git mv -f moved symlink &&
+ [ ! -e moved ] &&
+ [ -f symlink ] &&
+ [ $(cat symlink) = 1 ] &&
+ git diff-files --quiet
+
+'
+
+rm -f moved symlink
+
+test_expect_failure 'git mv should follow symlink to a directory' '
+
+ rm -fr .git &&
+ git init &&
+ echo 1 >moved &&
+ mkdir -p dir &&
+ touch dir/.keep &&
+ ln -s dir symlink &&
+ git add moved dir/.keep symlink &&
+ git mv moved symlink &&
+ [ ! -e moved ] &&
+ [ -f symlink/moved ] &&
+ [ $(cat symlink/moved) = 1 ] &&
+ [ "$(ls dir)" = "$(ls symlink)" ] &&
+ git diff-files --quiet
+
+'
+
+rm -rf moved symlink dir
+
test_done
^ permalink raw reply related [relevance 8%]
* [PATCH] t/t7001-mv.sh: Propose ability to use git-mv on conflicting entries
@ 2008-07-27 13:47 18% ` Petr Baudis
2008-07-28 1:13 16% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Petr Baudis @ 2008-07-27 13:47 UTC (permalink / raw)
To: git; +Cc: gitster
Currently, git-mv will declare "not under source control" on an attempt
to move a conflicted index entry. This patch adds an expect_failure
testcase for this case, since this is an artificial restriction. (However,
the scenario is not critical enough for the author to fix right now.)
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
I don't really know if it is ok to make "feature requests" like this by
adding failing testcases...
t/t7001-mv.sh | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 7e47931..241e9a2 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -173,6 +173,33 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
rm -f dirty dirty2
+cat >multistage <<EOT
+100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 1 staged
+100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 staged
+100755 d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 3 staged
+EOT
+
+# Rationale: I cannot git mv around a conflicted file. This is unnecessary
+# restriction in case another part of conflict resolution requires me to
+# move the file around.
+test_expect_failure 'git mv should move all stages of cache entry' '
+
+ rm -fr .git &&
+ git init &&
+ # git mv requires object to exist in working tree (bug?)
+ touch staged &&
+ git update-index --index-info <multistage &&
+ git ls-files --stage >lsf_output &&
+ test_cmp multistage lsf_output &&
+ git mv staged staged-mv &&
+ sed "s/staged/staged-mv/" <multistage >multistage-mv &&
+ git ls-files --stage >lsf_output &&
+ test_cmp multistage-mv lsf_output
+
+'
+
+rm -f multistage multistage-mv lsf_output staged
+
test_expect_failure 'git mv should overwrite symlink to a file' '
rm -fr .git &&
^ permalink raw reply related [relevance 18%]
* Re: [PATCH] t/t7001-mv.sh: Propose ability to use git-mv on conflicting entries
2008-07-27 13:47 18% ` [PATCH] t/t7001-mv.sh: Propose ability to use git-mv on conflicting entries Petr Baudis
@ 2008-07-28 1:13 16% ` Junio C Hamano
2008-07-28 1:21 6% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2008-07-28 1:13 UTC (permalink / raw)
To: Petr Baudis; +Cc: git, gitster
Petr Baudis <pasky@suse.cz> writes:
> I don't really know if it is ok to make "feature requests" like this by
> adding failing testcases...
Of course it depends on who you are. It's not Ok for somebody like you,
who is known to be competent, and certainly it is not Ok to do it on a
command that you know you care more about than I do.
I've neglected builtin-mv.c since its introduction, mostly because I never
say "git mv" myself (in other words, I haven't cared very much how broken
it was. For one thing, its indentation style is peculiar and is hard to
read and maintain).
> +# Rationale: I cannot git mv around a conflicted file. This is unnecessary
> +# restriction in case another part of conflict resolution requires me to
> +# move the file around.
Yes, I would agree this is a reasonable thing to support. Something like
this patch, perhaps.
---
builtin-mv.c | 21 ++++++++++++++-------
t/t7001-mv.sh | 21 +++++++++++++++++++++
2 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 4f65b5a..cc9e505 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -96,7 +96,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
/* Checking */
for (i = 0; i < argc; i++) {
const char *src = source[i], *dst = destination[i];
- int length, src_is_dir;
+ int length, src_is_dir, pos;
const char *bad = NULL;
if (show_only)
@@ -177,7 +177,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
} else
bad = "Cannot overwrite";
}
- } else if (cache_name_pos(src, length) < 0)
+ } else if (((pos = cache_name_pos(src, length)) < 0) &&
+ strcmp(active_cache[-1 - pos]->name, src))
bad = "not under version control";
else if (string_list_has_string(&src_for_dst, dst))
bad = "multiple sources for the same target";
@@ -202,7 +203,6 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
for (i = 0; i < argc; i++) {
const char *src = source[i], *dst = destination[i];
enum update_mode mode = modes[i];
- int pos;
if (show_only || verbose)
printf("Renaming %s to %s\n", src, dst);
if (!show_only && mode != INDEX &&
@@ -212,10 +212,17 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
if (mode == WORKING_DIRECTORY)
continue;
- pos = cache_name_pos(src, strlen(src));
- assert(pos >= 0);
- if (!show_only)
- rename_cache_entry_at(pos, dst);
+ if (!show_only) {
+ while (1) {
+ int pos = cache_name_pos(src, strlen(src));
+ if (pos < 0)
+ pos = -1 - pos;
+ if ((active_nr <= pos) ||
+ strcmp(active_cache[pos]->name, src))
+ break;
+ rename_cache_entry_at(pos, dst);
+ }
+ }
}
if (active_cache_changed) {
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b0fa407..d538f88 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -173,6 +173,27 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
rm -f dirty dirty2
+cat >expect <<\EOT
+100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 1 staged
+100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 staged
+100755 d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 3 staged
+EOT
+
+test_expect_success 'git mv should move all stages of cache entry' '
+ rm -fr .git &&
+ git init &&
+ >staged &&
+ git update-index --index-info <expect &&
+ git ls-files --stage >actual &&
+ test_cmp expect actual &&
+ git mv staged staged-mv &&
+ sed "s/staged/staged-mv/" <expect >expect-2 &&
+ git ls-files --stage >actual &&
+ test_cmp expect-2 actual
+'
+
+rm -f expect expect-2 staged actual staged-mv
+
test_expect_success 'git mv should overwrite symlink to a file' '
rm -fr .git &&
^ permalink raw reply related [relevance 16%]
* Re: [PATCH] t/t7001-mv.sh: Propose ability to use git-mv on conflicting entries
2008-07-28 1:13 16% ` Junio C Hamano
@ 2008-07-28 1:21 6% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-07-28 1:21 UTC (permalink / raw)
To: Petr Baudis; +Cc: git, gitster
Junio C Hamano <gitster@pobox.com> writes:
>> +# Rationale: I cannot git mv around a conflicted file. This is unnecessary
>> +# restriction in case another part of conflict resolution requires me to
>> +# move the file around.
>
> Yes, I would agree this is a reasonable thing to support. Something like
> this patch, perhaps.
> ...
Just in case if somebody is inclined to test the patch and polish it into
a shape good enough for inclusion...
> @@ -177,7 +177,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
> } else
> bad = "Cannot overwrite";
> }
> - } else if (cache_name_pos(src, length) < 0)
> + } else if (((pos = cache_name_pos(src, length)) < 0) &&
> + strcmp(active_cache[-1 - pos]->name, src))
There is a bug here; "-1 - pos" needs to be checked against active_nr
before strcmp().
^ permalink raw reply [relevance 6%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
@ 2008-07-28 14:20 6% ` SZEDER Gábor
2008-07-28 15:06 13% ` Johannes Schindelin
0 siblings, 1 reply; 200+ results
From: SZEDER Gábor @ 2008-07-28 14:20 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Petr Baudis, git
Hi,
there is a race somewhere in these 'git-mv: Keep moved index entries
inact' changes.
The test cases 'git mv should overwrite symlink to a file' or 'git mv
should overwrite file with a symlink' fail occasionaly. It's quite
non-deterministic: I have run t7001-mv.sh in a loop (see below) and
one or the other usually fails around 50 runs (but sometimes only
after 150). Adding some tracing echos to the tests shows that both
tests fail when running 'git diff-files' at the end.
Regards,
Gábor
---
#!/bin/bash
ret=0
i=0
while test $ret = 0 ; do
GIT_TEST_OPTS='--verbose --debug' make t7001-mv.sh
ret=$?
i=$((i+1))
done
echo "Failed at ${i}th run"
^ permalink raw reply [relevance 6%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
2008-07-28 14:20 6% ` SZEDER Gábor
@ 2008-07-28 15:06 13% ` Johannes Schindelin
2008-07-28 15:14 0% ` Johannes Schindelin
2008-07-28 19:19 0% ` Junio C Hamano
0 siblings, 2 replies; 200+ results
From: Johannes Schindelin @ 2008-07-28 15:06 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: Junio C Hamano, Petr Baudis, git
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1086 bytes --]
Hi,
On Mon, 28 Jul 2008, SZEDER Gábor wrote:
> there is a race somewhere in these 'git-mv: Keep moved index entries
> inact' changes.
>
> The test cases 'git mv should overwrite symlink to a file' or 'git mv
> should overwrite file with a symlink' fail occasionaly. It's quite
> non-deterministic: I have run t7001-mv.sh in a loop (see below) and
> one or the other usually fails around 50 runs (but sometimes only
> after 150). Adding some tracing echos to the tests shows that both
> tests fail when running 'git diff-files' at the end.
To make it more convenient to test: with this patch it fails all the time:
-- snipsnap --
t/t7001-mv.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b0fa407..6699abd 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -180,6 +180,7 @@ test_expect_success 'git mv should overwrite symlink to a file' '
echo 1 >moved &&
ln -s moved symlink &&
git add moved symlink &&
+ sleep 1 &&
test_must_fail git mv moved symlink &&
git mv -f moved symlink &&
! test -e moved &&
^ permalink raw reply related [relevance 13%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
2008-07-28 15:06 13% ` Johannes Schindelin
@ 2008-07-28 15:14 0% ` Johannes Schindelin
2008-07-28 18:24 5% ` Johannes Schindelin
2008-07-28 19:19 0% ` Junio C Hamano
1 sibling, 1 reply; 200+ results
From: Johannes Schindelin @ 2008-07-28 15:14 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: Junio C Hamano, Petr Baudis, git
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1132 bytes --]
Hi,
On Mon, 28 Jul 2008, Johannes Schindelin wrote:
> On Mon, 28 Jul 2008, SZEDER Gábor wrote:
>
> > there is a race somewhere in these 'git-mv: Keep moved index entries
> > inact' changes.
> >
> > The test cases 'git mv should overwrite symlink to a file' or 'git mv
> > should overwrite file with a symlink' fail occasionaly. It's quite
> > non-deterministic: I have run t7001-mv.sh in a loop (see below) and
> > one or the other usually fails around 50 runs (but sometimes only
> > after 150). Adding some tracing echos to the tests shows that both
> > tests fail when running 'git diff-files' at the end.
>
> To make it more convenient to test: with this patch it fails all the time:
Ooops. Seems like I changed the test 23 to fail, instead of test 24.
However, I think it is the same bug: the index is newer by one second, so
it seems that the patch for builtin-mv.c did not really keep the data
"intact".
Note that a test case should use test-chmtime to force this scenario, not
sleep a second.
Unfortunately, I already spent my Git time budget for today, so the ball
is out of my half for now.
Ciao,
Dscho
^ permalink raw reply [relevance 0%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
2008-07-28 15:14 0% ` Johannes Schindelin
@ 2008-07-28 18:24 5% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2008-07-28 18:24 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: Junio C Hamano, Petr Baudis, git
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2110 bytes --]
Hi,
On Mon, 28 Jul 2008, Johannes Schindelin wrote:
> On Mon, 28 Jul 2008, Johannes Schindelin wrote:
>
> > On Mon, 28 Jul 2008, SZEDER Gábor wrote:
> >
> > > there is a race somewhere in these 'git-mv: Keep moved index entries
> > > inact' changes.
> > >
> > > The test cases 'git mv should overwrite symlink to a file' or 'git
> > > mv should overwrite file with a symlink' fail occasionaly. It's
> > > quite non-deterministic: I have run t7001-mv.sh in a loop (see
> > > below) and one or the other usually fails around 50 runs (but
> > > sometimes only after 150). Adding some tracing echos to the tests
> > > shows that both tests fail when running 'git diff-files' at the end.
> >
> > To make it more convenient to test: with this patch it fails all the
> > time:
>
> Ooops. Seems like I changed the test 23 to fail, instead of test 24.
> However, I think it is the same bug: the index is newer by one second,
> so it seems that the patch for builtin-mv.c did not really keep the data
> "intact".
>
> Note that a test case should use test-chmtime to force this scenario,
> not sleep a second.
>
> Unfortunately, I already spent my Git time budget for today, so the ball
> is out of my half for now.
Hah! I had a few minutes, and this is my analysis:
Just try to "mv" a file, and look at the _ctime_ before and after. Yes,
that is right, at least on my system (ext3) it _changes_.
So the test 23 and 24 in t7001-mv.sh are totally bogus. They purport to
test that git-mv retains the whole meta-information in the cache and
therefore the index does not need to be updated.
However, it _does_ need to be updated, exactly because ctime changed.
Only that the test failed to test what it tried to test, instead
succeeding erroneously, just because the index was racy most of the time
and got silently updated.
So, this is the analysis. The fixes will have to be done by somebody
else, because /me goes running now.
(Possible fixes I envisage: update ctime via stat() after rename(), or
just give up and scrap the whole "leave cache_entry inact" thing.)
Ciao,
Dscho
^ permalink raw reply [relevance 5%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
2008-07-28 15:06 13% ` Johannes Schindelin
2008-07-28 15:14 0% ` Johannes Schindelin
@ 2008-07-28 19:19 0% ` Junio C Hamano
2008-07-28 23:41 0% ` Johannes Schindelin
1 sibling, 2 replies; 200+ results
From: Junio C Hamano @ 2008-07-28 19:19 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: SZEDER Gábor, Petr Baudis, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Mon, 28 Jul 2008, SZEDER Gábor wrote:
>
>> there is a race somewhere in these 'git-mv: Keep moved index entries
>> inact' changes.
>>
>> The test cases 'git mv should overwrite symlink to a file' or 'git mv
>> should overwrite file with a symlink' fail occasionaly. It's quite
>> non-deterministic: I have run t7001-mv.sh in a loop (see below) and
>> one or the other usually fails around 50 runs (but sometimes only
>> after 150). Adding some tracing echos to the tests shows that both
>> tests fail when running 'git diff-files' at the end.
>
> To make it more convenient to test: with this patch it fails all the time:
It's because we rename(2) but do not read back ctime, and reuse the cached
data from the old path that was renamed. After the failed test that moves
a regular file "move" to "symlink":
$ stat symlink
File: `symlink'
Size: 2 Blocks: 8 IO Block: 4096 regular file
Device: 30ah/778d Inode: 18104337 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1012/ junio) Gid: ( 40/ src)
Access: 2008-07-28 11:49:55.000000000 -0700
Modify: 2008-07-28 11:48:41.000000000 -0700
Change: 2008-07-28 11:48:42.000000000 -0700
But the cached stat information looks like this:
$ ../../git-ls-files --stat
ctime=1217270921, mtime=1217270921, ino=18104337, mode=100644, uid=1012, gid=40symlink
We need to refresh the entry to pick up potential ctime changes.
read-cache.c | 7 ++++++-
builtin-ls-files.c | 21 +++++++++++++++------
2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/read-cache.c b/read-cache.c
index 1cae361..834096f 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -40,7 +40,7 @@ static void replace_index_entry(struct index_state *istate, int nr, struct cache
void rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
{
- struct cache_entry *old = istate->cache[nr], *new;
+ struct cache_entry *old = istate->cache[nr], *new, *refreshed;
int namelen = strlen(new_name);
new = xmalloc(cache_entry_size(namelen));
@@ -51,6 +51,11 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n
cache_tree_invalidate_path(istate->cache_tree, old->name);
remove_index_entry_at(istate, nr);
+
+ /* the renaming could have smudged the ctime */
+ refreshed = refresh_cache_entry(new, 0);
+ if (refreshed && refreshed != new)
+ new = refreshed;
add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
}
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index e8d568e..a6b30c8 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -16,6 +16,7 @@ static int show_deleted;
static int show_cached;
static int show_others;
static int show_stage;
+static int show_stat;
static int show_unmerged;
static int show_modified;
static int show_killed;
@@ -205,16 +206,20 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce)
tag = alttag;
}
- if (!show_stage) {
- fputs(tag, stdout);
- } else {
+ if (show_stage)
printf("%s%06o %s %d\t",
tag,
ce->ce_mode,
abbrev ? find_unique_abbrev(ce->sha1,abbrev)
: sha1_to_hex(ce->sha1),
ce_stage(ce));
- }
+ else if (show_stat)
+ printf("ctime=%u, mtime=%u, ino=%u, mode=%o, uid=%u, gid=%u\t",
+ ce->ce_ctime, ce->ce_mtime, ce->ce_ino,
+ ce->ce_mode, ce->ce_uid, ce->ce_gid);
+
+ else
+ fputs(tag, stdout);
write_name_quoted(ce->name + offset, stdout, line_terminator);
}
@@ -235,7 +240,7 @@ static void show_files(struct dir_struct *dir, const char *prefix)
if (show_killed)
show_killed_files(dir);
}
- if (show_cached | show_stage) {
+ if (show_cached | show_stage | show_stat) {
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = active_cache[i];
int dtype = ce_to_dtype(ce);
@@ -488,6 +493,10 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
show_stage = 1;
continue;
}
+ if (!strcmp(arg, "-S") || !strcmp(arg, "--stat")) {
+ show_stat = 1;
+ continue;
+ }
if (!strcmp(arg, "-k") || !strcmp(arg, "--killed")) {
show_killed = 1;
require_work_tree = 1;
@@ -593,7 +602,7 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
/* With no flags, we default to showing the cached files */
if (!(show_stage | show_deleted | show_others | show_unmerged |
- show_killed | show_modified))
+ show_killed | show_modified | show_stat))
show_cached = 1;
read_cache();
^ permalink raw reply related [relevance 0%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
2008-07-28 19:19 0% ` Junio C Hamano
@ 2008-07-28 23:41 0% ` Johannes Schindelin
2008-07-28 23:55 13% ` Johannes Schindelin
1 sibling, 1 reply; 200+ results
From: Johannes Schindelin @ 2008-07-28 23:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: SZEDER Gábor, Petr Baudis, git
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1943 bytes --]
Hi,
On Mon, 28 Jul 2008, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > On Mon, 28 Jul 2008, SZEDER Gábor wrote:
> >
> >> there is a race somewhere in these 'git-mv: Keep moved index entries
> >> inact' changes.
> >>
> >> The test cases 'git mv should overwrite symlink to a file' or 'git mv
> >> should overwrite file with a symlink' fail occasionaly. It's quite
> >> non-deterministic: I have run t7001-mv.sh in a loop (see below) and
> >> one or the other usually fails around 50 runs (but sometimes only
> >> after 150). Adding some tracing echos to the tests shows that both
> >> tests fail when running 'git diff-files' at the end.
> >
> > To make it more convenient to test: with this patch it fails all the time:
>
> It's because we rename(2) but do not read back ctime, and reuse the cached
> data from the old path that was renamed. After the failed test that moves
> a regular file "move" to "symlink":
>
> $ stat symlink
> File: `symlink'
> Size: 2 Blocks: 8 IO Block: 4096 regular file
> Device: 30ah/778d Inode: 18104337 Links: 1
> Access: (0664/-rw-rw-r--) Uid: ( 1012/ junio) Gid: ( 40/ src)
> Access: 2008-07-28 11:49:55.000000000 -0700
> Modify: 2008-07-28 11:48:41.000000000 -0700
> Change: 2008-07-28 11:48:42.000000000 -0700
>
> But the cached stat information looks like this:
>
> $ ../../git-ls-files --stat
> ctime=1217270921, mtime=1217270921, ino=18104337, mode=100644, uid=1012, gid=40symlink
>
> We need to refresh the entry to pick up potential ctime changes.
Yep.
Tested-by: me
BTW I have no idea how we could test for this, short of introducing the
"sleep 1" I did earlier. Maybe guard it with a TEST_EXPENSIVE_CTIME
variable or something similar. Dunno.
And my suggestion to use test-chmtime: please just forget about it, and
just assume that I had some very good wiid(1) in my pipe(2).
Ciao,
Dscho
^ permalink raw reply [relevance 0%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
2008-07-28 23:41 0% ` Johannes Schindelin
@ 2008-07-28 23:55 13% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2008-07-28 23:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: SZEDER Gábor, Petr Baudis, git
Hi,
On Tue, 29 Jul 2008, Johannes Schindelin wrote:
> BTW I have no idea how we could test for this, short of introducing the
> "sleep 1" I did earlier. Maybe guard it with a TEST_EXPENSIVE_CTIME
> variable or something similar. Dunno.
IOW something like this squashed into your patch:
-- snipsnap --
t/t7001-mv.sh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b0fa407..c749059 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -179,6 +179,10 @@ test_expect_success 'git mv should overwrite symlink to a file' '
git init &&
echo 1 >moved &&
ln -s moved symlink &&
+ if test ! -z "$TEST_EXPENSIVE_CTIME"
+ then
+ sleep 1
+ fi &&
git add moved symlink &&
test_must_fail git mv moved symlink &&
git mv -f moved symlink &&
^ permalink raw reply related [relevance 13%]
* Re: [PATCHv2] git-mv: Keep moved index entries inact
@ 2008-07-29 5:23 12% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-07-29 5:23 UTC (permalink / raw)
To: Petr Baudis; +Cc: Johannes Schindelin, SZEDER Gábor, git
Junio C Hamano <gitster@pobox.com> writes:
> Petr Baudis <pasky@suse.cz> writes:
>
>> On Mon, Jul 28, 2008 at 12:19:19PM -0700, Junio C Hamano wrote:
>>> We need to refresh the entry to pick up potential ctime changes.
>>>
>>> read-cache.c | 7 ++++++-
>>> builtin-ls-files.c | 21 +++++++++++++++------
>>> 2 files changed, 21 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/read-cache.c b/read-cache.c
>>> index 1cae361..834096f 100644
>>
>> Oops, silly me. Sorry for being slower than you at fixing this. ;-)
>
> I did think about ctime issues when I applied the patch.
Actually I changed my mind.
I think it is wrong for something as low-level as rename_index_entry_at()
to unconditionally look at the working tree and try refreshing the entry.
The next caller of this function may not even require a working tree.
I think Dscho is correct; expecting the saved cacheinfo to stay fresh
across rename does not make much sense. What we care about with "git mv"
is that we keep what the user staged, i.e. kind of blob and the contents.
It cannot be guaranteed if the index entry is stat clean or not, as
st_ctime may or may not be updated across rename(2) according to POSIX.
So let's do this instead.
-- >8 --
t7001: fix "git mv" test
The test assumed that we can keep the cached stat information fresh across
rename(2); many filesystems however update st_ctime (and POSIX allows them
to do so), so that assumption does not hold. We can explicitly refresh
the index for the purpose of the test, as the only thing we are interested
in is the staged contents and the mode bits are preserved across "mv".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t7001-mv.sh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b0fa407..910a28c 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -185,6 +185,7 @@ test_expect_success 'git mv should overwrite symlink to a file' '
! test -e moved &&
test -f symlink &&
test "$(cat symlink)" = 1 &&
+ git update-index --refresh &&
git diff-files --quiet
'
@@ -202,6 +203,7 @@ test_expect_success 'git mv should overwrite file with a symlink' '
git mv -f symlink moved &&
! test -e symlink &&
test -h moved &&
+ git update-index --refresh &&
git diff-files --quiet
'
^ permalink raw reply related [relevance 12%]
* What's in git.git (Jul 2008, #09; Thu, 31)
@ 2008-08-01 1:02 3% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-08-01 1:02 UTC (permalink / raw)
To: git
Some git-gui updates for 1.6.0 are included, and then many minor fixes.
Perhaps -rc2 this weekend.
* The 'master' branch has these since the last announcement.
Abhijit Menon-Sen (5):
git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core
Clarify that "git log x.c y.h" lists commits that touch either file
`git submodule add` now requires a <path>
Make it clear that push can take multiple refspecs
Make the DESCRIPTION match <x>... items in the SYNOPSIS
Alex Riesen (1):
Make use of stat.ctime configurable
Alexander Gavrilov (7):
Fix pre-commit hooks under MinGW/MSYS
Add options to control the search for copies in blame.
Kill the blame back-end on window close.
Add a menu item to invoke full copy detection in blame.
git-gui: Fix the Remote menu separator.
git-gui: Preserve scroll position on reshow_diff.
Support copy and rename detection in fast-export.
Anders Melchiorsen (2):
Documentation: fix diff.external example
Advertise the ability to abort a commit
Björn Steinbrink (1):
rev-parse: Add support for the ^! and ^@ syntax
Brian Gernhardt (1):
Documentation: Remove mentions of git-svnimport.
Cesar Eduardo Barros (2):
Documentation/git-submodule.txt: fix doubled word
Documentation/git-rev-parse.txt: update for new git-describe output
format
Christian Couder (2):
merge-base: die with an error message if not passed a commit ref
documentation: user-manual: update "using-bisect" section
Jakub Narebski (1):
gitweb: More about how gitweb gets 'owner' of repository
Jeff King (2):
init: handle empty "template" parameter
Compact commit template message
Johannes Schindelin (1):
Avoid chdir() in list_commands_in_dir()
Johannes Sixt (2):
git-gui: Fix "Stage/Unstage Line" with one line of context.
git-gui: "Stage Line": Treat independent changes in adjacent lines better
Jonathan Nieder (1):
t6030 (bisect): work around Mac OS X "ls"
Junio C Hamano (11):
make sure parsed wildcard refspec ends with slash
GIT 1.6.0-rc1
Allow building without any git installed
Allow installing in the traditional way
ls-tree documentation: enhance notes on subdirectory and pathspec
behaviour
Documentation: clarify what is shown in "git-ls-files -s" output
t7001: fix "git mv" test
Teach gitlinks to ie_modified() and ce_modified_check_fs()
Fix merge name generation in "merge in C"
Fix test-parse-options "integer" test
Teach --find-copies-harder to "git blame"
Kevin Ballard (1):
format-patch: Produce better output with --inline or --attach
Lars Hjemli (3):
builtin-branch: remove duplicated code
builtin-branch: factor out merge_filter matching
builtin-branch: fix -v for --[no-]merged
Lee Marlow (1):
bash completion: Add completion for 'git help'
Olivier Marin (1):
builtin-verify-tag: fix -v option parsing
Petr Baudis (2):
git-mv: Remove dead code branch
git-mv: Keep moved index entries inact
Pierre Habouzit (1):
Allow "non-option" revision options in parse_option-enabled commands
Shawn O. Pearce (3):
git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk
fsck: Don't require tmp_obj_ file names are 14 bytes in length
git-gui: Fix gitk search in $PATH to work on Windows
Steffen Prohaska (5):
Refactor, adding prepare_git_cmd(const char **argv)
run-command (Windows): Run dashless "git <cmd>"
git-gui: Correct installation of library to be $prefix/share
git-gui (Windows): Switch to relative discovery of oguilib
git-gui (Windows): Change wrapper to execdir 'libexec/git-core'
Thomas Rast (1):
bash completion: Add long options for 'git describe'
Todd Zullinger (1):
Replace uses of "git-var" with "git var"
^ permalink raw reply [relevance 3%]
* [PATCH] git mv: try harder to keep index entries intact
@ 2008-08-01 16:49 11% Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2008-08-01 16:49 UTC (permalink / raw)
To: git, gitster, pasky
Some filesystems change the ctime during a rename(), for technical
reasons. Since this is the only change, the contents need not be
rehashed. So just update the ctime after renaming the entry.
This change requires rename_index_entry_at() to return the new
position.
As git-mv assumes that it runs in a non-bare repository, and is
marked as such in the cmd_struct in git.c, the changes do not have
to be guarded against running in a bare repository.
To test this properly, you need to run t7001 with the environment
variable TEST_CTIME_WITH_SLEEP set non-empty, since there is no way
to manipulate the ctime directly; we have to sleep.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
builtin-mv.c | 15 +++++++++++++--
cache.h | 2 +-
read-cache.c | 4 ++--
t/t7001-mv.sh | 10 ++++++++--
4 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index 4f65b5a..166a019 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -214,8 +214,19 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
pos = cache_name_pos(src, strlen(src));
assert(pos >= 0);
- if (!show_only)
- rename_cache_entry_at(pos, dst);
+ if (!show_only) {
+ struct stat st;
+ pos = rename_cache_entry_at(pos, dst);
+
+ /*
+ * Renaming can update the ctime. Do not force
+ * a complete rehash just because of that.
+ */
+ if (!lstat(dst, &st))
+ active_cache[pos]->ce_ctime = st.st_ctime;
+ else if (!ignore_errors)
+ die ("Could not stat '%s'", dst);
+ }
}
if (active_cache_changed) {
diff --git a/cache.h b/cache.h
index 8155ab8..4b6876b 100644
--- a/cache.h
+++ b/cache.h
@@ -371,7 +371,7 @@ extern int index_name_pos(const struct index_state *, const char *name, int name
#define ADD_CACHE_JUST_APPEND 8 /* Append only; tree.c::read_tree() */
extern int add_index_entry(struct index_state *, struct cache_entry *ce, int option);
extern struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really);
-extern void rename_index_entry_at(struct index_state *, int pos, const char *new_name);
+extern int rename_index_entry_at(struct index_state *, int pos, const char *new_name);
extern int remove_index_entry_at(struct index_state *, int pos);
extern int remove_file_from_index(struct index_state *, const char *path);
#define ADD_CACHE_VERBOSE 1
diff --git a/read-cache.c b/read-cache.c
index c5aa5bc..4454686 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -43,7 +43,7 @@ static void replace_index_entry(struct index_state *istate, int nr, struct cache
istate->cache_changed = 1;
}
-void rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
+int rename_index_entry_at(struct index_state *istate, int nr, const char *new_name)
{
struct cache_entry *old = istate->cache[nr], *new;
int namelen = strlen(new_name);
@@ -56,7 +56,7 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n
cache_tree_invalidate_path(istate->cache_tree, old->name);
remove_index_entry_at(istate, nr);
- add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
+ return add_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
}
/*
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 910a28c..5f6cee5 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -180,12 +180,15 @@ test_expect_success 'git mv should overwrite symlink to a file' '
echo 1 >moved &&
ln -s moved symlink &&
git add moved symlink &&
+ if test ! -z "$TEST_CTIME_WITH_SLEEP"
+ then
+ sleep 1
+ fi &&
test_must_fail git mv moved symlink &&
git mv -f moved symlink &&
! test -e moved &&
test -f symlink &&
test "$(cat symlink)" = 1 &&
- git update-index --refresh &&
git diff-files --quiet
'
@@ -199,11 +202,14 @@ test_expect_success 'git mv should overwrite file with a symlink' '
echo 1 >moved &&
ln -s moved symlink &&
git add moved symlink &&
+ if test ! -z "$TEST_CTIME_WITH_SLEEP"
+ then
+ sleep 1
+ fi &&
test_must_fail git mv symlink moved &&
git mv -f symlink moved &&
! test -e symlink &&
test -h moved &&
- git update-index --refresh &&
git diff-files --quiet
'
--
1.6.0.rc1.55.g69db8
^ permalink raw reply related [relevance 11%]
* [ANNOUNCE] GIT 1.6.0-rc2
@ 2008-08-07 0:31 3% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-08-07 0:31 UTC (permalink / raw)
To: git; +Cc: linux-kernel
GIT 1.6.0-rc2 is the second (or should we call it the third?) preview of
the upcoming release. It is available at the usual places:
http://www.kernel.org/pub/software/scm/git/
git-1.6.0-rc2.tar.{gz,bz2} (source tarball)
git-htmldocs-1.6.0-rc2.tar.{gz,bz2} (preformatted docs)
git-manpages-1.6.0-rc2.tar.{gz,bz2} (preformatted docs)
The RPM binary packages for a few architectures are also provided
as courtesy.
testing/RPMS/$arch/*-1.6.0.rc2-1.fc9.$arch.rpm (RPM)
----------------------------------------------------------------
Changes since v1.6.0-rc1 are as follows:
Abhijit Menon-Sen (7):
`git submodule add` now requires a <path>
Make it clear that push can take multiple refspecs
Make the DESCRIPTION match <x>... items in the SYNOPSIS
Git.pm: localise $? in command_close_bidi_pipe()
Fix hash slice syntax error
Fix typo in perl/Git.pm
Fix typos in INSTALL
Alex Riesen (1):
Make use of stat.ctime configurable
Alexander Gavrilov (9):
git-gui: Fix the Remote menu separator.
git-gui: Preserve scroll position on reshow_diff.
Support copy and rename detection in fast-export.
gitk: Kill back-end processes on window close
gitk: Arrange to kill diff-files & diff-index on quit
gitk: On Windows, use a Cygwin-specific flag for kill
gitk: Fixed broken exception handling in diff
gitk: Fixed automatic row selection during load
gitk: Fallback to selecting the head commit upon load
Anders Melchiorsen (4):
Advertise the ability to abort a commit
Documentation: fix diff.external example
Flush output in start_async
Add output flushing before fork()
Avery Pennarun (2):
Teach "git diff -p" Pascal/Delphi funcname pattern
git-svn: Abort with an error if 'fetch' parameter is invalid.
Brandon Casey (3):
t/t4202-log.sh: add newline at end of file
Teach fsck and prune that tmp_obj_ file names may not be 14 bytes long
perl/Makefile: handle paths with spaces in the NO_PERL_MAKEMAKER section
Brian Gernhardt (1):
Documentation: Remove mentions of git-svnimport.
Cesar Eduardo Barros (1):
Documentation/git-rev-parse.txt: update for new git-describe output format
Christian Couder (2):
merge-base: die with an error message if not passed a commit ref
documentation: user-manual: update "using-bisect" section
Christian Stimming (2):
git-gui: Update German translation
gitk: Updated German translation
Ciaran McCreesh (1):
Make git-add -i accept ranges like 7-
David D. Kilzer (1):
Fix race condition in t9119-git-svn-info.sh
Dmitry Potapov (1):
correct access right for git-svn-dcommit test
Eric Wong (2):
git-svn: properly set path for "info" command
t9119: conditionally re-enable test depending on svn(1) version
Giuseppe Bilotta (2):
diff: add ruby funcname pattern
diff: chapter and part in funcname for tex
Jeff King (3):
init: handle empty "template" parameter
Compact commit template message
init: handle empty "template" parameter
Jim Meyering (1):
git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
Johannes Schindelin (3):
sort_in_topological_order(): avoid setting a commit flag
clone: Add an option to set up a mirror
clone --bare: Add ".git" suffix to the directory name to clone into
Johannes Sixt (1):
git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
Jon Jensen (1):
Fix reference to Everyday Git, which is an HTML document and not a man page.
Jonathan Nieder (1):
git-diff(1): "--c" -> "--cc" typo fix
Junio C Hamano (19):
Allow building without any git installed
Allow installing in the traditional way
ls-tree documentation: enhance notes on subdirectory and pathspec behaviour
Documentation: clarify what is shown in "git-ls-files -s" output
t7001: fix "git mv" test
Teach gitlinks to ie_modified() and ce_modified_check_fs()
Fix merge name generation in "merge in C"
Fix test-parse-options "integer" test
Teach --find-copies-harder to "git blame"
make sure parsed wildcard refspec ends with slash
Documentation: clarify diff --cc
Update my e-mail address
Start 1.5.6.5 RelNotes to describe accumulated fixes
builtin-name-rev.c: split deeply nested part from the main function
RelNotes 1.5.6.5 updates
fix diff-tree --stdin documentation
Files given on the command line are relative to $cwd
GIT 1.5.6.5
GIT 1.6.0-rc2
Kevin Ballard (1):
format-patch: Produce better output with --inline or --attach
Lee Marlow (11):
bash completion: remove unused function _git_diff_tree
bash completion: Add more long options for 'git log'
bash completion: Add completion for 'git grep'
bash completion: Add completion for 'git clone'
bash completion: Add completion for 'git clean'
bash completion: Add completion for 'git init'
bash completion: Add completion for 'git revert'
bash completion: More completions for 'git stash'
bash completion: Add completion for 'git archive'
bash completion: Add completion for 'git ls-files'
bash completion: Add completion for 'git mv'
Linus Torvalds (1):
diff.renamelimit is a basic diff configuration
Michele Ballabio (2):
git-gui: update po/it.po
git-gui: add a part about format strings in po/README
Mikael Magnusson (2):
git-gui: Update swedish translation.
gitk: Update swedish translation.
Mike Ralphson (2):
Documentation: typos / spelling fixes in older RelNotes
Documentation: typos / spelling fixes
Nanako Shiraishi (1):
git-gui: update Japanese translation
Olivier Marin (1):
builtin-verify-tag: fix -v option parsing
Pierre Habouzit (2):
Allow "non-option" revision options in parse_option-enabled commands
git-submodule: move ill placed shift.
Pieter de Bie (1):
git-name-rev: allow --name-only in combination with --stdin
René Scharfe (2):
archive: allow --exec and --remote without equal sign
git-name-rev: don't use printf without format
Shawn O. Pearce (2):
git-gui: Fix gitk search in $PATH to work on Windows
git-gui: Update git-gui.pot for 0.11 nearing release
Steffen Prohaska (6):
Refactor, adding prepare_git_cmd(const char **argv)
run-command (Windows): Run dashless "git <cmd>"
git-gui: Correct installation of library to be $prefix/share
git-gui (Windows): Switch to relative discovery of oguilib
git-gui (Windows): Change wrapper to execdir 'libexec/git-core'
Modify mingw_main() workaround to avoid link errors
Stephan Beyer (1):
builtin-revert.c: typofix
Steve Haslam (1):
Propagate -u/--upload-pack option of "git clone" to transport.
Steven Grimm (1):
Optimize sha1_object_info for loose objects, not concurrent repacks
Todd Zullinger (1):
Replace uses of "git-var" with "git var"
^ permalink raw reply [relevance 3%]
* [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory
@ 2008-08-08 9:31 3% ` Junio C Hamano
2008-08-08 10:35 0% ` Johannes Schindelin
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2008-08-08 9:31 UTC (permalink / raw)
To: René Scharfe; +Cc: Johannes Schindelin, git, gitster
I'll push this out as 'test-deeper' branch to repo.or.cz (alt-git.git)
because the test suite has unprintable bytes that are inappropriate for
e-mail transmission.
-- >8 --
Many test scripts assumed that they will start in a 'trash' subdirectory
that is a single level down from the t/ directory, and referred to their
test vector files by asking for files like "../t9999/expect". This will
break if we move the 'trash' subdirectory elsewhere.
To solve this, we earlier introduced "$TEST_DIRECTORY" so that they can
refer to t/ directory reliably. This finally makes all the tests use
it to refer to the outside environment.
With this patch, and a one-liner not included here (because it would
contradict with what Dscho really wants to do):
| diff --git a/t/test-lib.sh b/t/test-lib.sh
| index 70ea7e0..60e69e4 100644
| --- a/t/test-lib.sh
| +++ b/t/test-lib.sh
| @@ -485,7 +485,7 @@ fi
| . ../GIT-BUILD-OPTIONS
|
| # Test repository
| -test="trash directory"
| +test="trash directory/another level/yet another"
| rm -fr "$test" || {
| trap - exit
| echo >&5 "FATAL: Cannot prepare test area"
all the tests still pass, but we would want extra sets of eyeballs on this
type of change to really make sure.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t0022-crlf-rename.sh | 4 ++--
t/t1000-read-tree-m-3way.sh | 2 +-
t/t3900-i18n-commit.sh | 18 +++++++++---------
t/t3901-i18n-patch.sh | 28 ++++++++++++++--------------
t/t4000-diff-format.sh | 2 +-
t/t4001-diff-rename.sh | 2 +-
t/t4002-diff-basic.sh | 2 +-
t/t4003-diff-rename-1.sh | 6 +++---
t/t4004-diff-rename-symlink.sh | 2 +-
t/t4005-diff-rename-2.sh | 6 +++---
t/t4007-rename-3.sh | 4 ++--
t/t4008-diff-break-rewrite.sh | 6 +++---
t/t4009-diff-rename-4.sh | 6 +++---
t/t4010-diff-pathspec.sh | 2 +-
t/t4011-diff-symlink.sh | 2 +-
t/t4012-diff-binary.sh | 2 +-
t/t4013-diff-various.sh | 2 +-
t/t4015-diff-whitespace.sh | 2 +-
t/t4020-diff-external.sh | 2 +-
t/t4022-diff-rewrite.sh | 4 ++--
t/t4023-diff-rename-typechange.sh | 14 +++++++-------
t/t4027-diff-submodule.sh | 2 +-
t/t4100-apply-stat.sh | 4 ++--
t/t4101-apply-nonl.sh | 2 +-
t/t5100-mailinfo.sh | 18 +++++++++---------
t/t5515-fetch-merge-logic.sh | 4 ++--
t/t5540-http-push.sh | 2 +-
t/t6002-rev-list-bisect.sh | 2 +-
t/t6003-rev-list-topo-order.sh | 2 +-
t/t6023-merge-file.sh | 2 +-
t/t6027-merge-binary.sh | 2 +-
t/t6101-rev-parse-parents.sh | 2 +-
t/t6200-fmt-merge-msg.sh | 4 ++--
t/t7001-mv.sh | 4 ++--
t/t7004-tag.sh | 2 +-
t/t7101-reset.sh | 10 +++++-----
t/t7500-commit.sh | 16 ++++++++--------
t/t8001-annotate.sh | 2 +-
t/t8002-blame.sh | 2 +-
t/t9110-git-svn-use-svm-props.sh | 2 +-
t/t9111-git-svn-use-svnsync-props.sh | 2 +-
t/t9115-git-svn-dcommit-funky-renames.sh | 2 +-
t/t9121-git-svn-fetch-renamed-dir.sh | 2 +-
t/t9200-git-cvsexportcommit.sh | 14 +++++++-------
t/t9300-fast-import.sh | 2 +-
t/t9301-fast-export.sh | 2 +-
t/t9500-gitweb-standalone-no-errors.sh | 16 ++++++++--------
t/t9700-perl-git.sh | 2 +-
t/t9700/test.pl | 3 ---
t/test-lib.sh | 2 +-
50 files changed, 123 insertions(+), 126 deletions(-)
^ permalink raw reply [relevance 3%]
* Re: [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory
2008-08-08 9:31 3% ` [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory Junio C Hamano
@ 2008-08-08 10:35 0% ` Johannes Schindelin
0 siblings, 0 replies; 200+ results
From: Johannes Schindelin @ 2008-08-08 10:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: René Scharfe, git
Hi,
On Fri, 8 Aug 2008, Junio C Hamano wrote:
> | # Test repository
> | -test="trash directory"
> | +test="trash directory/another level/yet another"
Oh my. If you continue like that, we are soon going to hit PATH_MAX on
some systems (*cough* Windows *cough*), badly.
> t/t0022-crlf-rename.sh | 4 ++--
> t/t1000-read-tree-m-3way.sh | 2 +-
> t/t3900-i18n-commit.sh | 18 +++++++++---------
> t/t3901-i18n-patch.sh | 28 ++++++++++++++--------------
> t/t4000-diff-format.sh | 2 +-
> t/t4001-diff-rename.sh | 2 +-
> t/t4002-diff-basic.sh | 2 +-
> t/t4003-diff-rename-1.sh | 6 +++---
> t/t4004-diff-rename-symlink.sh | 2 +-
> t/t4005-diff-rename-2.sh | 6 +++---
> t/t4007-rename-3.sh | 4 ++--
> t/t4008-diff-break-rewrite.sh | 6 +++---
> t/t4009-diff-rename-4.sh | 6 +++---
> t/t4010-diff-pathspec.sh | 2 +-
> t/t4011-diff-symlink.sh | 2 +-
> t/t4012-diff-binary.sh | 2 +-
> t/t4013-diff-various.sh | 2 +-
> t/t4015-diff-whitespace.sh | 2 +-
> t/t4020-diff-external.sh | 2 +-
> t/t4022-diff-rewrite.sh | 4 ++--
> t/t4023-diff-rename-typechange.sh | 14 +++++++-------
> t/t4027-diff-submodule.sh | 2 +-
> t/t4100-apply-stat.sh | 4 ++--
> t/t4101-apply-nonl.sh | 2 +-
> t/t5100-mailinfo.sh | 18 +++++++++---------
> t/t5515-fetch-merge-logic.sh | 4 ++--
> t/t5540-http-push.sh | 2 +-
> t/t6002-rev-list-bisect.sh | 2 +-
> t/t6003-rev-list-topo-order.sh | 2 +-
> t/t6023-merge-file.sh | 2 +-
> t/t6027-merge-binary.sh | 2 +-
> t/t6101-rev-parse-parents.sh | 2 +-
> t/t6200-fmt-merge-msg.sh | 4 ++--
> t/t7001-mv.sh | 4 ++--
> t/t7004-tag.sh | 2 +-
> t/t7101-reset.sh | 10 +++++-----
> t/t7500-commit.sh | 16 ++++++++--------
> t/t8001-annotate.sh | 2 +-
> t/t8002-blame.sh | 2 +-
> t/t9110-git-svn-use-svm-props.sh | 2 +-
> t/t9111-git-svn-use-svnsync-props.sh | 2 +-
> t/t9115-git-svn-dcommit-funky-renames.sh | 2 +-
> t/t9121-git-svn-fetch-renamed-dir.sh | 2 +-
> t/t9200-git-cvsexportcommit.sh | 14 +++++++-------
> t/t9300-fast-import.sh | 2 +-
> t/t9301-fast-export.sh | 2 +-
> t/t9500-gitweb-standalone-no-errors.sh | 16 ++++++++--------
> t/t9700-perl-git.sh | 2 +-
> t/t9700/test.pl | 3 ---
> t/test-lib.sh | 2 +-
> 50 files changed, 123 insertions(+), 126 deletions(-)
Frankly, I do not have the time. It is not only about looking what you
changed, but also what you did not change.
Besides, I do not see the point. "clean" can just as well
$(RM) -r 'trash directory.t'[0-9]*
Ciao,
Dscho
^ permalink raw reply [relevance 0%]
* [ANNOUNCE] GIT 1.6.0
@ 2008-08-17 21:16 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2008-08-17 21:16 UTC (permalink / raw)
To: git; +Cc: linux-kernel
The latest feature release GIT 1.6.0 is available at the usual
places:
http://www.kernel.org/pub/software/scm/git/
git-1.6.0.tar.{gz,bz2} (source tarball)
git-htmldocs-1.6.0.tar.{gz,bz2} (preformatted docs)
git-manpages-1.6.0.tar.{gz,bz2} (preformatted docs)
The RPM binary packages for a few architectures are also provided
as courtesy.
RPMS/$arch/*-1.6.0-1.fc9.$arch.rpm (RPM)
GIT v1.6.0 Release Notes
========================
User visible changes
--------------------
With the default Makefile settings, most of the programs are now
installed outside your $PATH, except for "git", "gitk" and
some server side programs that need to be accessible for technical
reasons. Invoking a git subcommand as "git-xyzzy" from the command
line has been deprecated since early 2006 (and officially announced in
1.5.4 release notes); use of them from your scripts after adding
output from "git --exec-path" to the $PATH is still supported in this
release, but users are again strongly encouraged to adjust their
scripts to use "git xyzzy" form, as we will stop installing
"git-xyzzy" hardlinks for built-in commands in later releases.
An earlier change to page "git status" output was overwhelmingly unpopular
and has been reverted.
Source changes needed for porting to MinGW environment are now all in the
main git.git codebase.
By default, packfiles created with this version uses delta-base-offset
encoding introduced in v1.4.4. Pack idx files are using version 2 that
allows larger packs and added robustness thanks to its CRC checking,
introduced in v1.5.2 and v1.4.4.5. If you want to keep your repositories
backwards compatible past these versions, set repack.useDeltaBaseOffset
to false or pack.indexVersion to 1, respectively.
We used to prevent sample hook scripts shipped in templates/ from
triggering by default by relying on the fact that we install them as
unexecutable, but on some filesystems, this approach does not work.
They are now shipped with ".sample" suffix. If you want to activate
any of these samples as-is, rename them to drop the ".sample" suffix,
instead of running "chmod +x" on them. For example, you can rename
hooks/post-update.sample to hooks/post-update to enable the sample
hook that runs update-server-info, in order to make repositories
friendly to dumb protocols (i.e. HTTP).
GIT_CONFIG, which was only documented as affecting "git config", but
actually affected all git commands, now only affects "git config".
GIT_LOCAL_CONFIG, also only documented as affecting "git config" and
not different from GIT_CONFIG in a useful way, is removed.
The ".dotest" temporary area "git am" and "git rebase" use is now moved
inside the $GIT_DIR, to avoid mistakes of adding it to the project by
accident.
An ancient merge strategy "stupid" has been removed.
Updates since v1.5.6
--------------------
(subsystems)
* git-p4 in contrib learned "allowSubmit" configuration to control on
which branch to allow "submit" subcommand.
* git-gui learned to stage changes per-line.
(portability)
* Changes for MinGW port have been merged, thanks to Johannes Sixt and
gangs.
* Sample hook scripts shipped in templates/ are now suffixed with
*.sample.
* perl's in-place edit (-i) does not work well without backup files on Windows;
some tests are rewritten to cope with this.
(documentation)
* Updated howto/update-hook-example
* Got rid of usage of "git-foo" from the tutorial and made typography
more consistent.
* Disambiguating "--" between revs and paths is finally documented.
(performance, robustness, sanity etc.)
* index-pack used too much memory when dealing with a deep delta chain.
This has been optimized.
* reduced excessive inlining to shrink size of the "git" binary.
* verify-pack checks the object CRC when using version 2 idx files.
* When an object is corrupt in a pack, the object became unusable even
when the same object is available in a loose form, We now try harder to
fall back to these redundant objects when able. In particular, "git
repack -a -f" can be used to fix such a corruption as long as necessary
objects are available.
* Performance of "git-blame -C -C" operation is vastly improved.
* git-clone does not create refs in loose form anymore (it behaves as
if you immediately ran git-pack-refs after cloning). This will help
repositories with insanely large number of refs.
* core.fsyncobjectfiles configuration can be used to ensure that the loose
objects created will be fsync'ed (this is only useful on filesystems
that does not order data writes properly).
* "git commit-tree" plumbing can make Octopus with more than 16 parents.
"git commit" has been capable of this for quite some time.
(usability, bells and whistles)
* even more documentation pages are now accessible via "man" and "git help".
* A new environment variable GIT_CEILING_DIRECTORIES can be used to stop
the discovery process of the toplevel of working tree; this may be useful
when you are working in a slow network disk and are outside any working tree,
as bash-completion and "git help" may still need to run in these places.
* By default, stash entries never expire. Set reflogexpire in [gc
"refs/stash"] to a reasonable value to get traditional auto-expiration
behaviour back
* Longstanding latency issue with bash completion script has been
addressed. This will need to be backmerged to 'maint' later.
* pager.<cmd> configuration variable can be used to enable/disable the
default paging behaviour per command.
* "git-add -i" has a new action 'e/dit' to allow you edit the patch hunk
manually.
* git-am records the original tip of the branch in ORIG_HEAD before it
starts applying patches.
* git-apply can handle a patch that touches the same path more than once
much better than before.
* git-apply can be told not to trust the line counts recorded in the input
patch but recount, with the new --recount option.
* git-apply can be told to apply a patch to a path deeper than what the
patch records with --directory option.
* git-archive can be told to omit certain paths from its output using
export-ignore attributes.
* git-archive uses the zlib default compression level when creating
zip archive.
* git-archive's command line options --exec and --remote can take their
parameters as separate command line arguments, similar to other commands.
IOW, both "--exec=path" and "--exec path" are now supported.
* With -v option, git-branch describes the remote tracking statistics
similar to the way git-checkout reports by how many commits your branch
is ahead/behind.
* git-branch's --contains option used to always require a commit parameter
to limit the branches with; it now defaults to list branches that
contains HEAD if this parameter is omitted.
* git-branch's --merged and --no-merged option used to always limit the
branches relative to the HEAD, but they can now take an optional commit
argument that is used in place of HEAD.
* git-bundle can read the revision arguments from the standard input.
* git-cherry-pick can replay a root commit now.
* git-clone can clone from a remote whose URL would be rewritten by
configuration stored in $HOME/.gitconfig now.
* "git-clone --mirror" is a handy way to set up a bare mirror repository.
* git-cvsserver learned to respond to "cvs co -c".
* git-diff --check now checks leftover merge conflict markers.
* "git-diff -p" learned to grab a better hunk header lines in
BibTex, Pascal/Delphi, and Ruby files and also pays attention to
chapter and part boundary in TeX documents.
* When remote side used to have branch 'foo' and git-fetch finds that now
it has branch 'foo/bar', it refuses to lose the existing remote tracking
branch and its reflog. The error message has been improved to suggest
pruning the remote if the user wants to proceed and get the latest set
of branches from the remote, including such 'foo/bar'.
* fast-export learned to export and import marks file; this can be used to
interface with fast-import incrementally.
* fast-import and fast-export learned to export and import gitlinks.
* "gitk" left background process behind after being asked to dig very deep
history and the user killed the UI; the process is killed when the UI goes
away now.
* git-rebase records the original tip of branch in ORIG_HEAD before it is
rewound.
* "git rerere" can be told to update the index with auto-reused resolution
with rerere.autoupdate configuration variable.
* git-rev-parse learned $commit^! and $commit^@ notations used in "log"
family. These notations are available in gitk as well, because the gitk
command internally uses rev-parse to interpret its arguments.
* git-rev-list learned --children option to show child commits it
encountered during the traversal, instead of showing parent commits.
* git-send-mail can talk not just over SSL but over TLS now.
* git-shortlog honors custom output format specified with "--pretty=format:".
* "git-stash save" learned --keep-index option. This lets you stash away the
local changes and bring the changes staged in the index to your working
tree for examination and testing.
* git-stash also learned branch subcommand to create a new branch out of
stashed changes.
* git-status gives the remote tracking statistics similar to the way
git-checkout reports by how many commits your branch is ahead/behind.
* "git-svn dcommit" is now aware of auto-props setting the subversion user
has.
* You can tell "git status -u" to even more aggressively omit checking
untracked files with --untracked-files=no.
* Original SHA-1 value for "update-ref -d" is optional now.
* Error codes from gitweb are made more descriptive where possible, rather
than "403 forbidden" as we used to issue everywhere.
(internal)
* git-merge has been reimplemented in C.
Fixes since v1.5.6
------------------
All of the fixes in v1.5.6 maintenance series are included in
this release, unless otherwise noted.
* git-clone ignored its -u option; the fix needs to be backported to
'maint';
* git-mv used to lose the distinction between changes that are staged
and that are only in the working tree, by staging both in the index
after moving such a path.
* "git-rebase -i -p" rewrote the parents to wrong ones when amending
(either edit or squash) was involved, and did not work correctly
when fast forwarding.
----------------------------------------------------------------
Changes since v1.5.6 are as follows:
Abhijit Menon-Sen (13):
git-gui: Move on to the next filename after staging/unstaging a change
git-gui: Don't select the wrong file if the last listed file is staged.
Implement "git stash branch <newbranch> <stash>"
Add a test for "git stash branch"
git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core
Clarify that "git log x.c y.h" lists commits that touch either file
`git submodule add` now requires a <path>
Make it clear that push can take multiple refspecs
Make the DESCRIPTION match <x>... items in the SYNOPSIS
Git.pm: localise $? in command_close_bidi_pipe()
Fix hash slice syntax error
Fix typo in perl/Git.pm
Fix typos in INSTALL
Adam Brewster (2):
Move read_revisions_from_stdin from builtin-rev-list.c to revision.c
Teach git-bundle to read revision arguments from stdin like git-rev-list.
Alex Riesen (5):
Fix use of "perl -i" on Windows
git-clone: remove leftover debugging fprintf().
Allow pager of diff command be enabled/disabled
Make use of stat.ctime configurable
Fix t3700 on filesystems which do not support question marks in names
Alexander Gavrilov (18):
Fix quadratic performance in rewrite_one.
Avoid rescanning unchanged entries in search for copies.
Do not try to detect move/copy for entries below threshold.
Fix pre-commit hooks under MinGW/MSYS
Add options to control the search for copies in blame.
Kill the blame back-end on window close.
Add a menu item to invoke full copy detection in blame.
Support gitlinks in fast-import.
git-gui: Fix the Remote menu separator.
git-gui: Preserve scroll position on reshow_diff.
Support copy and rename detection in fast-export.
gitk: Kill back-end processes on window close
gitk: Arrange to kill diff-files & diff-index on quit
gitk: On Windows, use a Cygwin-specific flag for kill
gitk: Fixed broken exception handling in diff
gitk: Fixed automatic row selection during load
gitk: Fallback to selecting the head commit upon load
gitk: Allow safely calling nukefile from a run queue handler
Anand Kumria (14):
Create a specific version of the read_pipe_lines command for p4 invocations
Utilise the new 'p4_read_pipe_lines' command
Have a command that specifically invokes 'p4' (via system)
Utilise the new 'p4_system' function.
Add a single command that will be used to construct the 'p4' command
If we are in verbose mode, output what we are about to run (or return)
Switch to using 'p4_build_cmd'
If the user has configured various parameters, use them.
Consistently use 'git-p4' for the configuration entries
Move git-p4.syncFromOrigin into a configuration parameters section
Put some documentation in about the parameters that have been added
Put in the two other configuration elements found in the source
Add p4 read_pipe and write_pipe wrappers
Utilise our new p4_read_pipe and p4_write_pipe wrappers
Anders Melchiorsen (5):
Documentation: fix diff.external example
Advertise the ability to abort a commit
Documentation: fix diff.external example
Flush output in start_async
Add output flushing before fork()
Avery Pennarun (4):
git-svn: avoid filling up the disk with temp files.
Reword "your branch has diverged..." lines to reduce line length
Teach "git diff -p" Pascal/Delphi funcname pattern
git-svn: Abort with an error if 'fetch' parameter is invalid.
Björn Steinbrink (3):
git cat-file: Fix memory leak in batch mode
index-pack.c: correctly initialize appended objects
rev-parse: Add support for the ^! and ^@ syntax
Brad King (1):
git-svn: teach dcommit about svn auto-props
Brandon Casey (17):
git-merge.sh: fix typo in usage message: sucesses --> succeeds
t7502-commit.sh: test_must_fail doesn't work with inline environment variables
t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects
t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff
t4116-apply-reverse.sh: use $TAR rather than tar
t3200,t7201: replace '!' with test_must_fail
t7502-commit.sh: rearrange test to make more portable
t/t4202-log.sh: add newline at end of file
Teach fsck and prune about the new location of temporary objects
perl/Makefile: update NO_PERL_MAKEMAKER section
t/t4202-log.sh: add newline at end of file
Teach fsck and prune that tmp_obj_ file names may not be 14 bytes long
perl/Makefile: handle paths with spaces in the NO_PERL_MAKEMAKER section
Makefile: set SHELL to value of SHELL_PATH
Makefile: add a target which will abort compilation with ancient shells
test-parse-options: use appropriate cast in length_callback
t5304-prune: adjust file mtime based on system time rather than file mtime
Brian Gernhardt (5):
Fix t4017-diff-retval for white-space from wc
Add test results directory to t/.gitignore
Documentation: Point to gitcli(7) from git(1)
Documentation: mention ORIG_HEAD in am, merge, and rebase
Documentation: Remove mentions of git-svnimport.
Brian Hetro (5):
builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'
convert.c: Use 'git_config_string' to get 'smudge' and 'clean'
diff.c: Use 'git_config_string' to get 'diff.external'
http.c: Use 'git_config_string' to clean up SSL config.
builtin-commit.c: Use 'git_config_string' to get 'commit.template'
Cesar Eduardo Barros (2):
Documentation/git-submodule.txt: fix doubled word
Documentation/git-rev-parse.txt: update for new git-describe output format
Christian Couder (5):
help: check early if we have a command, if not try a documentation topic
Fix "config_error_nonbool" used with value instead of key
Fix "config_error_nonbool" used with value instead of key
merge-base: die with an error message if not passed a commit ref
documentation: user-manual: update "using-bisect" section
Christian Stimming (2):
git-gui: Update German translation
gitk: Updated German translation
Ciaran McCreesh (2):
Make git-add -i accept ranges like 7-
Make git-add -i accept ranges like 7-
Cristian Peraferrer (1):
Print errno upon failure to open the COMMIT_EDITMSG file
Dan McGee (1):
completion: add --graph to log command completion
Daniel Barkalow (2):
Only use GIT_CONFIG in "git config", not other programs
In perforce, RCS keywords are case-sensitive
David D. Kilzer (1):
Fix race condition in t9119-git-svn-info.sh
David Reiss (4):
Implement normalize_absolute_path
Fold test-absolute-path into test-path-utils
Add support for GIT_CEILING_DIRECTORIES
Eliminate an unnecessary chdir("..")
Dmitry Kakurin (1):
Fixed text file auto-detection: treat EOF character 032 at the end of file as printable
Dmitry Potapov (9):
fix update-hook-example to work with packed tag references
update-hook-example: optionally allow non-fast-forward
shrink git-shell by avoiding redundant dependencies
completion.bash: add 'skip' and 'run' to git-bisect
Fix buffer overflow in git-grep
Fix buffer overflow in git diff
Fix buffer overflow in prepare_attr_stack
git-svn: fix git svn info to work without arguments
correct access right for git-svn-dcommit test
Don Zickus (1):
git-apply: handle a patch that touches the same path more than once better
Eric Blake (1):
Makefile: building git in cygwin 1.7.0
Eric Hanchrow (2):
user-manual: typo and grammar fixes
Documentation: fix broken "linkgit" links
Eric Raible (4):
Documentation: tweak use case in "git stash save --keep-index"
completion: add branch options --contains --merged --no-merged
Teach lookup_prog not to select directories
bash completion: 'git apply' should use 'fix' not 'strip'
Eric Wong (6):
git-svn: don't sanitize remote names in config
t/lib-git-svn: fix SVN_HTTPD tests to work with "trash directory"
git-svn: properly set path for "info" command
t9119: conditionally re-enable test depending on svn(1) version
git-svn: add ability to specify --commit-url for dcommit
git-svn: wrap long lines in a few places
Fabian Emmes (2):
Testsuite: Unset CVS_SERVER
testsuite for cvs co -c
Francis Moreau (1):
git-bisect: fix wrong usage of read(1)
Frederik Schwarzer (1):
git-svn: typofix
Gerrit Pape (1):
git-svn.perl: workaround assertions in svn library 1.5.0
Giuseppe Bilotta (2):
diff: add ruby funcname pattern
diff: chapter and part in funcname for tex
Gustaf Hendeby (2):
gitattributes: Document built in hunk header patterns
Teach git diff about BibTeX head hunk patterns
Ian Katz (1):
tutorial: use prompt with user names in example, to clarify who is doing what
Ivan Stankovic (1):
Documentation: fix invalid reference to 'mybranch' in user manual
Jakub Narebski (5):
gitweb: Separate filling list of projects info
gitweb: Separate generating 'sort by' table header
t/README: Add 'Skipping Tests' section below 'Running Tests'
gitweb: Describe projects_index format in more detail
gitweb: More about how gitweb gets 'owner' of repository
Jan Krüger (2):
Documentation: fix formatting in git-svn
git-svn: make rebuild respect rewriteRoot option
Jeff King (18):
fix whitespace violations in test scripts
mask necessary whitespace policy violations in test scripts
avoid whitespace on empty line in automatic usage message
avoid trailing whitespace in zero-change diffstat lines
enable whitespace checking of test scripts
clone: create intermediate directories of destination repo
for-each-ref: implement missing tag values
clone: create intermediate directories of destination repo
improve for-each-ref test script
fetch: report local storage errors in status table
doc/rev-parse: clarify reflog vs --until for specifying revisions
fetch: give a hint to the user when local refs fail to update
Allow per-command pager config
make deleting a missing ref more quiet
avoid null SHA1 in oldest reflog
init: handle empty "template" parameter
Compact commit template message
init: handle empty "template" parameter
Jim Meyering (1):
git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
Jing Xue (1):
Add 'git-p4.allowSubmit' to git-p4
Jochen Voss (1):
avoid off-by-one error in run_upload_archive
Joey Hess (1):
fix git config example syntax
Johan Herland (4):
Incorporate fetched packs in future object traversal
Move pack_refs() and friends into libgit
Prepare testsuite for a "git clone" that packs refs
Teach "git clone" to pack refs
Johannes Schindelin (31):
Windows: always chmod(, 0666) before unlink().
clone: respect url.insteadOf setting in global configs
commit-tree: lift completely arbitrary limit of 16 parents
Allow git-apply to recount the lines in a hunk (AKA recountdiff)
clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
Add another fast-import example, this time for .zip files
Teach "git apply" to prepend a prefix with "--root=<root>"
git fetch-pack: do not complain about "no common commits" in an empty repo
git daemon: avoid calling syslog() from a signal handler
run_command(): respect GIT_TRACE
Allow cherry-picking root commits
Convert CR/LF to LF in tag signatures
Add pretty format %aN which gives the author name, respecting .mailmap
Move MERGE_RR from .git/rr-cache/ into .git/
git-gui: MERGE_RR lives in .git/ directly with newer Git versions
shortlog: support --pretty=format: option
Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"
git fetch-pack: do not complain about "no common commits" in an empty repo
Rename .git/rebase to .git/rebase-apply
Rename path_list to string_list
Fix two leftovers from path_list->string_list
Ignore dirty submodule states in "git pull --rebase"
Add test to show that show-branch misses out the 8th column
sort_in_topological_order(): avoid setting a commit flag
builtin-commit: Two trivial style-cleanups
git daemon: avoid waking up too often
Avoid chdir() in list_commands_in_dir()
sort_in_topological_order(): avoid setting a commit flag
clone: Add an option to set up a mirror
clone --bare: Add ".git" suffix to the directory name to clone into
clone --mirror: avoid storing repeated tags
Johannes Sixt (52):
Add compat/regex.[ch] and compat/fnmatch.[ch].
Compile some programs only conditionally.
Add target architecture MinGW.
Windows: Use the Windows style PATH separator ';'.
setup.c: Prepare for Windows directory separators.
Windows: Treat Windows style path names.
Windows: Handle absolute paths in safe_create_leading_directories().
Windows: Strip ".exe" from the program name.
Windows: Implement a wrapper of the open() function.
Windows: A minimal implemention of getpwuid().
Windows: Work around misbehaved rename().
Make my_mktime() public and rename it to tm_to_time_t()
Windows: Implement gettimeofday().
Windows: Fix PRIuMAX definition.
Windows: Implement setitimer() and sigaction().
Windows: Wrap execve so that shell scripts can be invoked.
Windows: A pipe() replacement whose ends are not inherited to children.
Windows: Implement start_command().
Windows: A rudimentary poll() emulation.
Windows: Disambiguate DOS style paths from SSH URLs.
Windows: Implement asynchronous functions as threads.
Windows: Work around incompatible sort and find.
Windows: Implement wrappers for gethostbyname(), socket(), and connect().
Windows: Implement a custom spawnve().
Windows: Add a custom implementation for utime().
Windows: Use a customized struct stat that also has the st_blocks member.
Turn builtin_exec_path into a function.
Windows: Compute the fallback for exec_path from the program invocation.
Windows: Use a relative default template_dir and ETC_GITCONFIG
When installing, be prepared that template_dir may be relative.
Windows: Make the pager work.
Windows: Work around an oddity when a pipe with no reader is written to.
Windows: Make 'git help -a' work.
Windows: TMP and TEMP environment variables specify a temporary directory.
git-gui: Implement "Stage/Unstage Line"
t4127-apply-same-fn: Avoid sed -i
Provide fallback definitions of PRIu32 and PRIx32
t7600-merge: Use test_expect_failure to test option parsing
builtin-clone: rewrite guess_dir_name()
rebase -i: When an 'edit' stops, mention the commit
Makefile: Do not install a copy of 'git' in $(gitexecdir)
Makefile: Normalize $(bindir) and $(gitexecdir) before comparing
Record the command invocation path early
Fix relative built-in paths to be relative to the command invocation
Allow the built-in exec path to be relative to the command invocation path
Allow add_path() to add non-existent directories to the path
Windows: Make $(gitexecdir) relative
Windows: Make sure argv[0] has a path
Windows: Do not compile git-shell
git-gui: Fix "Stage/Unstage Line" with one line of context.
git-gui: "Stage Line": Treat independent changes in adjacent lines better
git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
Jon Jensen (1):
Fix reference to Everyday Git, which is an HTML document and not a man page.
Jonathan Nieder (29):
Documentation: don't assume git-sh-setup and git-parse-remote are in PATH
Documentation: fix links to tutorials and other new manual pages
whitespace fix in Documentation/git-repack.txt
Documentation: complicate example of "man git-command"
git-daemon(1): don't assume git-daemon is in /usr/bin
Documentation: prepare to be consistent about "git-" versus "git "
Documentation: be consistent about "git-" versus "git "
Documentation formatting and cleanup
git-format-patch(1): fix stray \ in output
Documentation: fix gitlinks
manpages: fix bogus whitespace
git(1): add comma
git-commit(1): depersonalize description
Documentation: rewrap to prepare for "git-" vs "git " change
Documentation: more "git-" versus "git " changes
gitdiffcore(7): fix awkward wording
manpages: italicize command names in synopses
manpages: italicize command names
manpages: italicize git command names (which were in teletype font)
manpages: italicize gitk's name (where it was in teletype font)
manpages: italicize nongit command names (if they are in teletype font)
manpages: italicize git subcommand names (which were in teletype font)
manpages: use teletype font for sample command lines
fix usage string for git grep
git-diff(1): "--c" -> "--cc" typo fix
document that git-tag can tag more than heads
t6030 (bisect): work around Mac OS X "ls"
git-diff(1): "--c" -> "--cc" typo fix
Documentation: user-manual: "git commit -a" doesn't motivate .gitignore
João Abecasis (1):
git-svn: find-rev and rebase for SVN::Mirror repositories
Junio C Hamano (131):
revision traversal: --children option
rev-list --children
builtin-blame.c: move prepare_final() into a separate function.
builtin-blame.c: allow more than 16 parents
git-blame --reverse
diff -c/--cc: do not include uninteresting deletion before leading context
rerere: rerere_created_at() and has_resolution() abstraction
git-rerere: detect unparsable conflicts
rerere: remove dubious "tail_optimization"
t4200: fix rerere test
rerere.autoupdate
git-shell: accept "git foo" form
Prepare execv_git_cmd() for removal of builtins from the filesystem
pre-rebase hook update
Ship sample hooks with .sample suffix
Keep some git-* programs in $(bindir)
GIT 1.5.6.1
Allow "git-reset path" when unambiguous
Start draft release notes for 1.6.0
diff --check: do not discard error status upon seeing a good line
git-shell: accept "git foo" form
GIT 1.5.4.6
GIT 1.5.5.5
diff --check: explain why we do not care whether old side is binary
check_and_emit_line(): rename and refactor
checkdiff: pass diff_options to the callback
Teach "diff --check" about new blank lines at end
diff --check: detect leftover conflict markers
Update sample pre-commit hook to use "diff --check"
Document the double-dash "rev -- path" disambiguator
Per-ref reflog expiry configuration
Make default expiration period of reflog used for stash infinite
t9700: skip when Test::More is not available
Update draft release notes for 1.6.0
Introduce get_merge_bases_many()
Introduce reduce_heads()
Start draft release notes for 1.5.6.2
Update draft release notes for 1.6.0
apply --root: thinkofix.
Refactor "tracking statistics" code used by "git checkout"
git-status: show the remote tracking statistics
git-branch -v: show the remote tracking statistics
fast-export --export-marks: fix off by one error
stat_tracking_info(): clear object flags used during counting
Work around gcc warnings from curl headers
Fix executable bits in t/ scripts
GIT 1.5.6.2
attribute documentation: keep EXAMPLE at end
clone -q: honor "quiet" option over native transports.
branch -r -v: do not spit out garbage
git-apply --directory: make --root more similar to GNU diff
mailinfo: feed the correct line length to decode_transfer_encoding()
Update draft release notes for 1.6.0
Teach "am" and "rebase" to mark the original position with ORIG_HEAD
Tone down warning about GNU Interactive Tools
Documentation: update sections on naming revisions and revision ranges
Start preparing release notes for 1.5.6.3
branch --contains: default to HEAD
branch --merged/--no-merged: allow specifying arbitrary commit
apply: fix copy/rename breakage
Teach merge.log to "git-merge" again
t0004: fix timing bug
GIT 1.5.6.3
Update draft release notes for 1.6.0
reduce_heads(): protect from duplicate input
git-rebase: report checkout failure
tutorial: clarify "pull" is "fetch + merge"
Update draft release notes to 1.6.0
t/aggregate-results: whitespace fix
Start preparing 1.5.6.4 release notes
Update draft release notes for 1.6.0
read-cache.c: typofix
mailinfo: off-by-one fix for [PATCH (foobar)] removal from Subject: line
rerere.autoupdate: change the message when autoupdate is in effect
builtin-remote.c: fix earlier "skip_prefix()" conversion
rev-list: honor --quiet option
http-fetch: do not SEGV after fetching a bad pack idx file
GIT 1.5.6.4
t9001 (send-email): Do not use hardcoded /bin/sh in test
.mailmap update
Getting closer to 1.6.0-rc0
builtin-add.c: restructure the code for maintainability
git-add --all: add all files
git-add --all: tests
git-add --all: documentation
refresh-index: fix bitmask assignment
Link shell with compat layer functions
Move read_in_full() and write_in_full() to wrapper.c
"needs update" considered harmful
Update my e-mail address
Revert "make git-status use a pager"
tests: do not rely on external "patch"
stash save: fix parameter handling
builtin-branch.c: remove unused code in append_ref() callback function
builtin-branch.c: optimize --merged and --no-merged
Documentation: clarify diff --cc
ignore non-existent refs in dwim_log()
tests: propagate $(TAR) down from the toplevel Makefile
Makefile: fix shell quoting
Documentation: clarify how to disable elements in core.whitespace
make sure parsed wildcard refspec ends with slash
GIT 1.6.0-rc1
Allow building without any git installed
Allow installing in the traditional way
ls-tree documentation: enhance notes on subdirectory and pathspec behaviour
Documentation: clarify what is shown in "git-ls-files -s" output
t7001: fix "git mv" test
Teach gitlinks to ie_modified() and ce_modified_check_fs()
Fix merge name generation in "merge in C"
Fix test-parse-options "integer" test
Teach --find-copies-harder to "git blame"
make sure parsed wildcard refspec ends with slash
Documentation: clarify diff --cc
Update my e-mail address
Start 1.5.6.5 RelNotes to describe accumulated fixes
builtin-name-rev.c: split deeply nested part from the main function
RelNotes 1.5.6.5 updates
fix diff-tree --stdin documentation
Files given on the command line are relative to $cwd
GIT 1.5.6.5
GIT 1.6.0-rc2
asciidoc markup fixes
GIT-VERSION-GEN: mark the version 'dirty' only if there are modified files
mailinfo: fix MIME multi-part message boundary handling
Update draft RelNotes for 1.6.0
Fix deleting reflog entries from HEAD reflog
Re-fix rev-list-options documentation
diff --check: do not unconditionally complain about trailing empty lines
Do not talk about "diff" in rev-list documentation.
GIT 1.6.0-rc3
GIT 1.6.0
Karl Hasselström (2):
Clean up builtin-update-ref's option parsing
Make old sha1 optional with git update-ref -d
Kevin Ballard (3):
git-send-email: Accept fifos as well as files
format-patch: Produce better output with --inline or --attach
Fix escaping of glob special characters in pathspecs
Lars Hjemli (3):
builtin-branch: remove duplicated code
builtin-branch: factor out merge_filter matching
builtin-branch: fix -v for --[no-]merged
Lars Noschinski (4):
git-cvsserver: fix call to nonexistant cleanupWorkDir()
cvsserver: Add support for packed refs
cvsserver: Add cvs co -c support
cvsserver: Add testsuite for packed refs
Lea Wiemann (6):
test-lib.sh: add --long-tests option
t/test-lib.sh: add test_external and test_external_without_stderr
Git.pm: add test suite
gitweb: standarize HTTP status codes
test-lib.sh: show git init output when in verbose mode
GIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copy
Lee Marlow (15):
bash completion: Add long options for 'git rm'
bash completion: Add completion for 'git help'
bash completion: remove unused function _git_diff_tree
bash completion: Add more long options for 'git log'
bash completion: Add completion for 'git grep'
bash completion: Add completion for 'git clone'
bash completion: Add completion for 'git clean'
bash completion: Add completion for 'git init'
bash completion: Add completion for 'git revert'
bash completion: More completions for 'git stash'
bash completion: Add completion for 'git archive'
bash completion: Add completion for 'git ls-files'
bash completion: Add completion for 'git mv'
bash completion: Add completion for 'git mergetool'
bash completion: Add '--merge' long option for 'git log'
Linus Torvalds (8):
Split up default "core" config parsing into helper routine
Split up default "user" config parsing into helper routine
Split up default "i18n" and "branch" config parsing into helper routines
Add config option to enable 'fsync()' of object files
racy-git: an empty blob has a fixed object name
Make git_dir a path relative to work_tree in setup_work_tree()
Shrink the git binary a bit by avoiding unnecessary inline functions
diff.renamelimit is a basic diff configuration
Lukas Sandström (6):
Add a helper script to send patches with Mozilla Thunderbird
git-mailinfo: document the -n option
Make some strbuf_*() struct strbuf arguments const.
Add some useful functions for strbuf manipulation.
git-mailinfo: Fix getting the subject from the in-body [PATCH] line
git-mailinfo: use strbuf's instead of fixed buffers
Marcus Griep (7):
Fix multi-glob assertion in git-svn
git-svn: Allow deep branch names by supporting multi-globs
Git.pm: Add faculties to allow temp files to be cached
git-svn: Make it incrementally faster by minimizing temp files
git-svn: Reduce temp file usage when dealing with non-links
bash-completion: Add non-command git help files to bash-completion
Git.pm: Make File::Spec and File::Temp requirement lazy
Marius Storm-Olsen (4):
Add an optional <mode> argument to commit/status -u|--untracked-files option
Add argument 'no' commit/status option -u|--untracked-files
Add configuration option for default untracked files mode
Windows: Add a new lstat and fstat implementation based on Win32 API.
Mark Levedahl (4):
install-doc-quick - use git --exec-path to find git-sh-setup
git-submodule - Fix bugs in adding an existing repo as a module
git-submodule - make "submodule add" more strict, and document it
git-submodule - register submodule URL if adding in place
Matt McCutchen (1):
git format-patch documentation: clarify what --cover-letter does
Matthew Ogilvie (1):
Documentation cvs: Clarify when a bare repository is needed
Michele Ballabio (6):
parse-options.c: fix documentation syntax of optional arguments
t9301-fast-export.sh: Remove debug line
builtin-merge.c: Fix option parsing
builtin-push.c: Cleanup - use OPT_BIT() and remove some variables
git-gui: update po/it.po
git-gui: add a part about format strings in po/README
Mikael Magnusson (3):
Fix grammar in git-rev-parse(1).
git-gui: Update swedish translation.
gitk: Update swedish translation.
Mike Hommey (4):
Catch failures from t5540-http-push
Fix http-push test
Skip t5540-http-push test when USE_CURL_MULTI is undefined
Avoid apache complaining about lack of server's FQDN
Mike Pape (1):
We need to check for msys as well as Windows in add--interactive.
Mike Ralphson (2):
Documentation: typos / spelling fixes in older RelNotes
Documentation: typos / spelling fixes
Miklos Vajna (31):
A simple script to parse the results from the testcases
Move split_cmdline() to alias.c
Move commit_list_count() to commit.c
Move parse-options's skip_prefix() to git-compat-util.h
Add new test to ensure git-merge handles pull.twohead and pull.octopus
Move read_cache_unmerged() to read-cache.c
git-fmt-merge-msg: make it usable from other builtins
Introduce get_octopus_merge_bases() in commit.c
Add new test to ensure git-merge handles more than 25 refs.
Add new test case to ensure git-merge reduces octopus parents when possible
Retire 'stupid' merge strategy
INSTALL: Update section about git-frotz form.
hg-to-git: avoid raising a string exception
hg-to-git: abort if the project directory is not a hg repo
hg-to-git: rewrite "git-frotz" to "git frotz"
hg-to-git: use git init instead of git init-db
Add new test case to ensure git-merge prepends the custom merge message
git-commit-tree: make it usable from other builtins
Fix t7601-merge-pull-config.sh on AIX
Build in merge
t0001-init.sh: change confusing directory name
t1007-hash-object.sh: use quotes for the test description
git-bisect: use dash-less form on git bisect log
make remove-dashes: apply to scripts and programs as well, not just to builtins
t6021: add a new test for git-merge-resolve
Add a new test for git-merge-resolve
Teach 'git merge' that some merge strategies no longer exist
builtin-merge: give a proper error message for invalid strategies in config
t7601: extend the 'merge picks up the best result' test
Documentation: document the pager.* configuration setting
t9300: replace '!' with test_must_fail
Nanako Shiraishi (8):
environment.c: remove unused function
config.c: make git_env_bool() static
gitcli: Document meaning of --cached and --index
cache-tree.c: make cache_tree_find() static
builtin-describe.c: make a global variable "pattern" static
parse-options.c: make check_typos() static
git am --abort
git-gui: update Japanese translation
Nguyễn Thái Ngọc Duy (2):
Move all dashed-form commands to libexecdir
Fix typo in comments of longest_ancestor_length()
Nicolas Pitre (11):
call init_pack_revindex() lazily
implement some resilience against pack corruptions
test case for pack resilience against corruptions
refactor pack structure allocation
optimize verify-pack a bit
move show_pack_info() where it belongs
verify-pack: check packed object CRC when using index version 2
verify-pack: test for detection of index v2 object CRC mismatch
repack.usedeltabaseoffset config option now defaults to "true"
pack.indexversion config option now defaults to 2
restore legacy behavior for read_sha1_file()
Nikolaj Schumacher (1):
Don't cut off last character of commit descriptions.
Nikolaus Schulz (1):
Documentation: be precise about which date --pretty uses
Olivier Marin (9):
Documentation: remove {show,whatchanged}.difftree config options
show_stats(): fix stats width calculation
builtin-rerere: more carefully find conflict markers
builtin-rm: fix index lock file path
git-am: remove dash from help message
parse-options: fix segmentation fault when a required value is missing
git am --skip: clean the index while preserving local changes
update test case to protect am --skip behaviour
builtin-verify-tag: fix -v option parsing
P. Christeas (1):
svnimport: newer libsvn wants us to ask for the root with "", not "/"
Patrick Higgins (2):
Remove the use of '--' in merge program invocation
Workaround for AIX mkstemp()
Pavel Roskin (1):
t9600: allow testing with cvsps 2.2, including beta versions
Peter Harris (1):
Add ANSI control code emulation for the Windows console
Peter Valdemar Mørch (1):
send-email: find body-encoding correctly
Petr Baudis (14):
Git.pm: Add remote_refs() git-ls-remote frontend
Fix backwards-incompatible handling of core.sharedRepository
Documentation/git-cherry-pick.txt et al.: Fix misleading -n description
Documentation/git-submodule.txt: Add Description section
Documentation/RelNotes-1.6.0.txt: Expand on the incompatible packfiles
Documentation/git-submodule.txt: Further clarify the description
Documentation: How to ignore local changes in tracked files
Documentation/git-merge.txt: Partial rewrite of How Merge Works
git-filter-branch.sh: Allow running in bare repositories
Documentation/git-filter-branch: teach "rm" instead of "update-index --remove"
git-mv: Remove dead code branch
git-mv: Keep moved index entries inact
Fail properly when cloning from invalid HTTP URL
Adjust for the new way of enabling the default post-update hook
Philippe Bruhat (1):
mailinfo: better parse email adresses containg parentheses
Pierre Habouzit (19):
parse-opt: have parse_options_{start,end}.
parse-opt: Export a non NORETURN usage dumper.
parse-opt: create parse_options_step.
parse-opt: do not print errors on unknown options, return -2 intead.
parse-opt: fake short strings for callers to believe in.
parse-opt: add PARSE_OPT_KEEP_ARGV0 parser option.
revisions: split handle_revision_opt() from setup_revisions()
git-blame: migrate to incremental parse-option [1/2]
git-blame: migrate to incremental parse-option [2/2]
parse-options: add PARSE_OPT_LASTARG_DEFAULT flag
git-blame: fix lapsus
git-shortlog: migrate to parse-options partially.
revisions: refactor handle_revision_opt into parse_revision_opt.
builtin-merge: add missing structure initialization
git-submodule: move ill placed shift.
git-checkout: fix command line parsing.
git-checkout: improve error messages, detect ambiguities.
Allow "non-option" revision options in parse_option-enabled commands
git-submodule: move ill placed shift.
Pieter de Bie (4):
builtin-fast-export: Add importing and exporting of revision marks
git-name-rev: allow --name-only in combination with --stdin
builtin-rm: Add a --force flag
reflog test: add more tests for 'reflog delete'
Rafael Garcia-Suarez (1):
gitweb: remove git_blame and rename git_blame2 to git_blame
Ramsay Allan Jones (4):
Fix some warnings (on cygwin) to allow -Werror
t9113-*.sh: provide user feedback when test skipped
t9100-git-svn-basic.sh: Fix determination of utf-8 locale
git-request-pull: replace call to deprecated peek-remote
René Scharfe (16):
Teach new attribute 'export-ignore' to git-archive
archive: remove args member from struct archiver
add context pointer to read_tree_recursive()
archive: add baselen member to struct archiver_args
archive: centralize archive entry writing
archive: unify file attribute handling
archive: remove extra arguments parsing code
archive: make zip compression level independent from core git
archive: remove unused headers
archive: add write_archive()
archive: move parameter parsing code to archive.c
archive: define MAX_ARGS where it's needed
archive: declare struct archiver where it's needed
archive: allow --exec and --remote without equal sign
archive: allow --exec and --remote without equal sign
git-name-rev: don't use printf without format
Richard Quirk (1):
git-gui: Fix accidental staged state toggle when clicking top pixel row
Robert Blum (1):
git-p4: chdir now properly sets PWD environment variable in msysGit
Robert Shearman (1):
git-send-email: Fix authenticating on some servers when using TLS.
SZEDER Gábor (5):
stash: introduce 'stash save --keep-index' option
bash: offer only paths after '--'
checkout: mention '--' in the docs
bash: offer only paths after '--' for 'git checkout'
bash: remove redundant check for 'git stash apply' options
Shawn O. Pearce (18):
Correct documentation for git-push --mirror
Fix describe --tags --long so it does not segfault
Remove unnecessary pack-*.keep file after successful git-clone
Correct pack memory leak causing git gc to try to exceed ulimit
bash completion: Improve responsiveness of git-log completion
bash completion: Don't offer "a.." as a completion for "a."
bash completion: Append space after file names have been completed
bash completion: Resolve git show ref:path<tab> losing ref: portion
bash completion: Remove dashed command completion support
index-pack: Refactor base arguments of resolve_delta into a struct
index-pack: Chain the struct base_data on the stack for traversal
index-pack: Track the object_entry that creates each base_data
index-pack: Honor core.deltaBaseCacheLimit when resolving deltas
git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk
fsck: Don't require tmp_obj_ file names are 14 bytes in length
git-gui: Fix gitk search in $PATH to work on Windows
git-gui: Update git-gui.pot for 0.11 nearing release
git-gui 0.11
Soeren Finster (1):
git-gui: Exit shortcut in MacOSX repaired
Steffen Prohaska (11):
Windows: Fix ntohl() related warnings about printf formatting
compat/pread.c: Add a forward declaration to fix a warning
Move code interpreting path relative to exec-dir to new function system_path()
help.c: Add support for htmldir relative to git_exec_path()
help (Windows): Display HTML in default browser using Windows' shell API
Refactor, adding prepare_git_cmd(const char **argv)
run-command (Windows): Run dashless "git <cmd>"
git-gui: Correct installation of library to be $prefix/share
git-gui (Windows): Switch to relative discovery of oguilib
git-gui (Windows): Change wrapper to execdir 'libexec/git-core'
Modify mingw_main() workaround to avoid link errors
Stephan Beyer (28):
api-builtin.txt: update and fix typo
t3404: stricter tests for git-rebase--interactive
git-rebase.sh: Add check if rebase is in progress
api-builtin.txt: update and fix typo
api-parse-options.txt: Introduce documentation for parse options API
Extend parse-options test suite
rerere: Separate libgit and builtin functions
git-am: Do not exit silently if committer is unset
t/test-lib.sh: exit with small negagive int is ok with test_must_fail
t/: Use "test_must_fail git" instead of "! git"
Make usage strings dash-less
git-am/git-mailsplit: correct synopsis for reading from stdin
t3404: test two "preserve merges with -p" cases
Make rebase--interactive use OPTIONS_SPEC
rebase-i: keep old parents when preserving merges
api-run-command.txt: typofix
Link git-shell only to a subset of libgit.a
git-am: Add colon before the subject that is printed out as being applied
am --abort: Add to bash-completion and mention in git-rerere documentation
Make non-static functions, that may be static, static
Move launch_editor() from builtin-tag.c to editor.c
editor.c: Libify launch_editor()
git-am: Mention --abort in usage string part of OPTIONS_SPEC
git-reset: Let -q hush "locally modified" messages
builtin-revert.c: typofix
git-am: ignore --binary option
git-stash: improve synopsis in help and manual page
Improve error output of git-rebase
Stephen R. van den Berg (1):
git-daemon: SysV needs the signal handler reinstated.
Steve Haslam (3):
Propagate -u/--upload-pack option of "git clone" to transport.
Remove references to git-fetch-pack from "git clone" documentation.
Propagate -u/--upload-pack option of "git clone" to transport.
Steven Grimm (1):
Optimize sha1_object_info for loose objects, not concurrent repacks
SungHyun Nam (1):
t/Makefile: use specified shell when running aggregation script
Sverre Hvammen Johansen (1):
reduce_heads(): thinkofix
Sverre Rabbelier (2):
Modify test-lib.sh to output stats to t/test-results/*
Hook up the result aggregation in the test makefile.
Ted Percival (1):
Don't use dash commands (git-foo) in tutorial-2
Teemu Likonen (3):
bash: Add more option completions for 'git log'
Add target "install-html" the the top level Makefile
bash: Add long option completion for 'git send-email'
Thomas Rast (18):
git-send-email: add support for TLS via Net::SMTP::SSL
git-send-email: prevent undefined variable warnings if no encryption is set
Fix 'git show' on signed tag of signed tag of commit
git-add--interactive: replace hunk recounting with apply --recount
git-add--interactive: remove hunk coalescing
git-add--interactive: manual hunk editing mode
git-send-email: Do not attempt to STARTTLS more than once
Fix apply --recount handling of no-EOL line
git-completion.bash: provide completion for 'show-branch'
bash completion: Add long options for 'git describe'
Documentation: commit-tree: remove 16 parents restriction
Documentation: filter-branch: document how to filter all refs
filter-branch: be more helpful when an annotated tag changes
Documentation: rev-list-options: Fix -g paragraph formatting
Documentation: rev-list-options: Fix a typo
Documentation: rev-list-options: Rewrite simplification descriptions for clarity
rebase -i -p: handle index and workdir correctly
rebase -i -p: fix parent rewriting
Todd Zullinger (1):
Replace uses of "git-var" with "git var"
^ permalink raw reply [relevance 1%]
* [PATCH 0/4] tests: use "git xyzzy" form
@ 2008-09-03 8:59 4% Nanako Shiraishi
0 siblings, 0 replies; 200+ results
From: Nanako Shiraishi @ 2008-09-03 8:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
These four patches update test scripts to use "git xyzzy" format so that
they can serve as sample usage for git commands better.
[PATCH 1/4] tests: use "git xyzzy" form (t0000 - t3599)
[PATCH 2/4] tests: use "git xyzzy" form (t3600 - t6999)
[PATCH 3/4] tests: use "git xyzzy" form (t7000 - t7199)
[PATCH 4/4] tests: use "git xyzzy" form (t7200 - t9001)
t/t0050-filesystem.sh | 2 +-
t/t1007-hash-object.sh | 2 +-
t/t1200-tutorial.sh | 2 +-
t/t1303-wacky-config.sh | 2 +-
t/t1400-update-ref.sh | 10 +-
t/t1503-rev-parse-verify.sh | 2 +-
t/t2005-checkout-index-symlinks.sh | 4 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2101-update-index-reupdate.sh | 2 +-
t/t2102-update-index-symlinks.sh | 2 +-
t/t2200-add-update.sh | 12 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 2 +-
t/t3030-merge-recursive.sh | 14 +-
t/t3200-branch.sh | 58 +++---
t/t3210-pack-refs.sh | 4 +-
t/t3400-rebase.sh | 6 +-
t/t3401-rebase-partial.sh | 22 ++--
t/t3403-rebase-skip.sh | 2 +-
t/t3404-rebase-interactive.sh | 2 +-
t/t3407-rebase-abort.sh | 2 +-
t/t3500-cherry.sh | 12 +-
t/t3600-rm.sh | 4 +-
t/t3800-mktag.sh | 12 +-
t/t3900-i18n-commit.sh | 6 +-
t/t3901-i18n-patch.sh | 16 +-
t/t3903-stash.sh | 2 +-
t/t4012-diff-binary.sh | 4 +-
t/t4103-apply-binary.sh | 26 ++--
t/t4124-apply-ws-rule.sh | 2 +-
t/t4127-apply-same-fn.sh | 4 +-
t/t4150-am.sh | 2 +-
t/t4151-am-abort.sh | 4 +-
t/t5300-pack-object.sh | 14 +-
t/t5301-sliding-window.sh | 4 +-
t/t5302-pack-index.sh | 12 +-
t/t5400-send-pack.sh | 30 ++--
t/t5401-update-hooks.sh | 4 +-
t/t5402-post-merge-hook.sh | 4 +-
t/t5403-post-checkout-hook.sh | 4 +-
t/t5500-fetch-pack.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5530-upload-pack-error.sh | 4 +-
t/t5600-clone-fail-cleanup.sh | 12 +-
t/t5602-clone-remote-exec.sh | 4 +-
t/t6006-rev-list-format.sh | 6 +-
t/t6025-merge-symlinks.sh | 32 ++--
t/t6026-merge-attr.sh | 12 +-
t/t6030-bisect-porcelain.sh | 4 +-
t/t6120-describe.sh | 30 ++--
t/t6300-for-each-ref.sh | 28 ++--
t/t7001-mv.sh | 12 +-
t/t7003-filter-branch.sh | 22 ++--
t/t7004-tag.sh | 318 +++++++++++++++++-----------------
t/t7101-reset.sh | 8 +-
t/t7102-reset.sh | 4 +-
t/t7103-reset-bare.sh | 2 +-
t/t7201-co.sh | 2 +-
t/t7300-clean.sh | 72 ++++----
t/t7400-submodule-basic.sh | 48 +++---
t/t7401-submodule-summary.sh | 2 +-
t/t7500-commit.sh | 2 +-
t/t7501-commit.sh | 48 +++---
t/t7502-status.sh | 2 +-
t/t7505-prepare-commit-msg-hook.sh | 2 +-
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 2 +-
t/t7602-merge-octopus-many.sh | 2 +-
t/t7603-merge-reduce-heads.sh | 2 +-
t/t7604-merge-custom-message.sh | 2 +-
t/t7605-merge-resolve.sh | 2 +-
t/t7610-mergetool.sh | 2 +-
t/t7701-repack-unpack-unreachable.sh | 2 +-
t/t9001-send-email.sh | 2 +-
75 files changed, 513 insertions(+), 513 deletions(-)
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
^ permalink raw reply [relevance 4%]
* [PATCH 3/4] tests: use "git xyzzy" form (t7000 - t7199)
@ 2008-09-03 8:59 4% Nanako Shiraishi
0 siblings, 0 replies; 200+ results
From: Nanako Shiraishi @ 2008-09-03 8:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Converts tests between t7001-t7103.
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
---
t/t7001-mv.sh | 12 +-
t/t7003-filter-branch.sh | 22 ++--
t/t7004-tag.sh | 318 +++++++++++++++++++++++-----------------------
t/t7101-reset.sh | 8 +-
t/t7102-reset.sh | 4 +-
t/t7103-reset-bare.sh | 2 +-
6 files changed, 183 insertions(+), 183 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 7816798..575ef5b 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -10,3 +10,3 @@ test_expect_success \
git add path0/COPYING &&
- git-commit -m add -a'
+ git commit -m add -a'
@@ -19,3 +19,3 @@ test_expect_success \
'commiting the change' \
- 'cd .. && git-commit -m move-out -a'
+ 'cd .. && git commit -m move-out -a'
@@ -33,3 +33,3 @@ test_expect_success \
'commiting the change' \
- 'cd .. && git-commit -m move-in -a'
+ 'cd .. && git commit -m move-in -a'
@@ -44,3 +44,3 @@ test_expect_success \
git add path0/README &&
- git-commit -m add2 -a'
+ git commit -m add2 -a'
@@ -52,3 +52,3 @@ test_expect_success \
'commiting the change' \
- 'git-commit -m dir-move -a'
+ 'git commit -m dir-move -a'
@@ -71,3 +71,3 @@ test_expect_success \
'commiting the change' \
- 'git-commit -m dir-move -a'
+ 'git commit -m dir-move -a'
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 95f13a8..b0a9d7d 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -2,3 +2,3 @@
-test_description='git-filter-branch'
+test_description='git filter-branch'
. ./test-lib.sh
@@ -34,3 +34,3 @@ H=$(git rev-parse H)
test_expect_success 'rewrite identically' '
- git-filter-branch branch
+ git filter-branch branch
'
@@ -41,3 +41,3 @@ test_expect_success 'result is really identical' '
test_expect_success 'rewrite bare repository identically' '
- (git config core.bare true && cd .git && git-filter-branch branch)
+ (git config core.bare true && cd .git && git filter-branch branch)
'
@@ -49,3 +49,3 @@ test_expect_success 'result is really identical' '
test_expect_success 'rewrite, renaming a specific file' '
- git-filter-branch -f --tree-filter "mv d doh || :" HEAD
+ git filter-branch -f --tree-filter "mv d doh || :" HEAD
'
@@ -60,3 +60,3 @@ test_expect_success 'test that the file was renamed' '
test_expect_success 'rewrite, renaming a specific directory' '
- git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD
+ git filter-branch -f --tree-filter "mv dir diroh || :" HEAD
'
@@ -75,3 +75,3 @@ test_expect_success 'rewrite one branch, keeping a side branch' '
git branch modD oldD &&
- git-filter-branch -f --tree-filter "mv b boh || :" D..modD
+ git filter-branch -f --tree-filter "mv b boh || :" D..modD
'
@@ -99,3 +99,3 @@ test_expect_success 'filter subdirectory only' '
git branch sub-earlier HEAD~2 &&
- git-filter-branch -f --subdirectory-filter subdir \
+ git filter-branch -f --subdirectory-filter subdir \
refs/heads/sub refs/heads/sub-earlier
@@ -126,3 +126,3 @@ test_expect_success 'use index-filter to move into a subdirectory' '
git branch directorymoved &&
- git-filter-branch -f --index-filter \
+ git filter-branch -f --index-filter \
"git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
@@ -135,3 +135,3 @@ test_expect_success 'stops when msg filter fails' '
old=$(git rev-parse HEAD) &&
- test_must_fail git-filter-branch -f --msg-filter false HEAD &&
+ test_must_fail git filter-branch -f --msg-filter false HEAD &&
test $old = $(git rev-parse HEAD) &&
@@ -146,3 +146,3 @@ test_expect_success 'author information is preserved' '
git branch preserved-author &&
- git-filter-branch -f --msg-filter "cat; \
+ git filter-branch -f --msg-filter "cat; \
test \$GIT_COMMIT != $(git rev-parse master) || \
@@ -158,3 +158,3 @@ test_expect_success "remove a certain author's commits" '
git branch removed-author &&
- git-filter-branch -f --commit-filter "\
+ git filter-branch -f --commit-filter "\
if [ \"\$GIT_AUTHOR_NAME\" = \"B V Uips\" ];\
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 198244c..f0edbf1 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -5,3 +5,3 @@
-test_description='git-tag
+test_description='git tag
@@ -24,4 +24,4 @@ test_expect_success 'listing all tags in an empty tree should succeed' '
test_expect_success 'listing all tags in an empty tree should output nothing' '
- test `git-tag -l | wc -l` -eq 0 &&
- test `git-tag | wc -l` -eq 0
+ test `git tag -l | wc -l` -eq 0 &&
+ test `git tag | wc -l` -eq 0
'
@@ -32,3 +32,3 @@ test_expect_success 'looking for a tag in an empty tree should fail' \
test_expect_success 'creating a tag in an empty tree should fail' '
- test_must_fail git-tag mynotag &&
+ test_must_fail git tag mynotag &&
! tag_exists mynotag
@@ -37,3 +37,3 @@ test_expect_success 'creating a tag in an empty tree should fail' '
test_expect_success 'creating a tag for HEAD in an empty tree should fail' '
- test_must_fail git-tag mytaghead HEAD &&
+ test_must_fail git tag mytaghead HEAD &&
! tag_exists mytaghead
@@ -42,3 +42,3 @@ test_expect_success 'creating a tag for HEAD in an empty tree should fail' '
test_expect_success 'creating a tag for an unknown revision should fail' '
- test_must_fail git-tag mytagnorev aaaaaaaaaaa &&
+ test_must_fail git tag mytagnorev aaaaaaaaaaa &&
! tag_exists mytagnorev
@@ -56,4 +56,4 @@ test_expect_success 'creating a tag using default HEAD should succeed' '
test_expect_success 'listing all tags if one exists should succeed' '
- git-tag -l &&
- git-tag
+ git tag -l &&
+ git tag
'
@@ -61,4 +61,4 @@ test_expect_success 'listing all tags if one exists should succeed' '
test_expect_success 'listing all tags if one exists should output that tag' '
- test `git-tag -l` = mytag &&
- test `git-tag` = mytag
+ test `git tag -l` = mytag &&
+ test `git tag` = mytag
'
@@ -68,3 +68,3 @@ test_expect_success 'listing all tags if one exists should output that tag' '
test_expect_success 'listing a tag using a matching pattern should succeed' \
- 'git-tag -l mytag'
+ 'git tag -l mytag'
@@ -72,3 +72,3 @@ test_expect_success \
'listing a tag using a matching pattern should output that tag' \
- 'test `git-tag -l mytag` = mytag'
+ 'test `git tag -l mytag` = mytag'
@@ -77,3 +77,3 @@ test_expect_success \
'listing tags using a non-matching pattern should suceed' \
- 'git-tag -l xxx'
+ 'git tag -l xxx'
@@ -81,3 +81,3 @@ test_expect_success \
'listing tags using a non-matching pattern should output nothing' \
- 'test `git-tag -l xxx | wc -l` -eq 0'
+ 'test `git tag -l xxx | wc -l` -eq 0'
@@ -91,3 +91,3 @@ test_expect_success \
'trying to create a tag with a non-valid name should fail' '
- test `git-tag -l | wc -l` -eq 1 &&
+ test `git tag -l | wc -l` -eq 1 &&
test_must_fail git tag "" &&
@@ -97,3 +97,3 @@ test_expect_success \
test_must_fail git tag "other~tag" &&
- test `git-tag -l | wc -l` -eq 1
+ test `git tag -l | wc -l` -eq 1
'
@@ -109,3 +109,3 @@ test_expect_success 'trying to delete an unknown tag should fail' '
! tag_exists unknown-tag &&
- test_must_fail git-tag -d unknown-tag
+ test_must_fail git tag -d unknown-tag
'
@@ -119,3 +119,3 @@ test_expect_success \
git tag -l > actual && test_cmp expect actual &&
- git-tag -d &&
+ git tag -d &&
git tag -l > actual && test_cmp expect actual
@@ -127,3 +127,3 @@ test_expect_success \
tag_exists myhead &&
- git-tag -d mytag myhead &&
+ git tag -d mytag myhead &&
! tag_exists mytag &&
@@ -135,3 +135,3 @@ test_expect_success \
! tag_exists mytag &&
- git-tag mytag &&
+ git tag mytag &&
tag_exists mytag
@@ -143,3 +143,3 @@ test_expect_success \
! tag_exists myhead &&
- test_must_fail git-tag -d mytag anothertag &&
+ test_must_fail git tag -d mytag anothertag &&
! tag_exists mytag &&
@@ -149,3 +149,3 @@ test_expect_success \
test_expect_success 'trying to delete an already deleted tag should fail' \
- 'test_must_fail git-tag -d mytag'
+ 'test_must_fail git tag -d mytag'
@@ -187,3 +187,3 @@ test_expect_success \
'listing tags with substring as pattern must print those matching' '
- git-tag -l "*a*" > actual &&
+ git tag -l "*a*" > actual &&
test_cmp expect actual
@@ -197,3 +197,3 @@ test_expect_success \
'listing tags with a suffix as pattern must print those matching' '
- git-tag -l "*.1" > actual &&
+ git tag -l "*.1" > actual &&
test_cmp expect actual
@@ -207,3 +207,3 @@ test_expect_success \
'listing tags with a prefix as pattern must print those matching' '
- git-tag -l "t21*" > actual &&
+ git tag -l "t21*" > actual &&
test_cmp expect actual
@@ -216,3 +216,3 @@ test_expect_success \
'listing tags using a name as pattern must print that one matching' '
- git-tag -l a1 > actual &&
+ git tag -l a1 > actual &&
test_cmp expect actual
@@ -225,3 +225,3 @@ test_expect_success \
'listing tags using a name as pattern must print that one matching' '
- git-tag -l v1.0 > actual &&
+ git tag -l v1.0 > actual &&
test_cmp expect actual
@@ -235,3 +235,3 @@ test_expect_success \
'listing tags with ? in the pattern should print those matching' '
- git-tag -l "v1.?.?" > actual &&
+ git tag -l "v1.?.?" > actual &&
test_cmp expect actual
@@ -242,3 +242,3 @@ test_expect_success \
'listing tags using v.* should print nothing because none have v.' '
- git-tag -l "v.*" > actual &&
+ git tag -l "v.*" > actual &&
test_cmp expect actual
@@ -254,3 +254,3 @@ test_expect_success \
'listing tags using v* should print only those having v' '
- git-tag -l "v*" > actual &&
+ git tag -l "v*" > actual &&
test_cmp expect actual
@@ -262,3 +262,3 @@ test_expect_success \
'a non-annotated tag created without parameters should point to HEAD' '
- git-tag non-annotated-tag &&
+ git tag non-annotated-tag &&
test $(git cat-file -t non-annotated-tag) = commit &&
@@ -268,3 +268,3 @@ test_expect_success \
test_expect_success 'trying to verify an unknown tag should fail' \
- 'test_must_fail git-tag -v unknown-tag'
+ 'test_must_fail git tag -v unknown-tag'
@@ -272,3 +272,3 @@ test_expect_success \
'trying to verify a non-annotated and non-signed tag should fail' \
- 'test_must_fail git-tag -v non-annotated-tag'
+ 'test_must_fail git tag -v non-annotated-tag'
@@ -276,3 +276,3 @@ test_expect_success \
'trying to verify many non-annotated or unknown tags, should fail' \
- 'test_must_fail git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
+ 'test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2'
@@ -302,3 +302,3 @@ test_expect_success \
'creating an annotated tag with -m message should succeed' '
- git-tag -m "A message" annotated-tag &&
+ git tag -m "A message" annotated-tag &&
get_tag_msg annotated-tag >actual &&
@@ -315,3 +315,3 @@ test_expect_success \
'creating an annotated tag with -F messagefile should succeed' '
- git-tag -F msgfile file-annotated-tag &&
+ git tag -F msgfile file-annotated-tag &&
get_tag_msg file-annotated-tag >actual &&
@@ -327,3 +327,3 @@ cat inputmsg >>expect
test_expect_success 'creating an annotated tag with -F - should succeed' '
- git-tag -F - stdin-annotated-tag <inputmsg &&
+ git tag -F - stdin-annotated-tag <inputmsg &&
get_tag_msg stdin-annotated-tag >actual &&
@@ -336,3 +336,3 @@ test_expect_success \
! tag_exists notag &&
- test_must_fail git-tag -F nonexistingfile notag &&
+ test_must_fail git tag -F nonexistingfile notag &&
! tag_exists notag
@@ -345,7 +345,7 @@ test_expect_success \
! tag_exists msgtag &&
- test_must_fail git-tag -m "message 1" -F msgfile1 msgtag &&
+ test_must_fail git tag -m "message 1" -F msgfile1 msgtag &&
! tag_exists msgtag &&
- test_must_fail git-tag -F msgfile1 -m "message 1" msgtag &&
+ test_must_fail git tag -F msgfile1 -m "message 1" msgtag &&
! tag_exists msgtag &&
- test_must_fail git-tag -m "message 1" -F msgfile1 \
+ test_must_fail git tag -m "message 1" -F msgfile1 \
-m "message 2" msgtag &&
@@ -359,3 +359,3 @@ test_expect_success \
'creating a tag with an empty -m message should succeed' '
- git-tag -m "" empty-annotated-tag &&
+ git tag -m "" empty-annotated-tag &&
get_tag_msg empty-annotated-tag >actual &&
@@ -368,3 +368,3 @@ test_expect_success \
'creating a tag with an empty -F messagefile should succeed' '
- git-tag -F emptyfile emptyfile-annotated-tag &&
+ git tag -F emptyfile emptyfile-annotated-tag &&
get_tag_msg emptyfile-annotated-tag >actual &&
@@ -389,3 +389,3 @@ test_expect_success \
'extra blanks in the message for an annotated tag should be removed' '
- git-tag -F blanksfile blanks-annotated-tag &&
+ git tag -F blanksfile blanks-annotated-tag &&
get_tag_msg blanks-annotated-tag >actual &&
@@ -397,3 +397,3 @@ test_expect_success \
'creating a tag with blank -m message with spaces should succeed' '
- git-tag -m " " blank-annotated-tag &&
+ git tag -m " " blank-annotated-tag &&
get_tag_msg blank-annotated-tag >actual &&
@@ -408,3 +408,3 @@ test_expect_success \
'creating a tag with blank -F messagefile with spaces should succeed' '
- git-tag -F blankfile blankfile-annotated-tag &&
+ git tag -F blankfile blankfile-annotated-tag &&
get_tag_msg blankfile-annotated-tag >actual &&
@@ -417,3 +417,3 @@ test_expect_success \
'creating a tag with -F file of spaces and no newline should succeed' '
- git-tag -F blanknonlfile blanknonlfile-annotated-tag &&
+ git tag -F blanknonlfile blanknonlfile-annotated-tag &&
get_tag_msg blanknonlfile-annotated-tag >actual &&
@@ -452,3 +452,3 @@ test_expect_success \
'creating a tag using a -F messagefile with #comments should succeed' '
- git-tag -F commentsfile comments-annotated-tag &&
+ git tag -F commentsfile comments-annotated-tag &&
get_tag_msg comments-annotated-tag >actual &&
@@ -460,3 +460,3 @@ test_expect_success \
'creating a tag with a #comment in the -m message should succeed' '
- git-tag -m "#comment" comment-annotated-tag &&
+ git tag -m "#comment" comment-annotated-tag &&
get_tag_msg comment-annotated-tag >actual &&
@@ -471,3 +471,3 @@ test_expect_success \
'creating a tag with #comments in the -F messagefile should succeed' '
- git-tag -F commentfile commentfile-annotated-tag &&
+ git tag -F commentfile commentfile-annotated-tag &&
get_tag_msg commentfile-annotated-tag >actual &&
@@ -480,3 +480,3 @@ test_expect_success \
'creating a tag with a file of #comment and no newline should succeed' '
- git-tag -F commentnonlfile commentnonlfile-annotated-tag &&
+ git tag -F commentnonlfile commentnonlfile-annotated-tag &&
get_tag_msg commentnonlfile-annotated-tag >actual &&
@@ -489,10 +489,10 @@ test_expect_success \
'listing the one-line message of a non-signed tag should succeed' '
- git-tag -m "A msg" tag-one-line &&
+ git tag -m "A msg" tag-one-line &&
echo "tag-one-line" >expect &&
- git-tag -l | grep "^tag-one-line" >actual &&
+ git tag -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^tag-one-line" >actual &&
+ git tag -n0 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l tag-one-line >actual &&
+ git tag -n0 -l tag-one-line >actual &&
test_cmp expect actual &&
@@ -500,11 +500,11 @@ test_expect_success \
echo "tag-one-line A msg" >expect &&
- git-tag -n1 -l | grep "^tag-one-line" >actual &&
+ git tag -n1 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^tag-one-line" >actual &&
+ git tag -n -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l tag-one-line >actual &&
+ git tag -n1 -l tag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n2 -l tag-one-line >actual &&
+ git tag -n2 -l tag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n999 -l tag-one-line >actual &&
+ git tag -n999 -l tag-one-line >actual &&
test_cmp expect actual
@@ -514,10 +514,10 @@ test_expect_success \
'listing the zero-lines message of a non-signed tag should succeed' '
- git-tag -m "" tag-zero-lines &&
+ git tag -m "" tag-zero-lines &&
echo "tag-zero-lines" >expect &&
- git-tag -l | grep "^tag-zero-lines" >actual &&
+ git tag -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^tag-zero-lines" >actual &&
+ git tag -n0 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l tag-zero-lines >actual &&
+ git tag -n0 -l tag-zero-lines >actual &&
test_cmp expect actual &&
@@ -525,11 +525,11 @@ test_expect_success \
echo "tag-zero-lines " >expect &&
- git-tag -n1 -l | grep "^tag-zero-lines" >actual &&
+ git tag -n1 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^tag-zero-lines" >actual &&
+ git tag -n -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l tag-zero-lines >actual &&
+ git tag -n1 -l tag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n2 -l tag-zero-lines >actual &&
+ git tag -n2 -l tag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n999 -l tag-zero-lines >actual &&
+ git tag -n999 -l tag-zero-lines >actual &&
test_cmp expect actual
@@ -542,10 +542,10 @@ test_expect_success \
'listing many message lines of a non-signed tag should succeed' '
- git-tag -F annotagmsg tag-lines &&
+ git tag -F annotagmsg tag-lines &&
echo "tag-lines" >expect &&
- git-tag -l | grep "^tag-lines" >actual &&
+ git tag -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^tag-lines" >actual &&
+ git tag -n0 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l tag-lines >actual &&
+ git tag -n0 -l tag-lines >actual &&
test_cmp expect actual &&
@@ -553,7 +553,7 @@ test_expect_success \
echo "tag-lines tag line one" >expect &&
- git-tag -n1 -l | grep "^tag-lines" >actual &&
+ git tag -n1 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^tag-lines" >actual &&
+ git tag -n -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l tag-lines >actual &&
+ git tag -n1 -l tag-lines >actual &&
test_cmp expect actual &&
@@ -561,5 +561,5 @@ test_expect_success \
echo " tag line two" >>expect &&
- git-tag -n2 -l | grep "^ *tag.line" >actual &&
+ git tag -n2 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n2 -l tag-lines >actual &&
+ git tag -n2 -l tag-lines >actual &&
test_cmp expect actual &&
@@ -567,13 +567,13 @@ test_expect_success \
echo " tag line three" >>expect &&
- git-tag -n3 -l | grep "^ *tag.line" >actual &&
+ git tag -n3 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n3 -l tag-lines >actual &&
+ git tag -n3 -l tag-lines >actual &&
test_cmp expect actual &&
- git-tag -n4 -l | grep "^ *tag.line" >actual &&
+ git tag -n4 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n4 -l tag-lines >actual &&
+ git tag -n4 -l tag-lines >actual &&
test_cmp expect actual &&
- git-tag -n99 -l | grep "^ *tag.line" >actual &&
+ git tag -n99 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n99 -l tag-lines >actual &&
+ git tag -n99 -l tag-lines >actual &&
test_cmp expect actual
@@ -594,3 +594,3 @@ test_expect_success \
tag_exists annotated-tag &&
- test_must_fail git-tag -v annotated-tag
+ test_must_fail git tag -v annotated-tag
'
@@ -600,3 +600,3 @@ test_expect_success \
tag_exists file-annotated-tag &&
- test_must_fail git-tag -v file-annotated-tag
+ test_must_fail git tag -v file-annotated-tag
'
@@ -606,3 +606,3 @@ test_expect_success \
tag_exists annotated-tag file-annotated-tag &&
- test_must_fail git-tag -v annotated-tag file-annotated-tag
+ test_must_fail git tag -v annotated-tag file-annotated-tag
'
@@ -636,3 +636,3 @@ echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success 'creating a signed tag with -m message should succeed' '
- git-tag -s -m "A signed tag message" signed-tag &&
+ git tag -s -m "A signed tag message" signed-tag &&
get_tag_msg signed-tag >actual &&
@@ -677,3 +677,3 @@ echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success '-u implies signed tag' '
- GIT_EDITOR=./fakeeditor git-tag -u CDDE430D implied-sign &&
+ GIT_EDITOR=./fakeeditor git tag -u CDDE430D implied-sign &&
get_tag_msg implied-sign >actual &&
@@ -691,3 +691,3 @@ test_expect_success \
'creating a signed tag with -F messagefile should succeed' '
- git-tag -s -F sigmsgfile file-signed-tag &&
+ git tag -s -F sigmsgfile file-signed-tag &&
get_tag_msg file-signed-tag >actual &&
@@ -704,3 +704,3 @@ echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success 'creating a signed tag with -F - should succeed' '
- git-tag -s -F - stdin-signed-tag <siginputmsg &&
+ git tag -s -F - stdin-signed-tag <siginputmsg &&
get_tag_msg stdin-signed-tag >actual &&
@@ -713,3 +713,3 @@ echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success '-s implies annotated tag' '
- GIT_EDITOR=./fakeeditor git-tag -s implied-annotate &&
+ GIT_EDITOR=./fakeeditor git tag -s implied-annotate &&
get_tag_msg implied-annotate >actual &&
@@ -722,3 +722,3 @@ test_expect_success \
! tag_exists nosigtag &&
- test_must_fail git-tag -s -F nonexistingfile nosigtag &&
+ test_must_fail git tag -s -F nonexistingfile nosigtag &&
! tag_exists nosigtag
@@ -727,6 +727,6 @@ test_expect_success \
test_expect_success 'verifying a signed tag should succeed' \
- 'git-tag -v signed-tag'
+ 'git tag -v signed-tag'
test_expect_success 'verifying two signed tags in one command should succeed' \
- 'git-tag -v signed-tag file-signed-tag'
+ 'git tag -v signed-tag file-signed-tag'
@@ -734,7 +734,7 @@ test_expect_success \
'verifying many signed and non-signed tags should fail' '
- test_must_fail git-tag -v signed-tag annotated-tag &&
- test_must_fail git-tag -v file-annotated-tag file-signed-tag &&
- test_must_fail git-tag -v annotated-tag \
+ test_must_fail git tag -v signed-tag annotated-tag &&
+ test_must_fail git tag -v file-annotated-tag file-signed-tag &&
+ test_must_fail git tag -v annotated-tag \
file-signed-tag file-annotated-tag &&
- test_must_fail git-tag -v signed-tag annotated-tag file-signed-tag
+ test_must_fail git tag -v signed-tag annotated-tag file-signed-tag
'
@@ -746,3 +746,3 @@ test_expect_success 'verifying a forged tag should fail' '
git tag forged-tag $forged &&
- test_must_fail git-tag -v forged-tag
+ test_must_fail git tag -v forged-tag
'
@@ -755,6 +755,6 @@ test_expect_success \
'creating a signed tag with an empty -m message should succeed' '
- git-tag -s -m "" empty-signed-tag &&
+ git tag -s -m "" empty-signed-tag &&
get_tag_msg empty-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v empty-signed-tag
+ git tag -v empty-signed-tag
'
@@ -766,6 +766,6 @@ test_expect_success \
'creating a signed tag with an empty -F messagefile should succeed' '
- git-tag -s -F sigemptyfile emptyfile-signed-tag &&
+ git tag -s -F sigemptyfile emptyfile-signed-tag &&
get_tag_msg emptyfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v emptyfile-signed-tag
+ git tag -v emptyfile-signed-tag
'
@@ -789,6 +789,6 @@ test_expect_success \
'extra blanks in the message for a signed tag should be removed' '
- git-tag -s -F sigblanksfile blanks-signed-tag &&
+ git tag -s -F sigblanksfile blanks-signed-tag &&
get_tag_msg blanks-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v blanks-signed-tag
+ git tag -v blanks-signed-tag
'
@@ -799,6 +799,6 @@ test_expect_success \
'creating a signed tag with a blank -m message should succeed' '
- git-tag -s -m " " blank-signed-tag &&
+ git tag -s -m " " blank-signed-tag &&
get_tag_msg blank-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v blank-signed-tag
+ git tag -v blank-signed-tag
'
@@ -812,6 +812,6 @@ test_expect_success \
'creating a signed tag with blank -F file with spaces should succeed' '
- git-tag -s -F sigblankfile blankfile-signed-tag &&
+ git tag -s -F sigblankfile blankfile-signed-tag &&
get_tag_msg blankfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v blankfile-signed-tag
+ git tag -v blankfile-signed-tag
'
@@ -823,6 +823,6 @@ test_expect_success \
'creating a signed tag with spaces and no newline should succeed' '
- git-tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
+ git tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
get_tag_msg blanknonlfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v signed-tag
+ git tag -v signed-tag
'
@@ -860,6 +860,6 @@ test_expect_success \
'creating a signed tag with a -F file with #comments should succeed' '
- git-tag -s -F sigcommentsfile comments-signed-tag &&
+ git tag -s -F sigcommentsfile comments-signed-tag &&
get_tag_msg comments-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v comments-signed-tag
+ git tag -v comments-signed-tag
'
@@ -870,6 +870,6 @@ test_expect_success \
'creating a signed tag with #commented -m message should succeed' '
- git-tag -s -m "#comment" comment-signed-tag &&
+ git tag -s -m "#comment" comment-signed-tag &&
get_tag_msg comment-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v comment-signed-tag
+ git tag -v comment-signed-tag
'
@@ -883,6 +883,6 @@ test_expect_success \
'creating a signed tag with #commented -F messagefile should succeed' '
- git-tag -s -F sigcommentfile commentfile-signed-tag &&
+ git tag -s -F sigcommentfile commentfile-signed-tag &&
get_tag_msg commentfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v commentfile-signed-tag
+ git tag -v commentfile-signed-tag
'
@@ -894,6 +894,6 @@ test_expect_success \
'creating a signed tag with a #comment and no newline should succeed' '
- git-tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
+ git tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
get_tag_msg commentnonlfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v commentnonlfile-signed-tag
+ git tag -v commentnonlfile-signed-tag
'
@@ -904,10 +904,10 @@ test_expect_success \
'listing the one-line message of a signed tag should succeed' '
- git-tag -s -m "A message line signed" stag-one-line &&
+ git tag -s -m "A message line signed" stag-one-line &&
echo "stag-one-line" >expect &&
- git-tag -l | grep "^stag-one-line" >actual &&
+ git tag -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^stag-one-line" >actual &&
+ git tag -n0 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l stag-one-line >actual &&
+ git tag -n0 -l stag-one-line >actual &&
test_cmp expect actual &&
@@ -915,11 +915,11 @@ test_expect_success \
echo "stag-one-line A message line signed" >expect &&
- git-tag -n1 -l | grep "^stag-one-line" >actual &&
+ git tag -n1 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^stag-one-line" >actual &&
+ git tag -n -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l stag-one-line >actual &&
+ git tag -n1 -l stag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n2 -l stag-one-line >actual &&
+ git tag -n2 -l stag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n999 -l stag-one-line >actual &&
+ git tag -n999 -l stag-one-line >actual &&
test_cmp expect actual
@@ -929,10 +929,10 @@ test_expect_success \
'listing the zero-lines message of a signed tag should succeed' '
- git-tag -s -m "" stag-zero-lines &&
+ git tag -s -m "" stag-zero-lines &&
echo "stag-zero-lines" >expect &&
- git-tag -l | grep "^stag-zero-lines" >actual &&
+ git tag -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^stag-zero-lines" >actual &&
+ git tag -n0 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l stag-zero-lines >actual &&
+ git tag -n0 -l stag-zero-lines >actual &&
test_cmp expect actual &&
@@ -940,11 +940,11 @@ test_expect_success \
echo "stag-zero-lines " >expect &&
- git-tag -n1 -l | grep "^stag-zero-lines" >actual &&
+ git tag -n1 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^stag-zero-lines" >actual &&
+ git tag -n -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l stag-zero-lines >actual &&
+ git tag -n1 -l stag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n2 -l stag-zero-lines >actual &&
+ git tag -n2 -l stag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n999 -l stag-zero-lines >actual &&
+ git tag -n999 -l stag-zero-lines >actual &&
test_cmp expect actual
@@ -957,10 +957,10 @@ test_expect_success \
'listing many message lines of a signed tag should succeed' '
- git-tag -s -F sigtagmsg stag-lines &&
+ git tag -s -F sigtagmsg stag-lines &&
echo "stag-lines" >expect &&
- git-tag -l | grep "^stag-lines" >actual &&
+ git tag -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^stag-lines" >actual &&
+ git tag -n0 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l stag-lines >actual &&
+ git tag -n0 -l stag-lines >actual &&
test_cmp expect actual &&
@@ -968,7 +968,7 @@ test_expect_success \
echo "stag-lines stag line one" >expect &&
- git-tag -n1 -l | grep "^stag-lines" >actual &&
+ git tag -n1 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^stag-lines" >actual &&
+ git tag -n -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l stag-lines >actual &&
+ git tag -n1 -l stag-lines >actual &&
test_cmp expect actual &&
@@ -976,5 +976,5 @@ test_expect_success \
echo " stag line two" >>expect &&
- git-tag -n2 -l | grep "^ *stag.line" >actual &&
+ git tag -n2 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n2 -l stag-lines >actual &&
+ git tag -n2 -l stag-lines >actual &&
test_cmp expect actual &&
@@ -982,13 +982,13 @@ test_expect_success \
echo " stag line three" >>expect &&
- git-tag -n3 -l | grep "^ *stag.line" >actual &&
+ git tag -n3 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n3 -l stag-lines >actual &&
+ git tag -n3 -l stag-lines >actual &&
test_cmp expect actual &&
- git-tag -n4 -l | grep "^ *stag.line" >actual &&
+ git tag -n4 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n4 -l stag-lines >actual &&
+ git tag -n4 -l stag-lines >actual &&
test_cmp expect actual &&
- git-tag -n99 -l | grep "^ *stag.line" >actual &&
+ git tag -n99 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n99 -l stag-lines >actual &&
+ git tag -n99 -l stag-lines >actual &&
test_cmp expect actual
@@ -1007,3 +1007,3 @@ test_expect_success \
'creating a signed tag pointing to a tree should succeed' '
- git-tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&
+ git tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&
get_tag_msg tree-signed-tag >actual &&
@@ -1017,3 +1017,3 @@ test_expect_success \
'creating a signed tag pointing to a blob should succeed' '
- git-tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&
+ git tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&
get_tag_msg blob-signed-tag >actual &&
@@ -1027,3 +1027,3 @@ test_expect_success \
'creating a signed tag pointing to another tag should succeed' '
- git-tag -s -m "A message for another tag" tag-signed-tag signed-tag &&
+ git tag -s -m "A message for another tag" tag-signed-tag signed-tag &&
get_tag_msg tag-signed-tag >actual &&
@@ -1035,3 +1035,3 @@ git config user.signingkey BobTheMouse
test_expect_success \
- 'git-tag -s fails if gpg is misconfigured' \
+ 'git tag -s fails if gpg is misconfigured' \
'test_must_fail git tag -s -m tail tag-gpg-failure'
@@ -1044,6 +1044,6 @@ test_expect_success \
'verify signed tag fails when public key is not present' \
- 'test_must_fail git-tag -v signed-tag'
+ 'test_must_fail git tag -v signed-tag'
test_expect_success \
- 'git-tag -a fails if tag annotation is empty' '
+ 'git tag -a fails if tag annotation is empty' '
! (GIT_EDITOR=cat git tag -a initial-comment)
diff --git a/t/t7101-reset.sh b/t/t7101-reset.sh
index ffaeb39..96e163f 100755
--- a/t/t7101-reset.sh
+++ b/t/t7101-reset.sh
@@ -5,3 +5,3 @@
-test_description='git-reset should cull empty subdirs'
+test_description='git reset should cull empty subdirs'
. ./test-lib.sh
@@ -13,3 +13,3 @@ test_expect_success \
git add path0/COPYING &&
- git-commit -m add -a'
+ git commit -m add -a'
@@ -27,3 +27,3 @@ test_expect_success \
git add path0/COPYING-TOO &&
- git-commit -m change -a'
+ git commit -m change -a'
@@ -31,3 +31,3 @@ test_expect_success \
'resetting tree HEAD^' \
- 'git-reset --hard HEAD^'
+ 'git reset --hard HEAD^'
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index 29f5678..e637c7d 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -5,5 +5,5 @@
-test_description='git-reset
+test_description='git reset
-Documented tests for git-reset'
+Documented tests for git reset'
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index cdecebe..42bf518 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -2,3 +2,3 @@
-test_description='git-reset in a bare repository'
+test_description='git reset in a bare repository'
. ./test-lib.sh
--
1.6.0.1
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
^ permalink raw reply related [relevance 4%]
* [PATCH v2 0/3] Add test cases for "git mv -k" and fix a known breakage.
@ 2009-01-14 17:03 5% ` Michael J Gruber
2009-01-14 17:03 13% ` [PATCH v2 1/3] add test cases for "git mv -k" Michael J Gruber
1 sibling, 1 reply; 200+ results
From: Michael J Gruber @ 2009-01-14 17:03 UTC (permalink / raw)
To: git; +Cc: Johannes Schindelin
This adds test cases for the "-k" option of "git mv", including one
known breakage reported by Matthieu Moy <Matthieu.Moy@imag.fr> which
appears when multiple untracked files are specified as consecutive
arguments. This breakage is fixed in the second patch and marked
"expect_pass" in the last one.
The cumulative code/other ratio is 1 line/27 lines which I blame solely
on Dscho ;) Seriously, feel free to squash. But on the other hand: How
else can I see the beautiful "1 known breakage fixed" other than by
having 2 and 3 separate in this series...
The patch is off master but builtin-mv.c hasn't changed since
81dc2307d0ad87a4da2e753a9d1b5586d6456eed tags/v1.6.0-rc1~1, so I suggest
this patch for maint.
Michael J Gruber (3):
add test cases for "git mv -k"
fix handling of multiple untracked files for git mv -k
mark fixed breakage as expect pass for "git mv -k" multiple files
builtin-mv.c | 1 +
t/t7001-mv.sh | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)
^ permalink raw reply [relevance 5%]
* [PATCH v2 1/3] add test cases for "git mv -k"
2009-01-14 17:03 5% ` [PATCH v2 0/3] Add test cases for "git mv -k" and fix a known breakage Michael J Gruber
@ 2009-01-14 17:03 13% ` Michael J Gruber
0 siblings, 1 reply; 200+ results
From: Michael J Gruber @ 2009-01-14 17:03 UTC (permalink / raw)
To: git; +Cc: Johannes Schindelin
Add test cases for ignoring nonexisting and untracked files using the -k
option to "git mv". There is one known breakage related to multiple
untracked files specfied as consecutive arguments.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
t/t7001-mv.sh | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 575ef5b..5c1485d 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -39,6 +39,31 @@ test_expect_success \
grep "^R100..*path1/COPYING..*path0/COPYING"'
test_expect_success \
+ 'checking -k on non-existing file' \
+ 'git mv -k idontexist path0'
+
+test_expect_success \
+ 'checking -k on untracked file' \
+ 'touch untracked1 &&
+ git mv -k untracked1 path0 &&
+ test -f untracked1 &&
+ test ! -f path0/untracked1'
+
+test_expect_failure \
+ 'checking -k on multiple untracked files' \
+ 'touch untracked2 &&
+ git mv -k untracked1 untracked2 path0 &&
+ test -f untracked1 &&
+ test -f untracked2 &&
+ test ! -f path0/untracked1
+ test ! -f path0/untracked2'
+
+# clean up the mess in case bad things happen
+rm -f idontexist untracked1 untracked2 \
+ path0/idontexist path0/untracked1 path0/untracked2 \
+ .git/index.lock
+
+test_expect_success \
'adding another file' \
'cp "$TEST_DIRECTORY"/../README path0/README &&
git add path0/README &&
--
1.6.0.6
^ permalink raw reply related [relevance 13%]
* [PATCH v2 3/3] mark fixed breakage as expect pass for "git mv -k" multiple files
@ 2009-01-14 17:03 13% ` Michael J Gruber
0 siblings, 0 replies; 200+ results
From: Michael J Gruber @ 2009-01-14 17:03 UTC (permalink / raw)
To: git; +Cc: Johannes Schindelin
The new tests pass now so mark them as such.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
t/t7001-mv.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 5c1485d..ef2e78f 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -49,7 +49,7 @@ test_expect_success \
test -f untracked1 &&
test ! -f path0/untracked1'
-test_expect_failure \
+test_expect_success \
'checking -k on multiple untracked files' \
'touch untracked2 &&
git mv -k untracked1 untracked2 path0 &&
--
1.6.0.6
^ permalink raw reply related [relevance 13%]
* Re: [BUG] assertion failure in builtin-mv.c with "git mv -k"
@ 2009-01-14 19:02 6% ` Junio C Hamano
2009-01-15 10:53 6% ` Michael J Gruber
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2009-01-14 19:02 UTC (permalink / raw)
To: Michael J Gruber; +Cc: Johannes Schindelin, Matthieu Moy, git
Michael J Gruber <git@drmicha.warpmail.net> writes:
> So, should I prepare a series like:
>
> 1: test case and mark known fail
> 2: the 1 line fix
> 3: mark test pass
>
> Or should 2+3 be squashed into one?
If "git mv" already has its own sets of tests with a good coverage, please
strive to add a case that covers your fix to an existing script. Then
step #1 above would be a patch to add a few "test_expect_failure" tests to
an existing file, and step #3 would be a patch to flip expect_failure to
expect_success.
And in such a case, for a single liner, all three can be squashed in to a
single patch. It would show what changed in the code and have a few new
test_expect_success tests added to the test suite, and it would be obvious
to anybody who looks at such a change 6 months down the road that the test
cases added by the patch are the cases that did not work without the
changes to the code. It never makes sense to separate steps #2 and #3 for
any fix.
If "git mv" did not have adequate test coverage, then please add a test
script with both expect_success (for cases that should have been there
when somebody worked on "git mv" originally), and expect_failure to expose
the bug you found in your first patch. Again, the second patch would
update the code and flip expect_failure to expect_success.
I see there is t7001-mv and even though it claims to concentrate on its
operation from subdirectory, it has tests for more basic modes of the
operation.
So my recommendation would be to have a single patch that:
(1) retitles t7001;
(2) adds your new -k tests to it; and
(3) adds the 1-liner fix.
^ permalink raw reply [relevance 6%]
* Re: [BUG] assertion failure in builtin-mv.c with "git mv -k"
2009-01-14 19:02 6% ` Junio C Hamano
@ 2009-01-15 10:53 6% ` Michael J Gruber
0 siblings, 0 replies; 200+ results
From: Michael J Gruber @ 2009-01-15 10:53 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Matthieu Moy, git
Junio C Hamano venit, vidit, dixit 14.01.2009 20:02:
...
> If "git mv" did not have adequate test coverage, then please add a test
> script with both expect_success (for cases that should have been there
> when somebody worked on "git mv" originally), and expect_failure to expose
> the bug you found in your first patch. Again, the second patch would
> update the code and flip expect_failure to expect_success.
>
> I see there is t7001-mv and even though it claims to concentrate on its
> operation from subdirectory, it has tests for more basic modes of the
> operation.
>
> So my recommendation would be to have a single patch that:
>
> (1) retitles t7001;
> (2) adds your new -k tests to it; and
> (3) adds the 1-liner fix.
>
Sorry to bother you again, even after your detailed reply, but I'm a bit
confused in multiple ways (I guess that makes for multiple bits...).
First, you replied to my post, not my patch v2, but (time-wise) after my
patch v2, so I'm not sure whether your reply applies to v2 as well or
that one is OK.
Second, I took the title of t7001 to mean "mv into subdir" or "mv in and
out subdir" in order to distiguish it from "mv oldname newname", albeit
in English that leaves room from improvement.
Third, various parts of that test are in vastly different styles, and I
haven't found any test writing directions other than "follow what is
there", which leaves several alternatives. (Some use the test-lib repo,
some create their own underneath, some make assumptions about the
contents of "$TEST_DIRECTORY"/../.)
Fourth, t7001-mv is missing any test for "mv -k", and 2 of my 3
additional tests cover cases which work (pass) without the fix, which is
why I kept it separate, being unrelated. Following all your arguments
lead to the conclusion I should squash 2+3 (fix + mark expect_pass) -
until I read your conclusion, which says squash all.
I'm happy to follow any variant ("1+2+3", "1 2+3", "1 2 3", in
increasing order of preference) so there's no need to discuss or explain
this further, just tell me "do x" ;)
Cheers,
Michael
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/2] Missing && in t/t7001.sh.
[not found] <1233309819-777-?= =?ISO-8859-1?Q?1-git-send-email?= =?ISO-8859-1?Q?-=0E=10>
@ 2009-01-30 10:36 6% ` Matthieu Moy
0 siblings, 0 replies; 200+ results
From: Matthieu Moy @ 2009-01-30 10:36 UTC (permalink / raw)
To: git
^N^P@imag.fr writes:
^^^^
(Sorry for the bad From: header line. I must have typed something
weird at the git send-email prompt, while I thought I had just typed
"enter")
--
Matthieu
^ permalink raw reply [relevance 6%]
* [PATCH 1/3] Missing && in t/t7001.sh.
@ 2009-02-04 9:32 19% Matthieu Moy
2009-02-04 9:32 13% ` [PATCH 2/3] [BUG] Add a testcase for "git mv -f" on untracked files Matthieu Moy
0 siblings, 1 reply; 200+ results
From: Matthieu Moy @ 2009-02-04 9:32 UTC (permalink / raw)
To: git, gitster; +Cc: Matthieu Moy
Without this, the exit status is only the one of the last line.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
t/t7001-mv.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index ef2e78f..e4dfe95 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -55,7 +55,7 @@ test_expect_success \
git mv -k untracked1 untracked2 path0 &&
test -f untracked1 &&
test -f untracked2 &&
- test ! -f path0/untracked1
+ test ! -f path0/untracked1 &&
test ! -f path0/untracked2'
# clean up the mess in case bad things happen
--
1.6.1.2.321.g68da9
^ permalink raw reply related [relevance 19%]
* [PATCH 2/3] [BUG] Add a testcase for "git mv -f" on untracked files.
2009-02-04 9:32 19% [PATCH 1/3] " Matthieu Moy
@ 2009-02-04 9:32 13% ` Matthieu Moy
2009-02-04 9:32 12% ` [PATCH 3/3] builtin-mv.c: check for unversionned files before looking at the destination Matthieu Moy
0 siblings, 1 reply; 200+ results
From: Matthieu Moy @ 2009-02-04 9:32 UTC (permalink / raw)
To: git, gitster; +Cc: Matthieu Moy
This currently fails with:
git: builtin-mv.c:217: cmd_mv: Assertion `pos >= 0' failed.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
t/t7001-mv.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e4dfe95..52a47b5 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -58,6 +58,14 @@ test_expect_success \
test ! -f path0/untracked1 &&
test ! -f path0/untracked2'
+test_expect_failure \
+ 'checking -f on untracked file with existing target' \
+ 'touch path0/untracked1 &&
+ git mv -f untracked1 path0
+ test ! -f .git/index.lock &&
+ test -f untracked1 &&
+ test -f path0/untracked1'
+
# clean up the mess in case bad things happen
rm -f idontexist untracked1 untracked2 \
path0/idontexist path0/untracked1 path0/untracked2 \
--
1.6.1.2.321.g68da9
^ permalink raw reply related [relevance 13%]
* [PATCH 3/3] builtin-mv.c: check for unversionned files before looking at the destination.
2009-02-04 9:32 13% ` [PATCH 2/3] [BUG] Add a testcase for "git mv -f" on untracked files Matthieu Moy
@ 2009-02-04 9:32 12% ` Matthieu Moy
0 siblings, 0 replies; 200+ results
From: Matthieu Moy @ 2009-02-04 9:32 UTC (permalink / raw)
To: git, gitster; +Cc: Matthieu Moy
The previous code was failing in the case where one moves an
unversionned file to an existing destination, with mv -f: the
"existing destination" was checked first, and the error was cancelled
by the force flag.
We now check the unrecoverable error first, which fixes the bug.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
builtin-mv.c | 8 ++++----
t/t7001-mv.sh | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin-mv.c b/builtin-mv.c
index bce9959..01270fe 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -162,7 +162,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
}
argc += last - first;
}
- } else if (lstat(dst, &st) == 0) {
+ } else if (cache_name_pos(src, length) < 0)
+ bad = "not under version control";
+ else if (lstat(dst, &st) == 0) {
bad = "destination exists";
if (force) {
/*
@@ -177,9 +179,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
} else
bad = "Cannot overwrite";
}
- } else if (cache_name_pos(src, length) < 0)
- bad = "not under version control";
- else if (string_list_has_string(&src_for_dst, dst))
+ } else if (string_list_has_string(&src_for_dst, dst))
bad = "multiple sources for the same target";
else
string_list_insert(dst, &src_for_dst);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 52a47b5..8fb3a56 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -58,7 +58,7 @@ test_expect_success \
test ! -f path0/untracked1 &&
test ! -f path0/untracked2'
-test_expect_failure \
+test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
git mv -f untracked1 path0
--
1.6.1.2.321.g68da9
^ permalink raw reply related [relevance 12%]
* [ANNOUNCE] GIT 1.6.1.3
@ 2009-02-07 21:54 4% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2009-02-07 21:54 UTC (permalink / raw)
To: git; +Cc: linux-kernel
The latest maintenance release GIT 1.6.1.3 is available at the
usual places:
http://www.kernel.org/pub/software/scm/git/
git-1.6.1.3.tar.{gz,bz2} (source tarball)
git-htmldocs-1.6.1.3.tar.{gz,bz2} (preformatted docs)
git-manpages-1.6.1.3.tar.{gz,bz2} (preformatted docs)
The RPM binary packages for a few architectures are also provided
as courtesy.
RPMS/$arch/git-*-1.6.1.3-1.fc9.$arch.rpm (RPM)
GIT v1.6.1.3 Release Notes
==========================
Fixes since v1.6.1.2
--------------------
* "git diff --binary | git apply" pipeline did not work well when
a binary blob is changed to a symbolic link.
* Some combinations of -b/-w/--ignore-space-at-eol to "git diff" did
not work as expected.
* "git grep" did not pass the -I (ignore binary) option when
calling out an external grep program.
* "git log" and friends include HEAD to the set of starting points
when --all is given. This makes a difference when you are not
on any branch.
* "git mv" to move an untracked file to overwrite a tracked
contents misbehaved.
* "git merge -s octopus" with many potential merge bases did not
work correctly.
* RPM binary package installed the html manpages in a wrong place.
Also includes minor documentation fixes and updates.
----------------------------------------------------------------
Changes since v1.6.1.2 are as follows:
Anders Melchiorsen (2):
Documentation: more git push examples
Documentation: rework src/dst description in git push
David J. Mellor (1):
Fixed broken git help -w when installing from RPM
Guanqun Lu (2):
fix typo in Documentation
add test-dump-cache-tree in Makefile
Johannes Schindelin (2):
revision walker: include a detached HEAD in --all
apply: fix access to an uninitialized mode variable, found by valgrind
Junio C Hamano (6):
bundle: allow the same ref to be given more than once
Documentation: simplify refspec format description
diff.c: output correct index lines for a split diff
builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
grep: pass -I (ignore binary) down to external grep
GIT 1.6.1.3
Keith Cascio (2):
test more combinations of ignore-whitespace options to diff
Fix combined use of whitespace ignore options to diff
Linus Torvalds (1):
Wrap inflate and other zlib routines for better error reporting
Matthieu Moy (3):
Missing && in t/t7001.sh.
Add a testcase for "git mv -f" on untracked files.
builtin-mv.c: check for unversionned files before looking at the destination.
René Scharfe (1):
merge: fix out-of-bounds memory access
SZEDER Gábor (1):
Fix gitdir detection when in subdir of gitdir
Stefan Naewe (1):
urls.txt: document optional port specification in git URLS
William Pursell (1):
User-manual: "git stash <comment>" form is long gone
^ permalink raw reply [relevance 4%]
* [PATCH 00/16] Tests on Windows - main part
@ 2009-03-21 21:26 3% Johannes Sixt
2009-03-21 21:26 4% ` [PATCH 10/16] Use prerequisite tags to skip tests that depend on symbolic links Johannes Sixt
0 siblings, 1 reply; 200+ results
From: Johannes Sixt @ 2009-03-21 21:26 UTC (permalink / raw)
To: git; +Cc: Johannes Sixt
This is the remaining set of changes after which the test suite
passes with the MinGW port. Well, almost: There still are a few
failures, but none of them indicate a serious bug. We will address
them later.
The series is again available from here:
git://repo.or.cz/git/mingw/j6t.git for-junio
It builds on js/windows-tests (a8cbc9ab).
The heart of this series is an addition to the test infrastructure:
Tests can be tagged by a keyword, which indicates that a particular
feature ("prerequisite") is needed. This idea was presented by Junio
some time ago, but I didn't save away the implementation.
The new features are used in this way:
1. The prerequisite is tested for and the tag is defined:
if frob --mode=nicate 2>/dev/null; then
test_set_prereq FROBNICATE
else
say "frobnication not possible, skipping some tests
fi
2. Tests are tagged by the tag name:
test_expect_success FROBNICATE 'frobnication' '
frob --mode=nicate
'
Such a test is skipped if the tag was not defined before.
3. The prerequisite can also be tested for explicitly:
if test_have_prereq FROBNICATE; then
expect=foo
else
expect=bar
fi
I have considered a different approach to define prerequisites,
namely with a helper function that is similar to test_expect_*:
test_prereq FROBNICATE 'frobnication' '
frob --mode=nicate 2>/dev/null
'
but I find it a bit obfuscating.
Currently most prerequisites are tested for on demand. Symbolic
links are tested for in test-lib.sh because so many test scripts
need it. An option would be to move each test in its own file
that would then be sourced on demand.
Johannes Sixt (16):
test-lib: Work around incompatible sort and find on Windows
test-lib: Work around missing sum on Windows
Tests on Windows: $(pwd) must return Windows-style paths
t0050: Check whether git init detected symbolic link support
correctly
test-lib: Infrastructure to test and check for prerequisites
t3600: Use test prerequisite tags
Skip tests that fail if the executable bit is not handled by the
filesystem
t5302: Use prerequisite tags to skip 64-bit offset tests
t9100, t9129: Use prerequisite tags for UTF-8 tests
Use prerequisite tags to skip tests that depend on symbolic links
t0060: Fix tests on Windows
Skip tests that require a filesystem that obeys POSIX permissions
t3700: Skip a test with backslashes in pathspec
Use prerequisites to skip tests that need unzip
t7004: Use prerequisite tags to skip tests that need gpg
t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW
t/t0000-basic.sh | 58 +++++++++++++---
t/t0004-unwritable.sh | 8 +-
t/t0024-crlf-archive.sh | 6 +-
t/t0050-filesystem.sh | 28 +++++++-
t/t0055-beyond-symlinks.sh | 6 +-
t/t0060-path-utils.sh | 116 +++++++++++++++++++++++---------
t/t1004-read-tree-m-u-wf.sh | 6 +-
t/t1020-subdirectory.sh | 2 +-
t/t1300-repo-config.sh | 2 +-
t/t1301-shared-repo.sh | 10 ++--
t/t1504-ceiling-dirs.sh | 2 +-
t/t2001-checkout-cache-clash.sh | 6 +-
t/t2003-checkout-cache-mkdir.sh | 8 +-
t/t2004-checkout-cache-temp.sh | 2 +-
t/t2007-checkout-symlink.sh | 6 ++
t/t2100-update-cache-badpath.sh | 14 +++-
t/t2200-add-update.sh | 2 +-
t/t2201-add-update-typechange.sh | 16 ++++-
t/t2300-cd-to-toplevel.sh | 14 ++--
t/t3000-ls-files-others.sh | 7 ++-
t/t3010-ls-files-killed-modified.sh | 17 ++++-
t/t3100-ls-tree-restrict.sh | 40 +++++++----
t/t3200-branch.sh | 2 +-
t/t3600-rm.sh | 58 ++++++++--------
t/t3700-add.sh | 16 ++--
t/t3701-add-interactive.sh | 9 ++-
t/t4004-diff-rename-symlink.sh | 7 ++
t/t4008-diff-break-rewrite.sh | 8 +-
t/t4011-diff-symlink.sh | 7 ++
t/t4023-diff-rename-typechange.sh | 7 ++
t/t4102-apply-rename.sh | 8 ++-
t/t4114-apply-typechange.sh | 7 ++
t/t4115-apply-symlink.sh | 7 ++
t/t4122-apply-symlink-inside.sh | 7 ++
t/t4129-apply-samemode.sh | 19 ++++--
t/t5000-tar-tree.sh | 22 ++++---
t/t5302-pack-index.sh | 15 ++---
t/t5503-tagfollow.sh | 7 ++
t/t5522-pull-symlink.sh | 7 ++
t/t6031-merge-recursive.sh | 13 ++++
t/t6200-fmt-merge-msg.sh | 4 +-
t/t7001-mv.sh | 4 +-
t/t7004-tag.sh | 97 +++++++++++++-------------
t/t7503-pre-commit-hook.sh | 4 +-
t/t7504-commit-msg-hook.sh | 8 +-
t/t9100-git-svn-basic.sh | 37 +++++------
t/t9129-git-svn-i18n-commitencoding.sh | 22 +++---
t/t9131-git-svn-empty-symlink.sh | 2 +-
t/t9132-git-svn-broken-symlink.sh | 4 +-
t/t9200-git-cvsexportcommit.sh | 13 ++--
t/t9500-gitweb-standalone-no-errors.sh | 11 ++-
t/test-lib.sh | 74 +++++++++++++++++++--
52 files changed, 594 insertions(+), 288 deletions(-)
^ permalink raw reply [relevance 3%]
* [PATCH 10/16] Use prerequisite tags to skip tests that depend on symbolic links
2009-03-21 21:26 3% [PATCH 00/16] Tests on Windows - main part Johannes Sixt
@ 2009-03-21 21:26 4% ` Johannes Sixt
0 siblings, 0 replies; 200+ results
From: Johannes Sixt @ 2009-03-21 21:26 UTC (permalink / raw)
To: git; +Cc: Johannes Sixt
Many tests depend on that symbolic links work. This introduces a check
that sets the prerequisite tag SYMLINKS if the file system supports
symbolic links. Since so many tests have to check for this prerequisite,
we do the check in test-lib.sh, so that we don't need to repeat the test
in many scripts.
To check for 'ln -s' failures, you can use a FAT partition on Linux:
$ mkdosfs -C git-on-fat 1000000
$ sudo mount -o loop,uid=j6t,gid=users,shortname=winnt git-on-fat /mnt
Clone git to /mnt and
$ GIT_SKIP_TESTS='t0001.1[34] t0010 t1301 t403[34] t4129.[47] t5701.7
t7701.3 t9100 t9101.26 t9119 t9124.[67] t9200.10 t9600.6' \
make test
(These additionally skipped tests depend on POSIX permissions that FAT on
Linux does not provide.)
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
t/t0000-basic.sh | 43 +++++++++++++++++++++++---------
t/t0055-beyond-symlinks.sh | 6 ++--
t/t1004-read-tree-m-u-wf.sh | 6 ++--
t/t1020-subdirectory.sh | 2 +-
t/t1300-repo-config.sh | 2 +-
t/t2001-checkout-cache-clash.sh | 6 ++--
t/t2003-checkout-cache-mkdir.sh | 8 +++---
t/t2004-checkout-cache-temp.sh | 2 +-
t/t2007-checkout-symlink.sh | 6 ++++
t/t2100-update-cache-badpath.sh | 14 +++++++++-
t/t2200-add-update.sh | 2 +-
t/t2201-add-update-typechange.sh | 16 +++++++++--
t/t2300-cd-to-toplevel.sh | 14 +++++-----
t/t3000-ls-files-others.sh | 7 ++++-
t/t3010-ls-files-killed-modified.sh | 17 ++++++++++--
t/t3100-ls-tree-restrict.sh | 40 +++++++++++++++++++----------
t/t3200-branch.sh | 2 +-
t/t3700-add.sh | 6 ++--
t/t4004-diff-rename-symlink.sh | 7 +++++
t/t4008-diff-break-rewrite.sh | 8 +++---
t/t4011-diff-symlink.sh | 7 +++++
t/t4023-diff-rename-typechange.sh | 7 +++++
t/t4114-apply-typechange.sh | 7 +++++
t/t4115-apply-symlink.sh | 7 +++++
t/t4122-apply-symlink-inside.sh | 7 +++++
t/t5000-tar-tree.sh | 6 +++-
t/t5522-pull-symlink.sh | 7 +++++
t/t7001-mv.sh | 4 +-
t/t9131-git-svn-empty-symlink.sh | 2 +-
t/t9132-git-svn-broken-symlink.sh | 4 +-
t/t9500-gitweb-standalone-no-errors.sh | 11 ++++++--
t/test-lib.sh | 4 +++
32 files changed, 211 insertions(+), 76 deletions(-)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index c53de1f..f4ca4fc 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -115,12 +115,31 @@ test_expect_success \
'test "$tree" = 4b825dc642cb6eb9a060e54bf8d69288fbee4904'
# Various types of objects
+# Some filesystems do not support symblic links; on such systems
+# some expected values are different
mkdir path2 path3 path3/subp3
-for p in path0 path2/file2 path3/file3 path3/subp3/file3
+paths='path0 path2/file2 path3/file3 path3/subp3/file3'
+for p in $paths
do
echo "hello $p" >$p
- ln -s "hello $p" ${p}sym
done
+if test_have_prereq SYMLINKS
+then
+ for p in $paths
+ do
+ ln -s "hello $p" ${p}sym
+ done
+ expectfilter=cat
+ expectedtree=087704a96baf1c2d1c869a8b084481e121c88b5b
+ expectedptree1=21ae8269cacbe57ae09138dcc3a2887f904d02b3
+ expectedptree2=3c5e5399f3a333eddecce7a9b9465b63f65f51e2
+else
+ expectfilter='grep -v sym'
+ expectedtree=8e18edf7d7edcf4371a3ac6ae5f07c2641db7c46
+ expectedptree1=cfb8591b2f65de8b8cc1020cd7d9e67e7793b325
+ expectedptree2=ce580448f0148b985a513b693fdf7d802cacb44f
+fi
+
test_expect_success \
'adding various types of objects with git update-index --add.' \
'find path* ! -type d -print | xargs git update-index --add'
@@ -130,7 +149,7 @@ test_expect_success \
'showing stage with git ls-files --stage' \
'git ls-files --stage >current'
-cat >expected <<\EOF
+$expectfilter >expected <<\EOF
100644 f87290f8eb2cbbea7857214459a0739927eab154 0 path0
120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0 path0sym
100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0 path2/file2
@@ -149,7 +168,7 @@ test_expect_success \
'tree=$(git write-tree)'
test_expect_success \
'validate object ID for a known tree.' \
- 'test "$tree" = 087704a96baf1c2d1c869a8b084481e121c88b5b'
+ 'test "$tree" = "$expectedtree"'
test_expect_success \
'showing tree with git ls-tree' \
@@ -160,7 +179,7 @@ cat >expected <<\EOF
040000 tree 58a09c23e2ca152193f2786e06986b7b6712bdbe path2
040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3 path3
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'git ls-tree output for a known tree.' \
'test_cmp expected current'
@@ -169,7 +188,7 @@ test_expect_success \
test_expect_success \
'showing tree with git ls-tree -r' \
'git ls-tree -r $tree >current'
-cat >expected <<\EOF
+$expectfilter >expected <<\EOF
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
100644 blob 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 path2/file2
@@ -200,7 +219,7 @@ cat >expected <<\EOF
100644 blob 00fb5908cb97c2564a9783c0c64087333b3b464f path3/subp3/file3
120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c path3/subp3/file3sym
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'git ls-tree -r output for a known tree.' \
'test_cmp expected current'
@@ -209,14 +228,14 @@ test_expect_success \
'ptree=$(git write-tree --prefix=path3)'
test_expect_success \
'validate object ID for a known tree.' \
- 'test "$ptree" = 21ae8269cacbe57ae09138dcc3a2887f904d02b3'
+ 'test "$ptree" = "$expectedptree1"'
test_expect_success \
'writing partial tree out with git write-tree --prefix.' \
'ptree=$(git write-tree --prefix=path3/subp3)'
test_expect_success \
'validate object ID for a known tree.' \
- 'test "$ptree" = 3c5e5399f3a333eddecce7a9b9465b63f65f51e2'
+ 'test "$ptree" = "$expectedptree2"'
cat >badobjects <<EOF
100644 blob 1000000000000000000000000000000000000000 dir/file1
@@ -249,7 +268,7 @@ test_expect_success \
newtree=$(git write-tree) &&
test "$newtree" = "$tree"'
-cat >expected <<\EOF
+$expectfilter >expected <<\EOF
:100644 100644 f87290f8eb2cbbea7857214459a0739927eab154 0000000000000000000000000000000000000000 M path0
:120000 120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0000000000000000000000000000000000000000 M path0sym
:100644 100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0000000000000000000000000000000000000000 M path2/file2
@@ -272,7 +291,7 @@ test_expect_success \
'git diff-files >current && cmp -s current /dev/null'
################################################################
-P=087704a96baf1c2d1c869a8b084481e121c88b5b
+P=$expectedtree
test_expect_success \
'git commit-tree records the correct tree in a commit.' \
'commit0=$(echo NO | git commit-tree $P) &&
@@ -308,7 +327,7 @@ test_expect_success 'update-index D/F conflict' '
test $numpath0 = 1
'
-test_expect_success 'absolute path works as expected' '
+test_expect_success SYMLINKS 'absolute path works as expected' '
mkdir first &&
ln -s ../.git first/.git &&
mkdir second &&
diff --git a/t/t0055-beyond-symlinks.sh b/t/t0055-beyond-symlinks.sh
index b29c37a..0c6ff56 100755
--- a/t/t0055-beyond-symlinks.sh
+++ b/t/t0055-beyond-symlinks.sh
@@ -4,7 +4,7 @@ test_description='update-index and add refuse to add beyond symlinks'
. ./test-lib.sh
-test_expect_success setup '
+test_expect_success SYMLINKS setup '
>a &&
mkdir b &&
ln -s b c &&
@@ -12,12 +12,12 @@ test_expect_success setup '
git update-index --add a b/d
'
-test_expect_success 'update-index --add beyond symlinks' '
+test_expect_success SYMLINKS 'update-index --add beyond symlinks' '
test_must_fail git update-index --add c/d &&
! ( git ls-files | grep c/d )
'
-test_expect_success 'add beyond symlinks' '
+test_expect_success SYMLINKS 'add beyond symlinks' '
test_must_fail git add c/d &&
! ( git ls-files | grep c/d )
'
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index 570d372..f19b4a2 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -157,7 +157,7 @@ test_expect_success '3-way not overwriting local changes (their side)' '
'
-test_expect_success 'funny symlink in work tree' '
+test_expect_success SYMLINKS 'funny symlink in work tree' '
git reset --hard &&
git checkout -b sym-b side-b &&
@@ -177,7 +177,7 @@ test_expect_success 'funny symlink in work tree' '
'
-test_expect_success 'funny symlink in work tree, un-unlink-able' '
+test_expect_success SYMLINKS 'funny symlink in work tree, un-unlink-able' '
rm -fr a b &&
git reset --hard &&
@@ -189,7 +189,7 @@ test_expect_success 'funny symlink in work tree, un-unlink-able' '
'
# clean-up from the above test
-chmod a+w a
+chmod a+w a 2>/dev/null
rm -fr a b
test_expect_success 'D/F setup' '
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index fc386ba..210e594 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -126,7 +126,7 @@ test_expect_success 'no file/rev ambiguity check inside a bare repo' '
cd foo.git && git show -s HEAD
'
-test_expect_success 'detection should not be fooled by a symlink' '
+test_expect_success SYMLINKS 'detection should not be fooled by a symlink' '
cd "$HERE" &&
rm -fr foo.git &&
git clone -s .git another &&
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 3c06842..64663e1 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -726,7 +726,7 @@ echo >>result
test_expect_success '--null --get-regexp' 'cmp result expect'
-test_expect_success 'symlinked configuration' '
+test_expect_success SYMLINKS 'symlinked configuration' '
ln -s notyet myconfig &&
GIT_CONFIG=myconfig git config test.frotz nitfol &&
diff --git a/t/t2001-checkout-cache-clash.sh b/t/t2001-checkout-cache-clash.sh
index ef00753..98aa73e 100755
--- a/t/t2001-checkout-cache-clash.sh
+++ b/t/t2001-checkout-cache-clash.sh
@@ -59,10 +59,10 @@ test_expect_success \
'git read-tree -m $tree1 && git checkout-index -f -a'
test_debug 'show_files $tree1'
-ln -s path0 path1
-test_expect_success \
+test_expect_success SYMLINKS \
'git update-index --add a symlink.' \
- 'git update-index --add path1'
+ 'ln -s path0 path1 &&
+ git update-index --add path1'
test_expect_success \
'writing tree out with git write-tree' \
'tree3=$(git write-tree)'
diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
index 71894b3..02a4fc5 100755
--- a/t/t2003-checkout-cache-mkdir.sh
+++ b/t/t2003-checkout-cache-mkdir.sh
@@ -19,7 +19,7 @@ test_expect_success \
echo rezrov >path1/file1 &&
git update-index --add path0 path1/file1'
-test_expect_success \
+test_expect_success SYMLINKS \
'have symlink in place where dir is expected.' \
'rm -fr path0 path1 &&
mkdir path2 &&
@@ -59,7 +59,7 @@ test_expect_success \
test ! -f path1/file1'
# Linus fix #1
-test_expect_success \
+test_expect_success SYMLINKS \
'use --prefix=tmp/orary/ where tmp is a symlink' \
'rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 tmp1/orary &&
@@ -71,7 +71,7 @@ test_expect_success \
test -h tmp'
# Linus fix #2
-test_expect_success \
+test_expect_success SYMLINKS \
'use --prefix=tmp/orary- where tmp is a symlink' \
'rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 &&
@@ -82,7 +82,7 @@ test_expect_success \
test -h tmp'
# Linus fix #3
-test_expect_success \
+test_expect_success SYMLINKS \
'use --prefix=tmp- where tmp-path1 is a symlink' \
'rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 &&
diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh
index 39133b8..36cca14 100755
--- a/t/t2004-checkout-cache-temp.sh
+++ b/t/t2004-checkout-cache-temp.sh
@@ -194,7 +194,7 @@ test_expect_success \
test $(cat ../$s1) = tree1asubdir/path5)
)'
-test_expect_success \
+test_expect_success SYMLINKS \
'checkout --temp symlink' '
rm -f path* .merge_* out .git/index &&
ln -s b a &&
diff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh
index 0526fce..20f3343 100755
--- a/t/t2007-checkout-symlink.sh
+++ b/t/t2007-checkout-symlink.sh
@@ -6,6 +6,12 @@ test_description='git checkout to switch between branches with symlink<->dir'
. ./test-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say "symbolic links not supported - skipping tests"
+ test_done
+fi
+
test_expect_success setup '
mkdir frotz &&
diff --git a/t/t2100-update-cache-badpath.sh b/t/t2100-update-cache-badpath.sh
index 6ef2dcf..2df3fdd 100755
--- a/t/t2100-update-cache-badpath.sh
+++ b/t/t2100-update-cache-badpath.sh
@@ -26,7 +26,12 @@ All of the attempts should fail.
mkdir path2 path3
date >path0
-ln -s xyzzy path1
+if test_have_prereq SYMLINKS
+then
+ ln -s xyzzy path1
+else
+ date > path1
+fi
date >path2/file2
date >path3/file3
@@ -38,7 +43,12 @@ rm -fr path?
mkdir path0 path1
date >path2
-ln -s frotz path3
+if test_have_prereq SYMLINKS
+then
+ ln -s frotz path3
+else
+ date > path3
+fi
date >path0/file0
date >path1/file1
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 5a8d52f..9120750 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -80,7 +80,7 @@ test_expect_success 'change gets noticed' '
'
-test_expect_success 'replace a file with a symlink' '
+test_expect_success SYMLINKS 'replace a file with a symlink' '
rm foo &&
ln -s top foo &&
diff --git a/t/t2201-add-update-typechange.sh b/t/t2201-add-update-typechange.sh
index d24c7d9..2e8f702 100755
--- a/t/t2201-add-update-typechange.sh
+++ b/t/t2201-add-update-typechange.sh
@@ -11,7 +11,13 @@ test_expect_success setup '
_empty=$(git hash-object --stdin <xyzzy) &&
>yomin &&
>caskly &&
- ln -s frotz nitfol &&
+ if test_have_prereq SYMLINKS; then
+ ln -s frotz nitfol &&
+ T_letter=T
+ else
+ printf %s frotz > nitfol &&
+ T_letter=M
+ fi &&
mkdir rezrov &&
>rezrov/bozbar &&
git add caskly xyzzy yomin nitfol rezrov/bozbar &&
@@ -29,7 +35,11 @@ test_expect_success modify '
>nitfol &&
# rezrov/bozbar disappears
rm -fr rezrov &&
- ln -s xyzzy rezrov &&
+ if test_have_prereq SYMLINKS; then
+ ln -s xyzzy rezrov
+ else
+ printf %s xyzzy > rezrov
+ fi &&
# xyzzy disappears (not a submodule)
mkdir xyzzy &&
echo gnusto >xyzzy/bozbar &&
@@ -71,7 +81,7 @@ test_expect_success modify '
s/blob/000000/
}
/ nitfol/{
- s/ nitfol/ $_z40 T&/
+ s/ nitfol/ $_z40 $T_letter&/
s/blob/100644/
}
/ rezrov.bozbar/{
diff --git a/t/t2300-cd-to-toplevel.sh b/t/t2300-cd-to-toplevel.sh
index 293dc35..3b01ad2 100755
--- a/t/t2300-cd-to-toplevel.sh
+++ b/t/t2300-cd-to-toplevel.sh
@@ -5,7 +5,7 @@ test_description='cd_to_toplevel'
. ./test-lib.sh
test_cd_to_toplevel () {
- test_expect_success "$2" '
+ test_expect_success $3 "$2" '
(
cd '"'$1'"' &&
. git-sh-setup &&
@@ -24,14 +24,14 @@ test_cd_to_toplevel repo 'at physical root'
test_cd_to_toplevel repo/sub/dir 'at physical subdir'
-ln -s repo symrepo
-test_cd_to_toplevel symrepo 'at symbolic root'
+ln -s repo symrepo 2>/dev/null
+test_cd_to_toplevel symrepo 'at symbolic root' SYMLINKS
-ln -s repo/sub/dir subdir-link
-test_cd_to_toplevel subdir-link 'at symbolic subdir'
+ln -s repo/sub/dir subdir-link 2>/dev/null
+test_cd_to_toplevel subdir-link 'at symbolic subdir' SYMLINKS
cd repo
-ln -s sub/dir internal-link
-test_cd_to_toplevel internal-link 'at internal symbolic subdir'
+ln -s sub/dir internal-link 2>/dev/null
+test_cd_to_toplevel internal-link 'at internal symbolic subdir' SYMLINKS
test_done
diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index 36eee0f..b7e0306 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -17,7 +17,12 @@ filesystem.
. ./test-lib.sh
date >path0
-ln -s xyzzy path1
+if test_have_prereq SYMLINKS
+then
+ ln -s xyzzy path1
+else
+ date > path1
+fi
mkdir path2 path3
date >path2/file2
date >path2-junk
diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh
index e4f02a0..95671c2 100755
--- a/t/t3010-ls-files-killed-modified.sh
+++ b/t/t3010-ls-files-killed-modified.sh
@@ -38,7 +38,12 @@ modified without reporting path9 and path10.
. ./test-lib.sh
date >path0
-ln -s xyzzy path1
+if test_have_prereq SYMLINKS
+then
+ ln -s xyzzy path1
+else
+ date > path1
+fi
mkdir path2 path3
date >path2/file2
date >path3/file3
@@ -52,8 +57,14 @@ test_expect_success \
rm -fr path? ;# leave path10 alone
date >path2
-ln -s frotz path3
-ln -s nitfol path5
+if test_have_prereq SYMLINKS
+then
+ ln -s frotz path3
+ ln -s nitfol path5
+else
+ date > path3
+ date > path5
+fi
mkdir path0 path1 path6
date >path0/file0
date >path1/file1
diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
index 6e6a254..ee60d03 100755
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -22,9 +22,21 @@ test_expect_success \
'setup' \
'mkdir path2 path2/baz &&
echo Hi >path0 &&
- ln -s path0 path1 &&
+ if test_have_prereq SYMLINKS
+ then
+ ln -s path0 path1 &&
+ ln -s ../path1 path2/bazbo
+ make_expected () {
+ cat >expected
+ }
+ else
+ printf path0 > path1 &&
+ printf ../path1 > path2/bazbo
+ make_expected () {
+ sed -e "s/120000 /100644 /" >expected
+ }
+ fi &&
echo Lo >path2/foo &&
- ln -s ../path1 path2/bazbo &&
echo Mi >path2/baz/b &&
find path? \( -type f -o -type l \) -print |
xargs git update-index --add &&
@@ -41,7 +53,7 @@ test_output () {
test_expect_success \
'ls-tree plain' \
'git ls-tree $tree >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
100644 blob X path0
120000 blob X path1
040000 tree X path2
@@ -51,7 +63,7 @@ EOF
test_expect_success \
'ls-tree recursive' \
'git ls-tree -r $tree >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
100644 blob X path0
120000 blob X path1
100644 blob X path2/baz/b
@@ -63,7 +75,7 @@ EOF
test_expect_success \
'ls-tree recursive with -t' \
'git ls-tree -r -t $tree >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
100644 blob X path0
120000 blob X path1
040000 tree X path2
@@ -77,7 +89,7 @@ EOF
test_expect_success \
'ls-tree recursive with -d' \
'git ls-tree -r -d $tree >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
040000 tree X path2
040000 tree X path2/baz
EOF
@@ -86,7 +98,7 @@ EOF
test_expect_success \
'ls-tree filtered with path' \
'git ls-tree $tree path >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
EOF
test_output'
@@ -96,7 +108,7 @@ EOF
test_expect_success \
'ls-tree filtered with path1 path0' \
'git ls-tree $tree path1 path0 >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
100644 blob X path0
120000 blob X path1
EOF
@@ -105,7 +117,7 @@ EOF
test_expect_success \
'ls-tree filtered with path0/' \
'git ls-tree $tree path0/ >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
EOF
test_output'
@@ -114,7 +126,7 @@ EOF
test_expect_success \
'ls-tree filtered with path2' \
'git ls-tree $tree path2 >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
040000 tree X path2
EOF
test_output'
@@ -123,7 +135,7 @@ EOF
test_expect_success \
'ls-tree filtered with path2/' \
'git ls-tree $tree path2/ >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
040000 tree X path2/baz
120000 blob X path2/bazbo
100644 blob X path2/foo
@@ -135,7 +147,7 @@ EOF
test_expect_success \
'ls-tree filtered with path2/baz' \
'git ls-tree $tree path2/baz >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
040000 tree X path2/baz
EOF
test_output'
@@ -143,14 +155,14 @@ EOF
test_expect_success \
'ls-tree filtered with path2/bak' \
'git ls-tree $tree path2/bak >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
EOF
test_output'
test_expect_success \
'ls-tree -t filtered with path2/bak' \
'git ls-tree -t $tree path2/bak >current &&
- cat >expected <<\EOF &&
+ make_expected <<\EOF &&
040000 tree X path2
EOF
test_output'
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 61a2010..f82bcdb 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -121,7 +121,7 @@ test_expect_success 'renaming a symref is not allowed' \
! test -f .git/refs/heads/master3
'
-test_expect_success \
+test_expect_success SYMLINKS \
'git branch -m u v should fail when the reflog for u is a symlink' '
git branch -l u &&
mv .git/logs/refs/heads/u real-u &&
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 9f6454d..e98f982 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -30,7 +30,7 @@ test_expect_success \
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
esac'
-test_expect_success 'git add: filemode=0 should not get confused by symlink' '
+test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by symlink' '
rm -f xfoo1 &&
ln -s foo xfoo1 &&
git add xfoo1 &&
@@ -51,7 +51,7 @@ test_expect_success \
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
esac'
-test_expect_success 'git add: filemode=0 should not get confused by symlink' '
+test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by symlink' '
rm -f xfoo2 &&
ln -s foo xfoo2 &&
git update-index --add xfoo2 &&
@@ -61,7 +61,7 @@ test_expect_success 'git add: filemode=0 should not get confused by symlink' '
esac
'
-test_expect_success \
+test_expect_success SYMLINKS \
'git update-index --add: Test that executable bit is not used...' \
'git config core.filemode 0 &&
ln -s xfoo2 xfoo3 &&
diff --git a/t/t4004-diff-rename-symlink.sh b/t/t4004-diff-rename-symlink.sh
index b35af9b..3db7444 100755
--- a/t/t4004-diff-rename-symlink.sh
+++ b/t/t4004-diff-rename-symlink.sh
@@ -12,6 +12,13 @@ by an edit for them.
. ./test-lib.sh
. "$TEST_DIRECTORY"/diff-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+ exit
+fi
+
test_expect_success \
'prepare reference tree' \
'echo xyzzy | tr -d '\\\\'012 >yomin &&
diff --git a/t/t4008-diff-break-rewrite.sh b/t/t4008-diff-break-rewrite.sh
index 7e343a9..e19ca65 100755
--- a/t/t4008-diff-break-rewrite.sh
+++ b/t/t4008-diff-break-rewrite.sh
@@ -99,7 +99,7 @@ test_expect_success \
'validate result of -B -M (#4)' \
'compare_diff_raw expected current'
-test_expect_success \
+test_expect_success SYMLINKS \
'make file0 into something completely different' \
'rm -f file0 &&
ln -s frotz file0 &&
@@ -114,7 +114,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 M100 file1
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'validate result of -B (#5)' \
'compare_diff_raw expected current'
@@ -129,7 +129,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 R file0 file1
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'validate result of -B -M (#6)' \
'compare_diff_raw expected current'
@@ -144,7 +144,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 M file1
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'validate result of -M (#7)' \
'compare_diff_raw expected current'
diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh
index 9055c8b..3a81309 100755
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
@@ -9,6 +9,13 @@ test_description='Test diff of symlinks.
. ./test-lib.sh
. "$TEST_DIRECTORY"/diff-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+ exit
+fi
+
cat > expected << EOF
diff --git a/frotz b/frotz
new file mode 120000
diff --git a/t/t4023-diff-rename-typechange.sh b/t/t4023-diff-rename-typechange.sh
index 297ddb5..5099862 100755
--- a/t/t4023-diff-rename-typechange.sh
+++ b/t/t4023-diff-rename-typechange.sh
@@ -4,6 +4,13 @@ test_description='typechange rename detection'
. ./test-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+ exit
+fi
+
test_expect_success setup '
rm -f foo bar &&
diff --git a/t/t4114-apply-typechange.sh b/t/t4114-apply-typechange.sh
index 0f185ca..7dc35de 100755
--- a/t/t4114-apply-typechange.sh
+++ b/t/t4114-apply-typechange.sh
@@ -9,6 +9,13 @@ test_description='git apply should not get confused with type changes.
. ./test-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+ exit
+fi
+
test_expect_success 'setup repository and commits' '
echo "hello world" > foo &&
echo "hi planet" > bar &&
diff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh
index 9ace578..1a3aea3 100755
--- a/t/t4115-apply-symlink.sh
+++ b/t/t4115-apply-symlink.sh
@@ -9,6 +9,13 @@ test_description='git apply symlinks and partial files
. ./test-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+ exit
+fi
+
test_expect_success setup '
ln -s path1/path2/path3/path4/path5 link1 &&
diff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh
index 841773f..8aad20b 100755
--- a/t/t4122-apply-symlink-inside.sh
+++ b/t/t4122-apply-symlink-inside.sh
@@ -3,6 +3,13 @@
test_description='apply to deeper directory without getting fooled with symlink'
. ./test-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+ exit
+fi
+
lecho () {
for l_
do
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 7a84ab6..60a4b8d 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -37,7 +37,11 @@ test_expect_success \
cp /bin/sh a/bin &&
printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
printf "A not substituted O" >a/substfile2 &&
- ln -s a a/l1 &&
+ if test_have_prereq SYMLINKS; then
+ ln -s a a/l1
+ else
+ printf %s a > a/l1
+ fi &&
(p=long_path_to_a_file && cd a &&
for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
echo text >file_with_long_path) &&
diff --git a/t/t5522-pull-symlink.sh b/t/t5522-pull-symlink.sh
index 5672b51..d887eb6 100755
--- a/t/t5522-pull-symlink.sh
+++ b/t/t5522-pull-symlink.sh
@@ -4,6 +4,13 @@ test_description='pulling from symlinked subdir'
. ./test-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+ exit
+fi
+
# The scenario we are building:
#
# trash\ directory/
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 8fb3a56..10b8f8c 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -206,7 +206,7 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
rm -f dirty dirty2
-test_expect_success 'git mv should overwrite symlink to a file' '
+test_expect_success SYMLINKS 'git mv should overwrite symlink to a file' '
rm -fr .git &&
git init &&
@@ -225,7 +225,7 @@ test_expect_success 'git mv should overwrite symlink to a file' '
rm -f moved symlink
-test_expect_success 'git mv should overwrite file with a symlink' '
+test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -fr .git &&
git init &&
diff --git a/t/t9131-git-svn-empty-symlink.sh b/t/t9131-git-svn-empty-symlink.sh
index 8f35e29..9a24a65 100755
--- a/t/t9131-git-svn-empty-symlink.sh
+++ b/t/t9131-git-svn-empty-symlink.sh
@@ -88,7 +88,7 @@ test_expect_success 'enable broken symlink workaround' \
test_expect_success '"bar" is an empty file' 'test -f x/bar && ! test -s x/bar'
test_expect_success 'get "bar" => symlink fix from svn' \
'(cd x && git svn rebase)'
-test_expect_success '"bar" becomes a symlink' 'test -L x/bar'
+test_expect_success SYMLINKS '"bar" becomes a symlink' 'test -L x/bar'
test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" y'
diff --git a/t/t9132-git-svn-broken-symlink.sh b/t/t9132-git-svn-broken-symlink.sh
index b8de59e..6c4c90b 100755
--- a/t/t9132-git-svn-broken-symlink.sh
+++ b/t/t9132-git-svn-broken-symlink.sh
@@ -85,7 +85,7 @@ EOF
test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x'
-test_expect_success '"bar" is a symlink that points to "asdf"' '
+test_expect_success SYMLINKS '"bar" is a symlink that points to "asdf"' '
test -L x/bar &&
(cd x && test xasdf = x"`git cat-file blob HEAD:bar`")
'
@@ -94,7 +94,7 @@ test_expect_success 'get "bar" => symlink fix from svn' '
(cd x && git svn rebase)
'
-test_expect_success '"bar" remains a proper symlink' '
+test_expect_success SYMLINKS '"bar" remains a proper symlink' '
test -L x/bar &&
(cd x && test xdoink = x"`git cat-file blob HEAD:bar`")
'
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index dce06bc..9ec5030 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -246,7 +246,7 @@ test_expect_success \
gitweb_run "p=.git;a=commitdiff"'
test_debug 'cat gitweb.log'
-test_expect_success \
+test_expect_success SYMLINKS \
'commitdiff(0): file to symlink' \
'rm renamed_file &&
ln -s file renamed_file &&
@@ -308,7 +308,7 @@ test_debug 'cat gitweb.log'
# ----------------------------------------------------------------------
# commitdiff testing (taken from t4114-apply-typechange.sh)
-test_expect_success 'setup typechange commits' '
+test_expect_success SYMLINKS 'setup typechange commits' '
echo "hello world" > foo &&
echo "hi planet" > bar &&
git update-index --add foo bar &&
@@ -418,7 +418,12 @@ test_expect_success \
git mv 04-rename-from 04-rename-to &&
echo "Changed" >> 04-rename-to &&
test_chmod +x 05-mode-change &&
- rm -f 06-file-or-symlink && ln -s 01-change 06-file-or-symlink &&
+ rm -f 06-file-or-symlink &&
+ if test_have_prereq SYMLINKS; then
+ ln -s 01-change 06-file-or-symlink
+ else
+ printf %s 01-change > 06-file-or-symlink
+ fi &&
echo "Changed and have mode changed" > 07-change-mode-change &&
test_chmod +x 07-change-mode-change &&
git commit -a -m "Large commit" &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 3c65cfe..5337e89 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -689,3 +689,7 @@ case $(uname -s) in
}
;;
esac
+
+# test whether the filesystem supports symbolic links
+ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
+rm -f y
--
1.6.2.1.224.g2225f
^ permalink raw reply related [relevance 4%]
* Bug in test-lib.sh: test_create_repo() / RFC
@ 2009-04-20 14:51 4% Michael J Gruber
0 siblings, 0 replies; 200+ results
From: Michael J Gruber @ 2009-04-20 14:51 UTC (permalink / raw)
To: Git Mailing List
Hi there,
running the test suite with -v for the upcoming release exposed a
certain problem with test_create_repo() whose consequences I can't quite
fathom at the moment. That means: I don't know whether it's maint
material or forbidden fruits during rc-cycle...
Problem:
Since a6d63b7 (test-lib: avoid assuming that templates/ are in the
GIT_EXEC_PATH, 2009-02-04), test_create_repo() assumes to be called from
a directory such that `pwd`/../templates/blt/ contains templates for
git-init.
Several tests (see below) call test_create_repo() from a different
directory, which means the repo is created without any of the default
files (and that a mv .git/hooks .git/hooks-disabled later in the
function errors out). Now, for most tests this probably doesn't matter
at all but it's not nice.
RFC:
I see several possible solutions:
- Make sure all tests use test_create_repo() from t/. Cumbersome and
fragile.
- Simply use $(TEST_DIRECTORY)/../templates/blt/. Nice and easy. But
uses the templates from the git repo containing t/ even when testing
against and installed git (just like now, for most of the tests).
- Teach git a "--templates-dir" option similar to "--html-path" and use
that (from the git actually being tested). Means we use the templates
belonging to the tested git; but also means we can test only git
versions containing that new option.
What do you think?
Michael
Affected tests:
t0050-filesystem.sh
t1007-hash-object.sh
t1302-repo-version.sh
t2103-update-index-ignore-missing.sh
t4027-diff-submodule.sh
t5300-pack-object.sh
t5513-fetch-track.sh
t5600-clone-fail-cleanup.sh
t5601-clone.sh
t5700-clone-reference.sh
t5710-info-alternate.sh
t6026-merge-attr.sh
t7001-mv.sh
t7010-setup.sh
t7401-submodule-summary.sh
t7506-status-submodule.sh
t7508-status.sh
^ permalink raw reply [relevance 4%]
* Re: [JGIT PATCH 2/2] Make Repository.isValidRefName compatible with Git 1.6.3
@ 2009-05-08 0:47 7% ` Shawn O. Pearce
0 siblings, 0 replies; 200+ results
From: Shawn O. Pearce @ 2009-05-08 0:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Robin Rosenberg, Git Mailing List
Junio C Hamano <gitster@pobox.com> wrote:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
> >>
> >> In 3e262b95c509 I taught C Git to disallow refs whose names end in
> >> ".lock".
> >
> > Btw, I think we should revert that, and instead change our naming for
> > lock-files.
>
> '..lck' may be a good name to use here.
I agree. So much so that I wrote a patch for you.
--8<--
Change .lock suffix to ..lck
In 3e262b95c509 I taught Git to deny creation of refs whose name
ends in ".lock", as the loose ref scanner skips over these under
the assumption that they are refs being modified by a concurrent
process operating on the same repository.
Linus pointed out that the name "fix.vm.lock" is an otherwise
perfectly valid branch name, except the ".lock" suffix conflicts
with the internal implementation detail of how Git manages doing
an atomic update.
Instead, change the name to "..lck", as suggested by Junio.
This uses the same storage space in memory as ".lock", so we can do
a fairly dumb search-replace to make the change, but the ".." prefix
has been forbidden in a ref name for ages, to prevent "a..b" from
being ambiguous as a single ref name, or as the pair "^a b".
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
Documentation/git-check-ref-format.txt | 2 --
Documentation/technical/api-lockfile.txt | 4 ++--
builtin-reflog.c | 2 +-
config.c | 2 +-
lockfile.c | 10 +++++-----
refs.c | 11 ++++-------
t/t3505-cherry-pick-empty.sh | 2 +-
t/t3600-rm.sh | 4 ++--
t/t4123-apply-shrink.sh | 2 +-
t/t7001-mv.sh | 4 ++--
t/t7502-commit.sh | 2 +-
t/test-lib.sh | 6 +++---
12 files changed, 23 insertions(+), 28 deletions(-)
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index c1ce268..7c0f0ea 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -34,8 +34,6 @@ imposes the following rules on how references are named:
. They cannot end with a slash `/` nor a dot `.`.
-. They cannot end with the sequence `.lock`.
-
. They cannot contain a sequence `@{`.
These rules make it easy for shell script based tools to parse
diff --git a/Documentation/technical/api-lockfile.txt b/Documentation/technical/api-lockfile.txt
index dd89404..982984f 100644
--- a/Documentation/technical/api-lockfile.txt
+++ b/Documentation/technical/api-lockfile.txt
@@ -4,9 +4,9 @@ lockfile API
The lockfile API serves two purposes:
* Mutual exclusion. When we write out a new index file, first
- we create a new file `$GIT_DIR/index.lock`, write the new
+ we create a new file `$GIT_DIR/index..lck`, write the new
contents into it, and rename it to the final destination
- `$GIT_DIR/index`. We try to create the `$GIT_DIR/index.lock`
+ `$GIT_DIR/index`. We try to create the `$GIT_DIR/index..lck`
file with O_EXCL so that we can notice and fail when somebody
else is already trying to update the index file.
diff --git a/builtin-reflog.c b/builtin-reflog.c
index ddfdf5a..19baf07 100644
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -341,7 +341,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
if (!file_exists(log_file))
goto finish;
if (!cmd->dry_run) {
- newlog_path = git_pathdup("logs/%s.lock", ref);
+ newlog_path = git_pathdup("logs/%s..lck", ref);
cb.newlog = fopen(newlog_path, "w");
}
diff --git a/config.c b/config.c
index 1682273..50ecc1e 100644
--- a/config.c
+++ b/config.c
@@ -925,7 +925,7 @@ int git_config_set(const char *key, const char *value)
*
* This function does this:
*
- * - it locks the config file by creating ".git/config.lock"
+ * - it locks the config file by creating ".git/config..lck"
*
* - it then parses the config using store_aux() as validator to find
* the position on the key/value pair to replace. If it is to be unset,
diff --git a/lockfile.c b/lockfile.c
index 828d19f..61ff5cb 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -129,11 +129,11 @@ static int lock_file(struct lock_file *lk, const char *path, int flags)
strcpy(lk->filename, path);
/*
* subtract 5 from size to make sure there's room for adding
- * ".lock" for the lock file name
+ * "..lck" for the lock file name
*/
if (!(flags & LOCK_NODEREF))
resolve_symlink(lk->filename, sizeof(lk->filename)-5);
- strcat(lk->filename, ".lock");
+ strcat(lk->filename, "..lck");
lk->fd = open(lk->filename, O_RDWR | O_CREAT | O_EXCL, 0666);
if (0 <= lk->fd) {
if (!lock_file_list) {
@@ -159,13 +159,13 @@ static int lock_file(struct lock_file *lk, const char *path, int flags)
NORETURN void unable_to_lock_index_die(const char *path, int err)
{
if (err == EEXIST) {
- die("Unable to create '%s.lock': %s.\n\n"
+ die("Unable to create '%s..lck': %s.\n\n"
"If no other git process is currently running, this probably means a\n"
"git process crashed in this repository earlier. Make sure no other git\n"
"process is running and remove the file manually to continue.",
path, strerror(err));
} else {
- die("Unable to create '%s.lock': %s", path, strerror(err));
+ die("Unable to create '%s..lck': %s", path, strerror(err));
}
}
@@ -219,7 +219,7 @@ int commit_lock_file(struct lock_file *lk)
if (lk->fd >= 0 && close_lock_file(lk))
return -1;
strcpy(result_file, lk->filename);
- i = strlen(result_file) - 5; /* .lock */
+ i = strlen(result_file) - 5; /* ..lck */
result_file[i] = 0;
if (rename(lk->filename, result_file))
return -1;
diff --git a/refs.c b/refs.c
index e65a3b4..b4ca305 100644
--- a/refs.c
+++ b/refs.c
@@ -266,7 +266,7 @@ static struct ref_list *get_ref_dir(const char *base, struct ref_list *list)
namelen = strlen(de->d_name);
if (namelen > 255)
continue;
- if (has_extension(de->d_name, ".lock"))
+ if (has_extension(de->d_name, "..lck"))
continue;
memcpy(ref + baselen, de->d_name, namelen+1);
if (stat(git_path("%s", ref), &st) < 0)
@@ -681,7 +681,6 @@ int for_each_rawref(each_ref_fn fn, void *cb_data)
* - it has double dots "..", or
* - it has ASCII control character, "~", "^", ":" or SP, anywhere, or
* - it ends with a "/".
- * - it ends with ".lock"
*/
static inline int bad_ref_char(int ch)
@@ -743,8 +742,6 @@ int check_ref_format(const char *ref)
return CHECK_REF_FORMAT_ERROR;
if (level < 2)
return CHECK_REF_FORMAT_ONELEVEL;
- if (has_extension(ref, ".lock"))
- return CHECK_REF_FORMAT_ERROR;
return ret;
}
}
@@ -996,7 +993,7 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt)
const char *path;
if (!(delopt & REF_NODEREF)) {
- i = strlen(lock->lk->filename) - 5; /* .lock */
+ i = strlen(lock->lk->filename) - 5; /* ..lck */
lock->lk->filename[i] = 0;
path = lock->lk->filename;
} else {
@@ -1363,7 +1360,7 @@ int create_symref(const char *ref_target, const char *refs_heads_master,
error("refname too long: %s", refs_heads_master);
goto error_free_return;
}
- lockpath = mkpath("%s.lock", git_HEAD);
+ lockpath = mkpath("%s..lck", git_HEAD);
fd = open(lockpath, O_CREAT | O_EXCL | O_WRONLY, 0666);
if (fd < 0) {
error("Unable to open %s for writing", lockpath);
@@ -1593,7 +1590,7 @@ static int do_for_each_reflog(const char *base, each_ref_fn fn, void *cb_data)
namelen = strlen(de->d_name);
if (namelen > 255)
continue;
- if (has_extension(de->d_name, ".lock"))
+ if (has_extension(de->d_name, "..lck"))
continue;
memcpy(log + baselen, de->d_name, namelen+1);
if (stat(git_path("logs/%s", log), &st) < 0)
diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh
index 9aaeabd..3b7aa6d 100755
--- a/t/t3505-cherry-pick-empty.sh
+++ b/t/t3505-cherry-pick-empty.sh
@@ -26,7 +26,7 @@ test_expect_code 1 'cherry-pick an empty commit' '
test_expect_success 'index lockfile was removed' '
- test ! -f .git/index.lock
+ test ! -f .git/index..lck
'
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 76b1bb4..e437cf7 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -264,9 +264,9 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
i=$(( $i + 1 ))
done | git update-index --index-info &&
git rm -n "some-file-*" | :;
- test -f .git/index.lock
+ test -f .git/index..lck
status=$?
- rm -f .git/index.lock
+ rm -f .git/index..lck
git reset -q --hard
test "$status" != 0
'
diff --git a/t/t4123-apply-shrink.sh b/t/t4123-apply-shrink.sh
index 984157f..fcd6a67 100755
--- a/t/t4123-apply-shrink.sh
+++ b/t/t4123-apply-shrink.sh
@@ -47,7 +47,7 @@ test_expect_success 'apply should fail gracefully' '
else
status=$?
echo "Status was $status"
- if test -f .git/index.lock
+ if test -f .git/index..lck
then
echo Oops, should not have crashed
false
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 10b8f8c..afe8240 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -62,14 +62,14 @@ test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
git mv -f untracked1 path0
- test ! -f .git/index.lock &&
+ test ! -f .git/index..lck &&
test -f untracked1 &&
test -f path0/untracked1'
# clean up the mess in case bad things happen
rm -f idontexist untracked1 untracked2 \
path0/idontexist path0/untracked1 path0/untracked2 \
- .git/index.lock
+ .git/index..lck
test_expect_success \
'adding another file' \
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 56cd866..100da27 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -241,7 +241,7 @@ test_expect_success EXECKEEPSPID 'a SIGTERM should break locks' '
GIT_EDITOR=.git/FAKE_EDITOR
export GIT_EDITOR
exec git commit -a'\'' &&
- test ! -f .git/index.lock
+ test ! -f .git/index..lck
'
rm -f .git/MERGE_MSG .git/COMMIT_EDITMSG
diff --git a/t/test-lib.sh b/t/test-lib.sh
index dad1437..ecce338 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -558,13 +558,13 @@ else
test -h "$2" &&
test "$1" = "$(readlink "$2")" || {
# be super paranoid
- if mkdir "$2".lock
+ if mkdir "$2"..lck
then
rm -f "$2" &&
ln -s "$1" "$2" &&
- rm -r "$2".lock
+ rm -r "$2"..lck
else
- while test -d "$2".lock
+ while test -d "$2"..lck
do
say "Waiting for lock on $2."
sleep 1
--
1.6.3.195.gad81
--
Shawn.
^ permalink raw reply related [relevance 7%]
* [PATCH] Fixed typo
@ 2009-12-02 1:35 13% Richard Hartmann
0 siblings, 0 replies; 200+ results
From: Richard Hartmann @ 2009-12-02 1:35 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 40 bytes --]
Hi all,
please see attached.
Richard
[-- Attachment #2: 0001-Typos-commiting-committing.patch --]
[-- Type: text/x-diff, Size: 1751 bytes --]
From 138b95638693b47251d61ed5f316b6e68002b766 Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih.mailinglist@gmail.com>
Date: Wed, 2 Dec 2009 02:33:17 +0100
Subject: [PATCH] Typos: commiting -> committing
---
builtin-revert.c | 2 +-
t/t7001-mv.sh | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin-revert.c b/builtin-revert.c
index 151aa6a..5708908 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -216,7 +216,7 @@ static char *help_msg(const unsigned char *sha1)
if (action == CHERRY_PICK) {
sprintf(helpbuf + strlen(helpbuf),
- "\nWhen commiting, use the option "
+ "\nWhen committing, use the option "
"'-c %s' to retain authorship and message.",
find_unique_abbrev(sha1, DEFAULT_ABBREV));
}
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 10b8f8c..ad93a97 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -16,7 +16,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'cd .. && git commit -m move-out -a'
test_expect_success \
@@ -30,7 +30,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'cd .. && git commit -m move-in -a'
test_expect_success \
@@ -82,7 +82,7 @@ test_expect_success \
'git mv path0 path2'
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'git commit -m dir-move -a'
test_expect_success \
@@ -101,7 +101,7 @@ test_expect_success \
'git mv path2 path1'
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'git commit -m dir-move -a'
test_expect_success \
--
1.6.5.2
^ permalink raw reply related [relevance 13%]
* Re: [PATCH] Several tests: cd inside subshell instead of around
@ 2010-09-07 2:37 4% ` Jonathan Nieder
0 siblings, 0 replies; 200+ results
From: Jonathan Nieder @ 2010-09-07 2:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jens Lehmann, Git Mailing List
Junio C Hamano wrote:
> If we were to insist that no matter how an individual test fail, the test
> that follows it must start in a known location (namely, $TRASH), then we
> might want to use something like the attached patch.
I like it. Affected test scripts:
t0003-attributes.sh t0050-filesystem.sh
t1007-hash-object.sh t1020-subdirectory.sh
t1301-shared-repo.sh t1500-rev-parse.sh
t1501-worktree.sh t1504-ceiling-dirs.sh
t2050-git-dir-relative.sh t2300-cd-to-toplevel.sh
t3407-rebase-abort.sh t4119-apply-config.sh
t5300-pack-object.sh t5404-tracking-branches.sh
t5406-remote-rejects.sh t5510-fetch.sh
t5515-fetch-merge-logic.sh t5520-pull.sh
t5530-upload-pack-error.sh t5600-clone-fail-cleanup.sh
t5700-clone-reference.sh t5701-clone-local.sh
t5710-info-alternate.sh t6029-merge-subtree.sh
t7001-mv.sh t7103-reset-bare.sh
t7400-submodule-basic.sh t7401-submodule-summary.sh
t7408-submodule-reference.sh t7610-mergetool.sh
t9101-git-svn-props.sh t9103-git-svn-tracked-directory-removed.sh
t9113-git-svn-dcommit-new-file.sh
t9115-git-svn-dcommit-funky-renames.sh
t9117-git-svn-init-clone.sh
t9137-git-svn-dcommit-clobber-series.sh
t9400-git-cvsserver-server.sh
and probably some others.
What is the ",$(pwd)" for?
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 29fd720..90ed4d9 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -370,6 +370,11 @@ test_debug () {
}
test_run_ () {
+ if test ",$(pwd)" != ",$TRASH_DIRECTORY"
+ then
+ error "bug in test script: starting from a different directory"
+ fi
+
test_cleanup=:
eval >&3 2>&4 "$1"
eval_ret=$?
@@ -377,6 +382,11 @@ test_run_ () {
if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"; then
echo ""
fi
+
+ if test ",$(pwd)" != ",$TRASH_DIRECTORY"
+ then
+ error "bug in test script: moved to a different directory"
+ fi
return 0
}
--
^ permalink raw reply related [relevance 4%]
* [RFC PATCH 00/95] Add missing &&'s in the testsuite
@ 2010-09-24 21:06 4% Elijah Newren
0 siblings, 0 replies; 200+ results
From: Elijah Newren @ 2010-09-24 21:06 UTC (permalink / raw)
To: git; +Cc: Elijah Newren
I ran across three testfiles which were missing &&s; one was missing
several, while another would no longer pass after adding one and had
no comment to that effect. So I decided it was time to look through
the testsuite. Now I have a 95 patch series, which I'm worried might
be a bit too much spam for the mailing list. So the patches are
available from
git://gitorious.org/~newren/git/en.git add-missing-ands
Let me know if you're fine with mailing list spam, and I'd be happy
to flood all your inboxes.
80 of the 95 testfiles that needed changes were pretty mechanical --
just simple additions of '&&' in the appropriate place. 15 needed
other changes and I'm not entirely sure whether I made the right ones.
I've moved those 15 to the beginning of the series, so that you won't
have to hunt for them. (If it makes sense to send just the first 15
to the list, let me know, and I'll do that.)
Elijah Newren (95):
t6050 (replace): add missing &&
t1001 (read-tree-m-2way): add missing &&
t1002 (read-tree-m-u-2way): add missing &&
t3020 (ls-files-error-unmatch): remove stray '1' from end of file
t3600 (rm): add lots of missing &&
t4002 (diff-basic): use test_might_fail for commands that might fail
t4017 (diff-retval): replace manual exit code check with test_expect_code
t4019 (diff-wserror): add lots of missing &&
t4026 (color): add missing &&
t4202 (log): Replace '<git-command> || :' with test_might_fail
t5602 (clone-remote-exec): add missing &&
t6016 (rev-list-graph-simplify-history): add missing &&
t7001 (mv): add missing &&
t7601 (merge-pull-config): add missing &&
t7800 (difftool): add missing &&
t0001 (init): add missing &&
t0003 (attributes): add missing &&
t0020 (crlf): add missing &&
t0024 (crlf-archive): add missing &&
t0026 (eol-config): add missing &&
t0050 (filesystem): add missing &&
t1000 (read-tree-m-3way): add missing &&
t1302 (repo-version): add missing &&
t1401 (symbolic-ref): add missing &&
t1402 (check-ref-format): add missing &&
t1410 (reflog): add missing &&
t1501 (worktree): add missing &&
t1509 (root-worktree): add missing &&
t2007 (checkout-symlink): add missing &&
t2016 (checkout-patch): add missing &&
t2050 (git-dir-relative): add missing &&
t2103 (update-index-ignore-missing): add missing &&
t2200 (add-update): add missing &&
t3001 (ls-files-others-exclude): add missing &&
t3050 (subprojects-fetch): add missing &&
t3203 (branch-output): add missing &&
t3307 (notes-man): add missing &&
t3406 (rebase-message): add missing &&
t3408 (rebase-multi-line): add missing &&
t3504 (cherry-pick-rerere): add missing &&
t3903 (stash): add missing &&
t3904 (stash-patch): add missing &&
t4021 (format-patch-numbered): add missing &&
t4027 (diff-submodule): add missing &&
t4103 (apply-binary): add missing &&
t4104 (apply-boundary): add missing &&
t4111 (apply-subdir): add missing &&
t4119 (apply-config): add missing &&
t4124 (apply-ws-rule): add missing &&
t4127 (apply-same-fn): add missing &&
t4130 (apply-criss-cross-rename): add missing &&
t4133 (apply-filenames): add missing &&
t4150 (am): add missing &&
t5300 (pack-object): add missing &&
t5301 (sliding-window): add missing &&
t5302 (pack-index): add missing &&
t5500 (fetch-pack): add missing &&
t5502 (quickfetch): add missing &&
t5503 (tagfollow): add missing &&
t5510 (fetch): add missing &&
t5516 (fetch-push): add missing &&
t5517 (push-mirror): add missing &&
t5519 (push-alternates): add missing &&
t5531 (deep-submodule-push): add missing &&
t5541 (http-push): add missing &&
t5550 (http-fetch): add missing &&
t5601 (clone): add missing &&
t5701 (clone-local): add missing &&
t5705 (clone-2gb): add missing &&
t6009 (rev-list-parent): add missing &&
t6010 (merge-base): add missing &&
t6022 (merge-rename): add a missing &&
t6024 (recursive-merge): add missing &&
t6030 (bisect-porcelain): add missing &&
t6040 (tracking-info): add missing &&
t7004 (tag): add missing &&
t7105 (reset-patch): add missing &&
t7300 (clean): add missing &&
t7501 (commit): add missing &&
t7502 (commit): add missing &&
t7506 (status-submodule): add missing &&
t7600 (merge): add missing &&
t7610 (mergetool): add missing &&
t7700 (repack): add missing &&
t8003 (blame): add missing &&
t9122 (git-svn-author): add missing &&
t9123 (git-svn-rebuild-with-rewriteroot): add missing &&
t9134 (git-svn-ignore-paths): add missing &&
t9137 (git-svn-dcommit-clobber-series): add missing &&
t9138 (git-svn-authors-prog): add missing &&
t9146 (git-svn-empty-dirs): add missing &&
t9151 (svn-mergeinfo): add missing &&
t9200 (git-cvsexportcommit): add missing &&
t9401 (git-cvsserver-crlf): add missing &&
t9600 (cvsimport): add missing &&
t/t0001-init.sh | 20 +++++-----
t/t0003-attributes.sh | 16 ++++----
t/t0020-crlf.sh | 2 +-
t/t0024-crlf-archive.sh | 4 +-
t/t0026-eol-config.sh | 2 +-
t/t0050-filesystem.sh | 6 ++--
t/t1000-read-tree-m-3way.sh | 2 +-
t/t1001-read-tree-m-2way.sh | 18 +++++-----
t/t1002-read-tree-m-u-2way.sh | 10 +++---
t/t1302-repo-version.sh | 2 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1402-check-ref-format.sh | 4 +-
t/t1410-reflog.sh | 8 ++--
t/t1501-worktree.sh | 2 +-
t/t1509-root-worktree.sh | 6 ++--
t/t2007-checkout-symlink.sh | 2 +-
t/t2016-checkout-patch.sh | 2 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2103-update-index-ignore-missing.sh | 2 +-
t/t2200-add-update.sh | 2 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 1 -
t/t3050-subprojects-fetch.sh | 4 +-
t/t3203-branch-output.sh | 6 ++--
t/t3307-notes-man.sh | 2 +-
t/t3406-rebase-message.sh | 6 ++--
t/t3408-rebase-multi-line.sh | 2 +-
t/t3504-cherry-pick-rerere.sh | 4 +-
t/t3600-rm.sh | 38 +++++++++-----------
t/t3903-stash.sh | 4 +-
t/t3904-stash-patch.sh | 2 +-
t/t4002-diff-basic.sh | 12 +++---
t/t4017-diff-retval.sh | 30 +++++----------
t/t4019-diff-wserror.sh | 52 +++++++++++++-------------
t/t4021-format-patch-numbered.sh | 2 +-
t/t4026-color.sh | 2 +-
t/t4027-diff-submodule.sh | 2 +-
t/t4103-apply-binary.sh | 8 ++--
t/t4104-apply-boundary.sh | 4 +-
t/t4111-apply-subdir.sh | 4 +-
t/t4119-apply-config.sh | 2 +-
t/t4124-apply-ws-rule.sh | 4 +-
t/t4127-apply-same-fn.sh | 18 +++++-----
t/t4130-apply-criss-cross-rename.sh | 2 +-
t/t4133-apply-filenames.sh | 6 ++--
t/t4150-am.sh | 2 +-
t/t4202-log.sh | 2 +-
t/t5300-pack-object.sh | 4 +-
t/t5301-sliding-window.sh | 2 +-
t/t5302-pack-index.sh | 2 +-
t/t5500-fetch-pack.sh | 2 +-
t/t5502-quickfetch.sh | 2 +-
t/t5503-tagfollow.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5516-fetch-push.sh | 20 +++++-----
t/t5517-push-mirror.sh | 10 +++---
t/t5519-push-alternates.sh | 2 +-
t/t5531-deep-submodule-push.sh | 2 +-
t/t5541-http-push.sh | 2 +-
t/t5550-http-fetch.sh | 6 ++--
t/t5601-clone.sh | 6 ++--
t/t5602-clone-remote-exec.sh | 14 ++++----
t/t5701-clone-local.sh | 8 ++--
t/t5705-clone-2gb.sh | 2 +-
t/t6009-rev-list-parent.sh | 2 +-
t/t6010-merge-base.sh | 2 +-
t/t6016-rev-list-graph-simplify-history.sh | 24 +++---------
t/t6022-merge-rename.sh | 2 +-
t/t6024-recursive-merge.sh | 2 +-
t/t6030-bisect-porcelain.sh | 8 ++--
t/t6040-tracking-info.sh | 2 +-
t/t6050-replace.sh | 4 +-
t/t7001-mv.sh | 2 +-
t/t7004-tag.sh | 14 ++++----
t/t7105-reset-patch.sh | 6 ++--
t/t7300-clean.sh | 6 ++--
t/t7501-commit.sh | 2 +-
t/t7502-commit.sh | 2 +-
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 12 +++---
t/t7610-mergetool.sh | 2 +-
t/t7700-repack.sh | 2 +-
t/t7800-difftool.sh | 12 +++---
t/t8003-blame.sh | 6 ++--
t/t9122-git-svn-author.sh | 4 +-
t/t9123-git-svn-rebuild-with-rewriteroot.sh | 2 +-
t/t9134-git-svn-ignore-paths.sh | 6 ++--
t/t9137-git-svn-dcommit-clobber-series.sh | 2 +-
t/t9138-git-svn-authors-prog.sh | 6 ++--
t/t9146-git-svn-empty-dirs.sh | 6 ++--
t/t9151-svn-mergeinfo.sh | 22 ++++++------
t/t9200-git-cvsexportcommit.sh | 4 +-
t/t9401-git-cvsserver-crlf.sh | 2 +-
t/t9600-cvsimport.sh | 2 +-
95 files changed, 287 insertions(+), 314 deletions(-)
--
1.7.3.95.g14291
^ permalink raw reply [relevance 4%]
* [RFC PATCHv2 00/16] Add missing &&'s in the testsuite
@ 2010-09-24 22:22 4% Elijah Newren
2010-09-24 22:22 19% ` [RFC PATCHv2 13/16] t7001 (mv): add missing && Elijah Newren
0 siblings, 1 reply; 200+ results
From: Elijah Newren @ 2010-09-24 22:22 UTC (permalink / raw)
To: git; +Cc: Elijah Newren
This patch series fixes many of the missing &&s in the testsuite. I'm
certain there are still others I have missed. While many of the
changes were simple and obvious (e.g. the 80 files changed in patch 16
of this series), some required other changes which I'd like some
feedback on.
Changes since v1:
* Squashed all the trivial mechanical '&&' addition patches together
* Re-ordered the other 15 patches by type of change
*** BLURB HERE ***
Elijah Newren (16):
t3020 (ls-files-error-unmatch): remove stray '1' from end of file
I'm guessing this was a stray character typed in and unnoticed, but
perhaps it serves a real purpose that I just don't understand?
t4017 (diff-retval): replace manual exit code check with test_expect_code
Several tests in t4017 just ran one command and tried to check it's
exit status, so they seemed like clear candidates for
test_expect_code.
t1001 (read-tree-m-2way): add missing &&
t1002 (read-tree-m-u-2way): add missing &&
t4002 (diff-basic): use test_might_fail for commands that might fail
t4202 (log): Replace '<git-command> || :' with test_might_fail
All four of these patches replace occurrences of things like
command that should succeed || return 1
command that will fail
with
command that should succeed &&
test_might_fail command that will fail &&
t3600 (rm): add lots of missing &&
t4019 (diff-wserror): add lots of missing &&
t4026 (color): add missing &&
t5602 (clone-remote-exec): add missing &&
t6016 (rev-list-graph-simplify-history): add missing &&
t6050 (replace): add missing &&
t7001 (mv): add missing &&
t7601 (merge-pull-config): add missing &&
t7800 (difftool): add missing &&
These 9 tests needed modifications of various sorts to pass after
adding missing &&s.
Add missing &&'s throughout the testsuite
One big patch for 80 files with simple addition of '&&' where it was
needed.
t/t0001-init.sh | 20 +++++-----
t/t0003-attributes.sh | 16 ++++----
t/t0020-crlf.sh | 2 +-
t/t0024-crlf-archive.sh | 4 +-
t/t0026-eol-config.sh | 2 +-
t/t0050-filesystem.sh | 6 ++--
t/t1000-read-tree-m-3way.sh | 2 +-
t/t1001-read-tree-m-2way.sh | 18 +++++-----
t/t1002-read-tree-m-u-2way.sh | 10 +++---
t/t1302-repo-version.sh | 2 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1402-check-ref-format.sh | 4 +-
t/t1410-reflog.sh | 8 ++--
t/t1501-worktree.sh | 2 +-
t/t1509-root-worktree.sh | 6 ++--
t/t2007-checkout-symlink.sh | 2 +-
t/t2016-checkout-patch.sh | 2 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2103-update-index-ignore-missing.sh | 2 +-
t/t2200-add-update.sh | 2 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 1 -
t/t3050-subprojects-fetch.sh | 4 +-
t/t3203-branch-output.sh | 6 ++--
t/t3307-notes-man.sh | 2 +-
t/t3406-rebase-message.sh | 6 ++--
t/t3408-rebase-multi-line.sh | 2 +-
t/t3504-cherry-pick-rerere.sh | 4 +-
t/t3600-rm.sh | 38 +++++++++-----------
t/t3903-stash.sh | 4 +-
t/t3904-stash-patch.sh | 2 +-
t/t4002-diff-basic.sh | 12 +++---
t/t4017-diff-retval.sh | 30 +++++----------
t/t4019-diff-wserror.sh | 52 +++++++++++++-------------
t/t4021-format-patch-numbered.sh | 2 +-
t/t4026-color.sh | 2 +-
t/t4027-diff-submodule.sh | 2 +-
t/t4103-apply-binary.sh | 8 ++--
t/t4104-apply-boundary.sh | 4 +-
t/t4111-apply-subdir.sh | 4 +-
t/t4119-apply-config.sh | 2 +-
t/t4124-apply-ws-rule.sh | 4 +-
t/t4127-apply-same-fn.sh | 18 +++++-----
t/t4130-apply-criss-cross-rename.sh | 2 +-
t/t4133-apply-filenames.sh | 6 ++--
t/t4150-am.sh | 2 +-
t/t4202-log.sh | 2 +-
t/t5300-pack-object.sh | 4 +-
t/t5301-sliding-window.sh | 2 +-
t/t5302-pack-index.sh | 2 +-
t/t5500-fetch-pack.sh | 2 +-
t/t5502-quickfetch.sh | 2 +-
t/t5503-tagfollow.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5516-fetch-push.sh | 20 +++++-----
t/t5517-push-mirror.sh | 10 +++---
t/t5519-push-alternates.sh | 2 +-
t/t5531-deep-submodule-push.sh | 2 +-
t/t5541-http-push.sh | 2 +-
t/t5550-http-fetch.sh | 6 ++--
t/t5601-clone.sh | 6 ++--
t/t5602-clone-remote-exec.sh | 14 ++++----
t/t5701-clone-local.sh | 8 ++--
t/t5705-clone-2gb.sh | 2 +-
t/t6009-rev-list-parent.sh | 2 +-
t/t6010-merge-base.sh | 2 +-
t/t6016-rev-list-graph-simplify-history.sh | 24 +++---------
t/t6022-merge-rename.sh | 2 +-
t/t6024-recursive-merge.sh | 2 +-
t/t6030-bisect-porcelain.sh | 8 ++--
t/t6040-tracking-info.sh | 2 +-
t/t6050-replace.sh | 4 +-
t/t7001-mv.sh | 2 +-
t/t7004-tag.sh | 14 ++++----
t/t7105-reset-patch.sh | 6 ++--
t/t7300-clean.sh | 6 ++--
t/t7501-commit.sh | 2 +-
t/t7502-commit.sh | 2 +-
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 12 +++---
t/t7610-mergetool.sh | 2 +-
t/t7700-repack.sh | 2 +-
t/t7800-difftool.sh | 12 +++---
t/t8003-blame.sh | 6 ++--
t/t9122-git-svn-author.sh | 4 +-
t/t9123-git-svn-rebuild-with-rewriteroot.sh | 2 +-
t/t9134-git-svn-ignore-paths.sh | 6 ++--
t/t9137-git-svn-dcommit-clobber-series.sh | 2 +-
t/t9138-git-svn-authors-prog.sh | 6 ++--
t/t9146-git-svn-empty-dirs.sh | 6 ++--
t/t9151-svn-mergeinfo.sh | 22 ++++++------
t/t9200-git-cvsexportcommit.sh | 4 +-
t/t9401-git-cvsserver-crlf.sh | 2 +-
t/t9600-cvsimport.sh | 2 +-
95 files changed, 287 insertions(+), 314 deletions(-)
--
1.7.3.95.g14291
^ permalink raw reply [relevance 4%]
* [RFC PATCHv2 13/16] t7001 (mv): add missing &&
2010-09-24 22:22 4% [RFC PATCHv2 00/16] " Elijah Newren
@ 2010-09-24 22:22 19% ` Elijah Newren
2010-09-24 23:00 6% ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 200+ results
From: Elijah Newren @ 2010-09-24 22:22 UTC (permalink / raw)
To: git; +Cc: Elijah Newren
FIXME: I believe the mv was meant to fail here so I added a test_must_fail;
was that the right change?
Signed-off-by: Elijah Newren <newren@gmail.com>
---
t/t7001-mv.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 65a35d9..624e6d2 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -61,7 +61,7 @@ test_expect_success \
test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
- git mv -f untracked1 path0
+ test_must_fail git mv -f untracked1 path0 &&
test ! -f .git/index.lock &&
test -f untracked1 &&
test -f path0/untracked1'
--
1.7.3.95.g14291
^ permalink raw reply related [relevance 19%]
* Re: [RFC PATCHv2 13/16] t7001 (mv): add missing &&
2010-09-24 22:22 19% ` [RFC PATCHv2 13/16] t7001 (mv): add missing && Elijah Newren
@ 2010-09-24 23:00 6% ` Ævar Arnfjörð Bjarmason
0 siblings, 0 replies; 200+ results
From: Ævar Arnfjörð Bjarmason @ 2010-09-24 23:00 UTC (permalink / raw)
To: Elijah Newren; +Cc: git
On Fri, Sep 24, 2010 at 22:22, Elijah Newren <newren@gmail.com> wrote:
> FIXME: I believe the mv was meant to fail here so I added a test_must_fail;
> was that the right change?
Yeah, you can't mv an untracked file.
^ permalink raw reply [relevance 6%]
* [PATCHv3 00/16] Add missing &&'s in the testsuite
@ 2010-09-25 19:06 4% Elijah Newren
2010-09-25 19:07 19% ` [PATCHv3 12/16] t7001 (mv): add missing && Elijah Newren
0 siblings, 1 reply; 200+ results
From: Elijah Newren @ 2010-09-25 19:06 UTC (permalink / raw)
To: git; +Cc: Elijah Newren
This patch series fixes many of the missing &&s in the testsuite. I'm
certain there are still others I have missed.
Comments on whether t6050 really intended to have the grep fail (see
patch 11), and whether a portable_unset() helper function would make
sense (see patch 16), would be appreciated.
Changes since v2:
* Squashed patches 3 & 4 of previous series together given their
similarity.
* Made several changes suggested by Ævar Arnfjörð Bjarmason and Jeff
King
* Dropped the FIXME questions (and the "RFC" in the submission, though
perhaps I should leave it based on my questions in patches 11 and 16)
* Created a new patch at the end of the series to deal with the
unportability of unset's return value with already unset
variables, following the guidelines in t/README
Elijah Newren (16):
t3020 (ls-files-error-unmatch): remove stray '1' from end of file
t4017 (diff-retval): replace manual exit code check with
test_expect_code
t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
t4002 (diff-basic): use test_might_fail for commands that might fail
t4202 (log): Replace '<git-command> || :' with test_might_fail
t3600 (rm): add lots of missing &&
t4019 (diff-wserror): add lots of missing &&
t4026 (color): add missing &&
t5602 (clone-remote-exec): add missing &&
t6016 (rev-list-graph-simplify-history): add missing &&
t6050 (replace): add missing &&
t7001 (mv): add missing &&
t7601 (merge-pull-config): add missing &&
t7800 (difftool): add missing &&
Add missing &&'s throughout the testsuite
Replace "unset VAR" with "unset VAR;" in testsuite as per t/README
t/t0001-init.sh | 30 ++++++++--------
t/t0003-attributes.sh | 41 ++++++++++-----------
t/t0020-crlf.sh | 2 +-
t/t0024-crlf-archive.sh | 4 +-
t/t0026-eol-config.sh | 2 +-
t/t0050-filesystem.sh | 6 ++--
t/t1000-read-tree-m-3way.sh | 2 +-
t/t1001-read-tree-m-2way.sh | 18 +++++-----
t/t1002-read-tree-m-u-2way.sh | 10 +++---
t/t1302-repo-version.sh | 2 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1402-check-ref-format.sh | 4 +-
t/t1410-reflog.sh | 8 ++--
t/t1501-worktree.sh | 2 +-
t/t1509-root-worktree.sh | 6 ++--
t/t2007-checkout-symlink.sh | 2 +-
t/t2016-checkout-patch.sh | 2 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2103-update-index-ignore-missing.sh | 2 +-
t/t2200-add-update.sh | 2 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 1 -
t/t3050-subprojects-fetch.sh | 4 +-
t/t3203-branch-output.sh | 6 ++--
t/t3307-notes-man.sh | 2 +-
t/t3406-rebase-message.sh | 6 ++--
t/t3408-rebase-multi-line.sh | 2 +-
t/t3504-cherry-pick-rerere.sh | 4 +-
t/t3600-rm.sh | 38 +++++++++-----------
t/t3903-stash.sh | 4 +-
t/t3904-stash-patch.sh | 2 +-
t/t4002-diff-basic.sh | 12 +++---
t/t4017-diff-retval.sh | 30 +++++----------
t/t4019-diff-wserror.sh | 52 +++++++++++++-------------
t/t4021-format-patch-numbered.sh | 2 +-
t/t4026-color.sh | 1 -
t/t4027-diff-submodule.sh | 2 +-
t/t4103-apply-binary.sh | 8 ++--
t/t4104-apply-boundary.sh | 4 +-
t/t4111-apply-subdir.sh | 4 +-
t/t4119-apply-config.sh | 2 +-
t/t4124-apply-ws-rule.sh | 4 +-
t/t4127-apply-same-fn.sh | 18 +++++-----
t/t4130-apply-criss-cross-rename.sh | 2 +-
t/t4133-apply-filenames.sh | 6 ++--
t/t4150-am.sh | 2 +-
t/t4202-log.sh | 2 +-
t/t5300-pack-object.sh | 4 +-
t/t5301-sliding-window.sh | 2 +-
t/t5302-pack-index.sh | 2 +-
t/t5500-fetch-pack.sh | 2 +-
t/t5502-quickfetch.sh | 2 +-
t/t5503-tagfollow.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5516-fetch-push.sh | 20 +++++-----
t/t5517-push-mirror.sh | 10 +++---
t/t5519-push-alternates.sh | 2 +-
t/t5531-deep-submodule-push.sh | 2 +-
t/t5541-http-push.sh | 2 +-
t/t5550-http-fetch.sh | 6 ++--
t/t5601-clone.sh | 6 ++--
t/t5602-clone-remote-exec.sh | 14 ++++----
t/t5701-clone-local.sh | 8 ++--
t/t5705-clone-2gb.sh | 2 +-
t/t6009-rev-list-parent.sh | 2 +-
t/t6010-merge-base.sh | 2 +-
t/t6016-rev-list-graph-simplify-history.sh | 24 +++---------
t/t6022-merge-rename.sh | 2 +-
t/t6024-recursive-merge.sh | 2 +-
t/t6030-bisect-porcelain.sh | 8 ++--
t/t6040-tracking-info.sh | 2 +-
t/t6050-replace.sh | 5 ++-
t/t7001-mv.sh | 2 +-
t/t7004-tag.sh | 14 ++++----
t/t7105-reset-patch.sh | 6 ++--
t/t7300-clean.sh | 6 ++--
t/t7501-commit.sh | 2 +-
t/t7502-commit.sh | 6 ++--
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 12 +++---
t/t7610-mergetool.sh | 2 +-
t/t7700-repack.sh | 2 +-
t/t7800-difftool.sh | 11 +++---
t/t8003-blame.sh | 6 ++--
t/t9122-git-svn-author.sh | 4 +-
t/t9123-git-svn-rebuild-with-rewriteroot.sh | 2 +-
t/t9134-git-svn-ignore-paths.sh | 6 ++--
t/t9137-git-svn-dcommit-clobber-series.sh | 2 +-
t/t9138-git-svn-authors-prog.sh | 6 ++--
t/t9146-git-svn-empty-dirs.sh | 6 ++--
t/t9151-svn-mergeinfo.sh | 22 ++++++------
t/t9200-git-cvsexportcommit.sh | 4 +-
t/t9401-git-cvsserver-crlf.sh | 2 +-
t/t9600-cvsimport.sh | 2 +-
95 files changed, 305 insertions(+), 334 deletions(-)
--
1.7.3.95.g14291
^ permalink raw reply [relevance 4%]
* [PATCHv3 12/16] t7001 (mv): add missing &&
2010-09-25 19:06 4% [PATCHv3 00/16] Add missing &&'s in the testsuite Elijah Newren
@ 2010-09-25 19:07 19% ` Elijah Newren
0 siblings, 0 replies; 200+ results
From: Elijah Newren @ 2010-09-25 19:07 UTC (permalink / raw)
To: git; +Cc: Elijah Newren
Also, prefix an expected-to-fail git mv command with 'test_must_fail'.
Signed-off-by: Elijah Newren <newren@gmail.com>
---
t/t7001-mv.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 65a35d9..624e6d2 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -61,7 +61,7 @@ test_expect_success \
test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
- git mv -f untracked1 path0
+ test_must_fail git mv -f untracked1 path0 &&
test ! -f .git/index.lock &&
test -f untracked1 &&
test -f path0/untracked1'
--
1.7.3.95.g14291
^ permalink raw reply related [relevance 19%]
* [PATCHv4 00/15] Add missing &&'s in the testsuite
@ 2010-09-26 23:14 5% Elijah Newren
2010-09-26 23:14 21% ` [PATCHv4 11/15] t7001 (mv): add missing && Elijah Newren
0 siblings, 1 reply; 200+ results
From: Elijah Newren @ 2010-09-26 23:14 UTC (permalink / raw)
To: git; +Cc: gitster, Elijah Newren
This patch series fixes many of the missing &&s in the testsuite. I'm
certain there are still others I have missed.
Changes since v3:
* Dropped patch 11; Christian has submitted a more thorough fix that
includes my patch and more.
* Fixed issue in patch 15 of previous series (now patch 14) noted by Ævar.
* Fixed subject line for patch 8, as noted by Jeff.
* Added acks from Ævar Arnfjörð Bjarmason and Jeff King
Elijah Newren (15):
t3020 (ls-files-error-unmatch): remove stray '1' from end of file
t4017 (diff-retval): replace manual exit code check with
test_expect_code
t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
t4002 (diff-basic): use test_might_fail for commands that might fail
t4202 (log): Replace '<git-command> || :' with test_might_fail
t3600 (rm): add lots of missing &&
t4019 (diff-wserror): add lots of missing &&
t4026 (color): remove unneeded and unchained command
t5602 (clone-remote-exec): add missing &&
t6016 (rev-list-graph-simplify-history): add missing &&
t7001 (mv): add missing &&
t7601 (merge-pull-config): add missing &&
t7800 (difftool): add missing &&
Add missing &&'s throughout the testsuite
Replace "unset VAR" with "unset VAR;" in testsuite as per t/README
t/t0001-init.sh | 30 ++++++++--------
t/t0003-attributes.sh | 41 ++++++++++-----------
t/t0020-crlf.sh | 2 +-
t/t0024-crlf-archive.sh | 4 +-
t/t0026-eol-config.sh | 2 +-
t/t0050-filesystem.sh | 6 ++--
t/t1000-read-tree-m-3way.sh | 2 +-
t/t1001-read-tree-m-2way.sh | 18 +++++-----
t/t1002-read-tree-m-u-2way.sh | 10 +++---
t/t1302-repo-version.sh | 2 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1402-check-ref-format.sh | 4 +-
t/t1410-reflog.sh | 8 ++--
t/t1501-worktree.sh | 2 +-
t/t1509-root-worktree.sh | 6 ++--
t/t2007-checkout-symlink.sh | 2 +-
t/t2016-checkout-patch.sh | 2 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2103-update-index-ignore-missing.sh | 2 +-
t/t2200-add-update.sh | 2 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 1 -
t/t3050-subprojects-fetch.sh | 4 +-
t/t3203-branch-output.sh | 6 ++--
t/t3307-notes-man.sh | 2 +-
t/t3406-rebase-message.sh | 6 ++--
t/t3408-rebase-multi-line.sh | 2 +-
t/t3504-cherry-pick-rerere.sh | 4 +-
t/t3600-rm.sh | 38 +++++++++-----------
t/t3903-stash.sh | 4 +-
t/t3904-stash-patch.sh | 2 +-
t/t4002-diff-basic.sh | 12 +++---
t/t4017-diff-retval.sh | 30 +++++----------
t/t4019-diff-wserror.sh | 52 +++++++++++++-------------
t/t4021-format-patch-numbered.sh | 2 +-
t/t4026-color.sh | 1 -
t/t4027-diff-submodule.sh | 2 +-
t/t4103-apply-binary.sh | 8 ++--
t/t4104-apply-boundary.sh | 4 +-
t/t4111-apply-subdir.sh | 4 +-
t/t4119-apply-config.sh | 2 +-
t/t4124-apply-ws-rule.sh | 4 +-
t/t4127-apply-same-fn.sh | 18 +++++-----
t/t4130-apply-criss-cross-rename.sh | 2 +-
t/t4133-apply-filenames.sh | 6 ++--
t/t4150-am.sh | 2 +-
t/t4202-log.sh | 2 +-
t/t5300-pack-object.sh | 4 +-
t/t5301-sliding-window.sh | 2 +-
t/t5302-pack-index.sh | 2 +-
t/t5500-fetch-pack.sh | 2 +-
t/t5502-quickfetch.sh | 2 +-
t/t5503-tagfollow.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5516-fetch-push.sh | 20 +++++-----
t/t5517-push-mirror.sh | 10 +++---
t/t5519-push-alternates.sh | 2 +-
t/t5531-deep-submodule-push.sh | 2 +-
t/t5541-http-push.sh | 2 +-
t/t5550-http-fetch.sh | 6 ++--
t/t5601-clone.sh | 6 ++--
t/t5602-clone-remote-exec.sh | 14 ++++----
t/t5701-clone-local.sh | 8 ++--
t/t5705-clone-2gb.sh | 2 +-
t/t6009-rev-list-parent.sh | 2 +-
t/t6010-merge-base.sh | 2 +-
t/t6016-rev-list-graph-simplify-history.sh | 24 +++---------
t/t6022-merge-rename.sh | 2 +-
t/t6024-recursive-merge.sh | 2 +-
t/t6030-bisect-porcelain.sh | 8 ++--
t/t6040-tracking-info.sh | 2 +-
t/t7001-mv.sh | 2 +-
t/t7004-tag.sh | 14 ++++----
t/t7105-reset-patch.sh | 6 ++--
t/t7300-clean.sh | 6 ++--
t/t7501-commit.sh | 2 +-
t/t7502-commit.sh | 6 ++--
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 12 +++---
t/t7610-mergetool.sh | 2 +-
t/t7700-repack.sh | 2 +-
t/t7800-difftool.sh | 11 +++---
t/t8003-blame.sh | 6 ++--
t/t9122-git-svn-author.sh | 4 +-
t/t9123-git-svn-rebuild-with-rewriteroot.sh | 2 +-
t/t9134-git-svn-ignore-paths.sh | 6 ++--
t/t9137-git-svn-dcommit-clobber-series.sh | 2 +-
t/t9138-git-svn-authors-prog.sh | 6 ++--
t/t9146-git-svn-empty-dirs.sh | 6 ++--
t/t9151-svn-mergeinfo.sh | 22 ++++++------
t/t9200-git-cvsexportcommit.sh | 4 +-
t/t9401-git-cvsserver-crlf.sh | 2 +-
t/t9600-cvsimport.sh | 2 +-
94 files changed, 302 insertions(+), 332 deletions(-)
--
1.7.3.95.g14291
^ permalink raw reply [relevance 5%]
* [PATCHv4 11/15] t7001 (mv): add missing &&
2010-09-26 23:14 5% [PATCHv4 00/15] Add missing &&'s in the testsuite Elijah Newren
@ 2010-09-26 23:14 21% ` Elijah Newren
0 siblings, 0 replies; 200+ results
From: Elijah Newren @ 2010-09-26 23:14 UTC (permalink / raw)
To: git; +Cc: gitster, Elijah Newren
Also, prefix an expected-to-fail git mv command with 'test_must_fail'.
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
---
t/t7001-mv.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 65a35d9..624e6d2 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -61,7 +61,7 @@ test_expect_success \
test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
- git mv -f untracked1 path0
+ test_must_fail git mv -f untracked1 path0 &&
test ! -f .git/index.lock &&
test -f untracked1 &&
test -f path0/untracked1'
--
1.7.3.95.g14291
^ permalink raw reply related [relevance 21%]
* What's cooking in git.git (Sep 2010, #07; Wed, 29)
@ 2010-09-30 0:16 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2010-09-30 0:16 UTC (permalink / raw)
To: git
What's cooking in git.git (Sep 2010, #07; Wed, 29)
--------------------------------------------------
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.
With fixes to a few brown paper bag regressions to "git stash", 1.7.3.1 is
out. The first batch of topics that have been cooking have graduated on
the 'master' front.
--------------------------------------------------
[Graduated to "master"]
* ab/send-email-catfile (2010-09-14) 1 commit
(merged to 'next' on 2010-09-22 at 5c53513)
+ send-email: use catfile() to concatenate files
* bc/fortran-userdiff (2010-09-10) 1 commit
(merged to 'next' on 2010-09-22 at f0c8ddb)
+ userdiff.c: add builtin fortran regex patterns
* gb/shell-ext (2010-08-27) 6 commits
(merged to 'next' on 2010-09-22 at e529b2a)
+ shell: Display errors from improperly-formatted command lines
+ Merge branch 'gb/split-cmdline-errmsg' into gb/shell-ext
+ shell: Rewrite documentation and improve error message
+ Add sample commands for git-shell
+ Add interactive mode to git-shell for user-friendliness
+ Allow creation of arbitrary git-shell commands
* jc/grep-header-all-match-fix (2010-09-12) 2 commits
(merged to 'next' on 2010-09-22 at c78a8aa)
+ log --author: take union of multiple "author" requests
+ grep: move logic to compile header pattern into a separate helper
(this branch is used by jc/grep-header-all-match-fix-debug.)
We might want to give a more comprehensive revamp to the "filter by
grepping the commit log message" feature some day, somehow allowing the
full "git grep" boolean expression. But until then, this should suffice.
* jc/no-branch-name-with-dash-at-front (2010-09-14) 1 commit
(merged to 'next' on 2010-09-22 at 5918d77)
+ disallow branch names that start with a hyphen
This came up at $WORK.
* jc/pickaxe-grep (2010-08-31) 4 commits
(merged to 'next' on 2010-09-22 at 2a33735)
+ diff/log -G<pattern>: tests
+ git log/diff: add -G<regexp> that greps in the patch text
+ diff: pass the entire diff-options to diffcore_pickaxe()
+ gitdiffcore doc: update pickaxe description
This is a re-roll of "grepping inside the log -p output" which is a
feature that is often asked for when people hear about -S option.
* jk/read-tree-empty (2010-09-10) 1 commit
(merged to 'next' on 2010-09-22 at a6a00bd)
+ read-tree: deprecate syntax without tree-ish args
* jn/gitweb-test-lib (2010-09-12) 2 commits
(merged to 'next' on 2010-09-22 at 8a471ba)
+ t/gitweb-lib.sh: Use tabs for indent consistently
+ t/gitweb-lib.sh: Use GIT_BUILD_DIR
* po/etc-gitattributes (2010-09-01) 1 commit
(merged to 'next' on 2010-09-22 at dc64419)
+ Add global and system-wide gitattributes
* rr/fmt-merge-msg (2010-09-08) 5 commits
(merged to 'next' on 2010-09-22 at 958ca95)
+ t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length
+ t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length
+ merge: Make 'merge.log' an integer or boolean option
+ merge: Make '--log' an integer option for number of shortlog entries
+ fmt_merge_msg: Change fmt_merge_msg API to accept shortlog_len
* rr/format-patch-count-without-merges (2010-08-28) 2 commits
(merged to 'next' on 2010-09-22 at 4ae3edc)
+ format-patch: Don't go over merge commits
+ t4014-format-patch: Call test_tick before committing
* tr/send-email-refuse-sending-unedited-cover-letter (2009-06-08) 1 commit
(merged to 'next' on 2010-09-22 at e306400)
+ send-email: Refuse to send cover-letter template subject
--------------------------------------------------
[New Topics]
* mg/reset-doc (2010-09-15) 6 commits
(merged to 'next' on 2010-09-22 at 2a10b71)
+ git-reset.txt: make modes description more consistent
+ git-reset.txt: point to git-checkout
+ git-reset.txt: use "working tree" consistently
+ git-reset.txt: reset --soft is not a no-op
+ git-reset.txt: reset does not change files in target
+ git-reset.txt: clarify branch vs. branch head
Will merge to 'master' shortly.
* ab/makefile-track-cc (2010-09-12) 1 commit
(merged to 'next' on 2010-09-27 at 51daee0)
+ Makefile: add CC to TRACK_CFLAGS
Will merge to 'master' shortly.
* ab/require-perl-5.8 (2010-09-24) 2 commits
(merged to 'next' on 2010-09-27 at 1fcdd3c)
+ perl: use "use warnings" instead of -w
+ perl: bump the required Perl version to 5.8 from 5.6.[21]
* bc/fix-cherry-pick-root (2010-09-27) 1 commit
(merged to 'next' on 2010-09-27 at e27f4c9)
+ builtin/revert.c: don't dereference a NULL pointer
Will merge to 'master' shortly.
* cw/gitweb-hilite-config (2010-09-21) 1 commit
(merged to 'next' on 2010-09-27 at dd234ba)
+ Enable highlight executable path as a configuration option
Will merge to 'master' shortly.
* en/and-cascade-tests (2010-09-26) 12 commits
- Add missing &&'s throughout the testsuite
- t7601 (merge-pull-config): add missing &&
- t7001 (mv): add missing &&
- t6016 (rev-list-graph-simplify-history): add missing &&
- t4026 (color): remove unneeded and unchained command
- t4019 (diff-wserror): add lots of missing &&
- t3600 (rm): add lots of missing &&
- t4202 (log): Replace '<git-command> || :' with test_might_fail
- t4002 (diff-basic): use test_might_fail for commands that might fail
- t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
- t4017 (diff-retval): replace manual exit code check with test_expect_code
- t3020 (ls-files-error-unmatch): remove stray '1' from end of file
I've rejected a few patches in the series; will merge this to 'next'
perhaps after a reroll or two.
* jk/no-textconv-symlink (2010-09-21) 1 commit
- diff: don't use pathname-based diff drivers for symlinks
(this branch is used by ks/no-textconv-symlink.)
* ks/no-textconv-symlink (2010-09-29) 3 commits
- blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
- blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
- blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
(this branch uses jk/no-textconv-symlink.)
* jk/repack-reuse-object (2010-09-27) 2 commits
(merged to 'next' on 2010-09-27 at 5719f72)
+ Documentation: pack.compression: explain how to recompress
+ repack: add -F flag to let user choose between --no-reuse-delta/object
Will merge to 'master' shortly.
* jp/send-email-to-cmd (2010-09-24) 1 commit
- git-send-email.perl: Add --to-cmd
Should be Ok for 'next'.
* kb/merge-recursive-rename-threshold (2010-09-27) 2 commits
- diff: add synonyms for -M, -C, -B
- merge-recursive: option to specify rename threshold
(this branch uses jf/merge-ignore-ws.)
Should be Ok for 'next'.
* mg/fix-build-remote-helpers (2010-09-17) 1 commit
- remote-helpers: build in platform independent directory
Should be Ok for 'next'.
* nd/struct-pathspec (2010-09-20) 5 commits
- ce_path_match: drop prefix matching in favor of match_pathspec
- Convert ce_path_match() to use struct pathspec
- tree_entry_interesting: turn to match_pathspec if wildcard is present
- pathspec: add tree_recursive_diff parameter
- pathspec: mark wildcard pathspecs from the beginning
(this branch uses en/object-list-with-pathspec.)
* en/object-list-with-pathspec (2010-09-20) 8 commits
- Add testcases showing how pathspecs are handled with rev-list --objects
- Make rev-list --objects work together with pathspecs
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initialize pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is used by nd/struct-pathspec.)
* sb/send-email-use-to-from-input (2010-09-29) 1 commit
- send-email: Use To: headers in patch files
Should be Ok for 'next'.
* tc/smart-http-post-redirect (2010-09-25) 1 commit
- smart-http: Don't change POST to GET when following redirect
* uk/fix-author-ident-sed-script (2010-09-23) 1 commit
(merged to 'next' on 2010-09-27 at 5ad7d90)
+ get_author_ident_from_commit(): remove useless quoting
Will merge to 'master' shortly.
--------------------------------------------------
[Stalled]
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* by/line-log (2010-09-11) 18 commits
. log -L: do not free parents lists we might need again
. Document line history browser
. Add tests for line history browser
. Add --full-line-diff option
. Add --graph prefix before line history output
. Add parent rewriting to line history browser
. Make graph_next_line external to other part of git
. Make rewrite_parents public to other part of git
. Hook line history into cmd_log, ensuring a topo-ordered walk
. Print the line log
. map/take range to the parent of commits
. Add range clone functions
. Export three functions from diff.c
. Parse the -L options
. Refactor parse_loc
. Add the basic data structure for line level history
. parse-options: add two helper functions
. parse-options: enhance STOP_AT_NON_OPTION
Temporarily ejected to give room to nd/struct-pathspec topic as this
conflicts with it.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jj/icase-directory (2010-08-16) 6 commits
- Support case folding in git fast-import when core.ignorecase=true
- Support case folding for git add when core.ignorecase=true
- Add case insensitivity support when using git ls-files
- Add case insensitivity support for directories when using git status
- Case insensitivity support for .gitignore via core.ignorecase
- Add string comparison functions that respect the ignore_case variable.
Depends on GNU FNM_CASEFOLD. Presumably a bit of tweak in Makefile for
non-windows but non-GNU platforms is all it takes?
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
--------------------------------------------------
[Cooking]
* as/daemon-multi-listen (2010-08-30) 2 commits
- daemon: allow more than one host address given via --listen
- daemon: add helper function named_sock_setup
Should be Ok for 'next'.
* jc/grep-header-all-match-fix-debug (2010-09-13) 1 commit
- grep debugging, just in case
Not necessary; will drop shortly.
* dm/mergetool-vimdiff (2010-09-27) 3 commits
(merged to 'next' on 2010-09-29 at c8e22ea)
+ mergetool-lib: make the three-way diff the default for vim/gvim
(merged to 'next' on 2010-09-22 at 12f7559)
+ mergetool-lib: add a three-way diff view for vim/gvim
+ mergetool-lib: combine vimdiff and gvimdiff run blocks
* en/rename-d-f (2010-09-08) 2 commits
- merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
- t3509: Add rename + D/F conflict testcase that recursive strategy fails
I am not entirely convinced this is a regression free band-aid; need to
look at this a few more times.
* kf/post-receive-sample-hook (2010-09-10) 1 commit
(merged to 'next' on 2010-09-22 at db674a3)
+ post-receive-email: ensure sent messages are not empty
I notice that it uses "PAGER= generate_email" where generate_email is a
shell function, which may break in some implementations of POSIX /bin/sh.
This is not a regression (the original also had the same issue), but
somebody who cares enough might want to look into it.
* ml/completion-zsh (2010-09-06) 1 commit
(merged to 'next' on 2010-09-22 at d62d10e)
+ completion: make compatible with zsh
Comments from bash users regarding regressions?
* po/sendemail (2010-09-06) 3 commits
(merged to 'next' on 2010-09-22 at 1105f62)
+ New send-email option smtpserveroption.
+ Remove @smtp_host_parts variable as not used.
+ Minor indentation fix.
Comments from potential users?
* jl/fetch-submodule-recursive (2010-09-19) 4 commits
- fetch: Get submodule paths from index and not from .gitmodules
- fetch: Fix a bug swallowing the output of recursive submodule fetching
- Submodules: Add the new "fetch" config option for fetch and pull
- fetch/pull: Recursively fetch populated submodules
Further work expected after 1.7.3 between Jens and Kevin.
* jf/merge-ignore-ws (2010-08-26) 4 commits
(merged to 'next' on 2010-09-22 at 5161fb8)
+ merge-recursive: options to ignore whitespace changes
+ merge-recursive --patience
+ ll-merge: replace flag argument with options struct
+ merge-recursive: expose merge options for builtin merge
(this branch is used by kb/merge-recursive-rename-threshold.)
Possibly one of the star features of the release after 1.7.3, whether it
is called 1.7.4 or 1.8.0.
* tr/merge-unborn-clobber (2010-08-22) 1 commit
- Exhibit merge bug that clobbers index&WT
* en/tree-walk-optim (2010-08-26) 4 commits
(merged to 'next' on 2010-09-22 at 0601f1b)
+ diff_tree(): Skip skip_uninteresting() when all remaining paths interesting
+ tree_entry_interesting(): Make return value more specific
+ tree-walk: Correct bitrotted comment about tree_entry()
+ Document pre-condition for tree_entry_interesting
Need to look at this a few more times to convince myself that this is Ok.
* ab/i18n (2010-09-12) 159 commits
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
^ permalink raw reply [relevance 1%]
* [PATCHv5 00/16] Add missing &&'s in the testsuite
@ 2010-10-03 5:10 4% Elijah Newren
2010-10-03 5:10 21% ` [PATCHv5 12/16] t7001 (mv): add missing && Elijah Newren
0 siblings, 1 reply; 200+ results
From: Elijah Newren @ 2010-10-03 5:10 UTC (permalink / raw)
To: git; +Cc: gitster, avarab, jrnieder, Elijah Newren
This patch series fixes many of the missing &&s in the testsuite.
Thanks to Junio, Jonathan, and Ævar for lots of time reviewing and
making suggestions so far. And for being patient with my lack of
knowledge on some of this stuff.
Changes since v4:
* Included Ævar's patch to make test_expect_code a test command
(which appears to not be in pu yet); this allowed cleaning up my
t4017 patch nicely. Cleaned up t4017.
* Lots of fixes suggested by Junio, Jonathan, and Ævar
* Changed the last patch to introduce a new portable_unset() helper
function and use it to enable proper && chaining in combination
with unsetting variables.
* Reverted t3600 to originally submitted patch, due to issues
Jonathan pointed out in the version in v3/v4.
* Added some acks from Jonathan that I assume were implied by his
reviews. Hope I didn't add ones I shouldn't or miss ones I should
have added.
Elijah Newren (15):
t3020 (ls-files-error-unmatch): remove stray '1' from end of file
t4017 (diff-retval): replace manual exit code check with
test_expect_code
t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
t4002 (diff-basic): use test_might_fail for commands that might fail
t4202 (log): Replace '<git-command> || :' with test_might_fail
t3600 (rm): add lots of missing &&
t4019 (diff-wserror): add lots of missing &&
t4026 (color): remove unneeded and unchained command
t5602 (clone-remote-exec): add missing &&
t6016 (rev-list-graph-simplify-history): add missing &&
t7001 (mv): add missing &&
t7601 (merge-pull-config): add missing &&
t7800 (difftool): add missing &&
Add missing &&'s throughout the testsuite
Introduce portable_unset and use it to ensure proper && chaining
Ævar Arnfjörð Bjarmason (1):
test-lib: make test_expect_code a test command
t/README | 16 +++---
t/t0000-basic.sh | 55 +++++++++++++++++----
t/t0001-init.sh | 30 ++++++------
t/t0003-attributes.sh | 45 ++++++++---------
t/t0020-crlf.sh | 2 +-
t/t0024-crlf-archive.sh | 4 +-
t/t0026-eol-config.sh | 2 +-
t/t0050-filesystem.sh | 6 +-
t/t1000-read-tree-m-3way.sh | 2 +-
t/t1001-read-tree-m-2way.sh | 18 +++---
t/t1002-read-tree-m-u-2way.sh | 10 ++--
t/t1302-repo-version.sh | 2 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1402-check-ref-format.sh | 4 +-
t/t1410-reflog.sh | 8 ++--
t/t1501-worktree.sh | 2 +-
t/t1504-ceiling-dirs.sh | 5 +-
t/t1509-root-worktree.sh | 6 +-
t/t2007-checkout-symlink.sh | 2 +-
t/t2016-checkout-patch.sh | 2 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2103-update-index-ignore-missing.sh | 2 +-
t/t2200-add-update.sh | 2 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 1 -
t/t3050-subprojects-fetch.sh | 4 +-
t/t3203-branch-output.sh | 6 +-
t/t3307-notes-man.sh | 2 +-
t/t3406-rebase-message.sh | 6 +-
t/t3408-rebase-multi-line.sh | 2 +-
t/t3504-cherry-pick-rerere.sh | 4 +-
t/t3600-rm.sh | 38 ++++++--------
t/t3903-stash.sh | 4 +-
t/t3904-stash-patch.sh | 2 +-
t/t4002-diff-basic.sh | 12 ++--
t/t4017-diff-retval.sh | 71 ++++++++-------------------
t/t4019-diff-wserror.sh | 52 ++++++++++----------
t/t4021-format-patch-numbered.sh | 2 +-
t/t4026-color.sh | 1 -
t/t4027-diff-submodule.sh | 2 +-
t/t4103-apply-binary.sh | 8 ++--
t/t4104-apply-boundary.sh | 4 +-
t/t4111-apply-subdir.sh | 4 +-
t/t4119-apply-config.sh | 2 +-
t/t4124-apply-ws-rule.sh | 4 +-
t/t4127-apply-same-fn.sh | 18 +++---
t/t4130-apply-criss-cross-rename.sh | 2 +-
t/t4133-apply-filenames.sh | 6 +-
t/t4150-am.sh | 2 +-
t/t4202-log.sh | 2 +-
t/t5300-pack-object.sh | 4 +-
t/t5301-sliding-window.sh | 2 +-
t/t5302-pack-index.sh | 2 +-
t/t5500-fetch-pack.sh | 2 +-
t/t5502-quickfetch.sh | 2 +-
t/t5503-tagfollow.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5516-fetch-push.sh | 20 ++++----
t/t5517-push-mirror.sh | 10 ++--
t/t5519-push-alternates.sh | 2 +-
t/t5531-deep-submodule-push.sh | 2 +-
t/t5541-http-push.sh | 2 +-
t/t5550-http-fetch.sh | 6 +-
t/t5601-clone.sh | 6 +-
t/t5602-clone-remote-exec.sh | 22 ++++++---
t/t5701-clone-local.sh | 8 ++--
t/t5705-clone-2gb.sh | 2 +-
t/t6009-rev-list-parent.sh | 2 +-
t/t6010-merge-base.sh | 2 +-
t/t6016-rev-list-graph-simplify-history.sh | 29 ++++-------
t/t6020-merge-df.sh | 4 +-
t/t6022-merge-rename.sh | 2 +-
t/t6024-recursive-merge.sh | 2 +-
t/t6030-bisect-porcelain.sh | 8 ++--
t/t6040-tracking-info.sh | 2 +-
t/t7001-mv.sh | 2 +-
t/t7004-tag.sh | 14 +++---
t/t7006-pager.sh | 10 ++--
t/t7105-reset-patch.sh | 6 +-
t/t7300-clean.sh | 6 +-
t/t7501-commit.sh | 2 +-
t/t7502-commit.sh | 6 +-
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 12 ++--
t/t7610-mergetool.sh | 2 +-
t/t7700-repack.sh | 2 +-
t/t7800-difftool.sh | 12 ++--
t/t8003-blame.sh | 6 +-
t/t9122-git-svn-author.sh | 4 +-
t/t9123-git-svn-rebuild-with-rewriteroot.sh | 2 +-
t/t9134-git-svn-ignore-paths.sh | 6 +-
t/t9137-git-svn-dcommit-clobber-series.sh | 2 +-
t/t9138-git-svn-authors-prog.sh | 6 +-
t/t9146-git-svn-empty-dirs.sh | 6 +-
t/t9151-svn-mergeinfo.sh | 22 ++++----
t/t9200-git-cvsexportcommit.sh | 4 +-
t/t9401-git-cvsserver-crlf.sh | 2 +-
t/t9600-cvsimport.sh | 2 +-
t/test-lib.sh | 44 ++++++++++-------
100 files changed, 418 insertions(+), 409 deletions(-)
--
1.7.3.1.66.gab790
^ permalink raw reply [relevance 4%]
* [PATCHv5 12/16] t7001 (mv): add missing &&
2010-10-03 5:10 4% [PATCHv5 00/16] Add missing &&'s in the testsuite Elijah Newren
@ 2010-10-03 5:10 21% ` Elijah Newren
0 siblings, 0 replies; 200+ results
From: Elijah Newren @ 2010-10-03 5:10 UTC (permalink / raw)
To: git; +Cc: gitster, avarab, jrnieder, Elijah Newren
Also, prefix an expected-to-fail git mv command with 'test_must_fail'.
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
---
t/t7001-mv.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 65a35d9..624e6d2 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -61,7 +61,7 @@ test_expect_success \
test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
- git mv -f untracked1 path0
+ test_must_fail git mv -f untracked1 path0 &&
test ! -f .git/index.lock &&
test -f untracked1 &&
test -f path0/untracked1'
--
1.7.3.1.66.gab790
^ permalink raw reply related [relevance 21%]
* [PATCHv6 00/16] Add missing &&'s in the testsuite
@ 2010-10-03 19:59 4% Elijah Newren
2010-10-03 20:00 21% ` [PATCHv6 12/16] t7001 (mv): add missing && Elijah Newren
0 siblings, 2 replies; 200+ results
From: Elijah Newren @ 2010-10-03 19:59 UTC (permalink / raw)
To: git; +Cc: gitster, avarab, jrnieder, Elijah Newren
This patch series fixes many of the missing &&s in the testsuite.
Thanks to Junio, Jonathan, and Ævar for lots of time reviewing and
making suggestions so far.
Changes since v5:
* Made changes suggested by Jonathan on v4. Notable items remaining:
* In patch 1, I made two of the changes suggested by Jonathan, but
this was Ævar's patch so he may want to comment on those. Also,
Jonathan had a few extra questions in the last round that
perhaps Ævar may want to comment on.
* In patch 7 (t3600), there's still an outstanding question about
what and how to change it.
* In patch 15, (the t1509 test), Jonathan pointed out a potential
problem, and I'm unsure whether the change I made is what is
wanted.
Elijah Newren (15):
t3020 (ls-files-error-unmatch): remove stray '1' from end of file
t4017 (diff-retval): replace manual exit code check with
test_expect_code
t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
t4002 (diff-basic): use test_might_fail for commands that might fail
t4202 (log): Replace '<git-command> || :' with test_might_fail
t3600 (rm): add lots of missing &&
t4019 (diff-wserror): add lots of missing &&
t4026 (color): remove unneeded and unchained command
t5602 (clone-remote-exec): add missing &&
t6016 (rev-list-graph-simplify-history): add missing &&
t7001 (mv): add missing &&
t7601 (merge-pull-config): add missing &&
t7800 (difftool): add missing &&
Add missing &&'s throughout the testsuite
Introduce portable_unset and use it to ensure proper && chaining
Ævar Arnfjörð Bjarmason (1):
test-lib: make test_expect_code a test command
t/README | 29 +++++------
t/t0000-basic.sh | 55 +++++++++++++++++----
t/t0001-init.sh | 30 ++++++------
t/t0003-attributes.sh | 45 ++++++++---------
t/t0020-crlf.sh | 2 +-
t/t0024-crlf-archive.sh | 4 +-
t/t0026-eol-config.sh | 2 +-
t/t0050-filesystem.sh | 6 +-
t/t1000-read-tree-m-3way.sh | 2 +-
t/t1001-read-tree-m-2way.sh | 18 ++++----
t/t1002-read-tree-m-u-2way.sh | 10 ++--
t/t1302-repo-version.sh | 2 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1402-check-ref-format.sh | 4 +-
t/t1410-reflog.sh | 8 ++--
t/t1501-worktree.sh | 2 +-
t/t1504-ceiling-dirs.sh | 5 +-
t/t1509-root-worktree.sh | 5 +-
t/t2007-checkout-symlink.sh | 2 +-
t/t2016-checkout-patch.sh | 2 +-
t/t2050-git-dir-relative.sh | 4 +-
t/t2103-update-index-ignore-missing.sh | 2 +-
t/t2200-add-update.sh | 2 +-
t/t3001-ls-files-others-exclude.sh | 2 +-
t/t3020-ls-files-error-unmatch.sh | 1 -
t/t3050-subprojects-fetch.sh | 4 +-
t/t3203-branch-output.sh | 6 +-
t/t3307-notes-man.sh | 2 +-
t/t3406-rebase-message.sh | 6 +-
t/t3408-rebase-multi-line.sh | 2 +-
t/t3504-cherry-pick-rerere.sh | 4 +-
t/t3600-rm.sh | 38 +++++++--------
t/t3903-stash.sh | 4 +-
t/t3904-stash-patch.sh | 2 +-
t/t4002-diff-basic.sh | 12 ++--
t/t4017-diff-retval.sh | 69 ++++++++-------------------
t/t4019-diff-wserror.sh | 53 ++++++++++----------
t/t4021-format-patch-numbered.sh | 2 +-
t/t4026-color.sh | 1 -
t/t4027-diff-submodule.sh | 2 +-
t/t4103-apply-binary.sh | 8 ++--
t/t4104-apply-boundary.sh | 4 +-
t/t4111-apply-subdir.sh | 4 +-
t/t4119-apply-config.sh | 2 +-
t/t4124-apply-ws-rule.sh | 4 +-
t/t4127-apply-same-fn.sh | 18 ++++----
t/t4130-apply-criss-cross-rename.sh | 2 +-
t/t4133-apply-filenames.sh | 6 +-
t/t4150-am.sh | 2 +-
t/t4202-log.sh | 2 +-
t/t5300-pack-object.sh | 4 +-
t/t5301-sliding-window.sh | 2 +-
t/t5302-pack-index.sh | 2 +-
t/t5500-fetch-pack.sh | 2 +-
t/t5502-quickfetch.sh | 2 +-
t/t5503-tagfollow.sh | 4 +-
t/t5510-fetch.sh | 2 +-
t/t5516-fetch-push.sh | 20 ++++----
t/t5517-push-mirror.sh | 10 ++--
t/t5519-push-alternates.sh | 2 +-
t/t5531-deep-submodule-push.sh | 2 +-
t/t5541-http-push.sh | 2 +-
t/t5550-http-fetch.sh | 6 +--
t/t5601-clone.sh | 6 +-
t/t5602-clone-remote-exec.sh | 22 ++++++---
t/t5701-clone-local.sh | 8 ++--
t/t5705-clone-2gb.sh | 2 +-
t/t6009-rev-list-parent.sh | 2 +-
t/t6010-merge-base.sh | 2 +-
t/t6016-rev-list-graph-simplify-history.sh | 29 ++++-------
t/t6020-merge-df.sh | 4 +-
t/t6022-merge-rename.sh | 2 +-
t/t6024-recursive-merge.sh | 2 +-
t/t6030-bisect-porcelain.sh | 8 ++--
t/t6040-tracking-info.sh | 2 +-
t/t7001-mv.sh | 2 +-
t/t7004-tag.sh | 14 +++---
t/t7006-pager.sh | 10 ++--
t/t7105-reset-patch.sh | 6 +-
t/t7300-clean.sh | 8 ++--
t/t7501-commit.sh | 2 +-
t/t7502-commit.sh | 6 +-
t/t7506-status-submodule.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 12 ++--
t/t7610-mergetool.sh | 2 +-
t/t7700-repack.sh | 2 +-
t/t7800-difftool.sh | 12 ++--
t/t8003-blame.sh | 6 +-
t/t9122-git-svn-author.sh | 4 +-
t/t9123-git-svn-rebuild-with-rewriteroot.sh | 2 +-
t/t9134-git-svn-ignore-paths.sh | 6 +-
t/t9137-git-svn-dcommit-clobber-series.sh | 2 +-
t/t9138-git-svn-authors-prog.sh | 6 +-
t/t9146-git-svn-empty-dirs.sh | 6 +-
t/t9151-svn-mergeinfo.sh | 22 ++++----
t/t9200-git-cvsexportcommit.sh | 4 +-
t/t9401-git-cvsserver-crlf.sh | 2 +-
t/t9600-cvsimport.sh | 2 +-
t/test-lib.sh | 51 +++++++++++++-------
100 files changed, 429 insertions(+), 418 deletions(-)
--
1.7.3.1.66.gab790
^ permalink raw reply [relevance 4%]
* [PATCHv6 12/16] t7001 (mv): add missing &&
2010-10-03 19:59 4% [PATCHv6 00/16] Add missing &&'s in the testsuite Elijah Newren
@ 2010-10-03 20:00 21% ` Elijah Newren
1 sibling, 0 replies; 200+ results
From: Elijah Newren @ 2010-10-03 20:00 UTC (permalink / raw)
To: git; +Cc: gitster, avarab, jrnieder, Elijah Newren
Also, prefix an expected-to-fail git mv command with 'test_must_fail'.
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
---
t/t7001-mv.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 65a35d9..624e6d2 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -61,7 +61,7 @@ test_expect_success \
test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
- git mv -f untracked1 path0
+ test_must_fail git mv -f untracked1 path0 &&
test ! -f .git/index.lock &&
test -f untracked1 &&
test -f path0/untracked1'
--
1.7.3.1.66.gab790
^ permalink raw reply related [relevance 21%]
* What's cooking in git.git (Oct 2010, #01; Wed, 13)
@ 2010-10-14 4:46 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2010-10-14 4:46 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.
--------------------------------------------------
[Graduated to "master"]
* ab/makefile-track-cc (2010-09-12) 1 commit
(merged to 'next' on 2010-09-27 at 51daee0)
+ Makefile: add CC to TRACK_CFLAGS
* bc/fix-cherry-pick-root (2010-09-27) 1 commit
(merged to 'next' on 2010-09-27 at e27f4c9)
+ builtin/revert.c: don't dereference a NULL pointer
* cw/gitweb-hilite-config (2010-09-21) 1 commit
(merged to 'next' on 2010-09-27 at dd234ba)
+ Enable highlight executable path as a configuration option
* jk/repack-reuse-object (2010-09-27) 2 commits
(merged to 'next' on 2010-09-27 at 5719f72)
+ Documentation: pack.compression: explain how to recompress
+ repack: add -F flag to let user choose between --no-reuse-delta/object
* mg/reset-doc (2010-09-15) 6 commits
(merged to 'next' on 2010-09-22 at 2a10b71)
+ git-reset.txt: make modes description more consistent
+ git-reset.txt: point to git-checkout
+ git-reset.txt: use "working tree" consistently
+ git-reset.txt: reset --soft is not a no-op
+ git-reset.txt: reset does not change files in target
+ git-reset.txt: clarify branch vs. branch head
* uk/fix-author-ident-sed-script (2010-09-23) 1 commit
(merged to 'next' on 2010-09-27 at 5ad7d90)
+ get_author_ident_from_commit(): remove useless quoting
--------------------------------------------------
[New Topics]
* ab/send-email-perl (2010-09-30) 16 commits
(merged to 'next' on 2010-09-30 at cf8e58e)
+ send-email: extract_valid_address use qr// regexes
+ send-email: is_rfc2047_quoted use qr// regexes
+ send-email: use Perl idioms in while loop
+ send-email: make_message_id use "require" instead of "use"
+ send-email: send_message die on $!, not $?
+ send-email: use (?:) instead of () if no match variables are needed
+ send-email: sanitize_address use qq["foo"], not "\"foo\""
+ send-email: sanitize_address use $foo, not "$foo"
+ send-email: use \E***\Q instead of \*\*\*
+ send-email: cleanup_compose_files doesn't need a prototype
+ send-email: unique_email_list doesn't need a prototype
+ send-email: file_declares_8bit_cte doesn't need a prototype
+ send-email: get_patch_subject doesn't need a prototype
+ send-email: use lexical filehandles during sending
+ send-email: use lexical filehandles for $compose
+ send-email: use lexical filehandle for opendir
* cb/diff-fname-optim (2010-09-26) 3 commits
- diff: avoid repeated scanning while looking for funcname
- do not search functions for patch ID
- add rebase patch id tests
* en/merge-recursive (2010-09-20) 38 commits
- merge-recursive: Remove redundant path clearing for D/F conflicts
- merge-recursive: Make room for directories in D/F conflicts
- handle_delete_modify(): Check whether D/F conflicts are still present
- merge_content(): Check whether D/F conflicts are still present
- conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
- conflict_rename_delete(): Check whether D/F conflicts are still present
- merge-recursive: Delay modify/delete conflicts if D/F conflict present
- merge-recursive: Delay content merging for renames
- merge-recursive: Delay handling of rename/delete conflicts
- merge-recursive: Move handling of double rename of one file to other file
- merge-recursive: Move handling of double rename of one file to two
- merge-recursive: Avoid doubly merging rename/add conflict contents
- merge-recursive: Update merge_content() call signature
- merge-recursive: Update conflict_rename_rename_1to2() call signature
- merge-recursive: Structure process_df_entry() to handle more cases
- merge-recursive: Have process_entry() skip D/F or rename entries
- merge-recursive: New function to assist resolving renames in-core only
- merge-recursive: New data structures for deferring of D/F conflicts
- merge-recursive: Move process_entry's content merging into a function
- merge-recursive: Move delete/modify handling into dedicated function
- merge-recursive: Move rename/delete handling into dedicated function
- merge-recursive: Nuke rename/directory conflict detection
- merge-recursive: Rename conflict_rename_rename*() for clarity
- merge-recursive: Small code clarification -- variable name and comments
- t6036: Add testcase for undetected conflict
- t6036: Add a second testcase similar to the first but with content changes
- t6036: Test index and worktree state, not just that merge fails
- t6020: Add a testcase for modify/delete + directory/file conflict
- t6020: Modernize style a bit
- t6022: Add tests for rename/rename combined with D/F conflicts
- t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)
- t6022: Add tests with both rename source & dest involved in D/F conflicts
- t6022: Add tests for reversing order of merges when D/F conflicts present
- t6022: Add test combinations of {content conflict?, D/F conflict remains?}
- t6032: Add a test checking for excessive output from merge
- merge-recursive: Restructure showing how to chain more process_* functions
- t3030: Add a testcase for resolvable rename/add conflict with symlinks
- Merge branch 'en/rename-d-f' into en/merge-recursive
(this branch uses en/rename-d-f.)
* il/remote-fd-ext (2010-10-12) 3 commits
- git-remote-ext
- git-remote-fd
- Add bidirectional_transfer_loop()
* jn/gitweb-test (2010-09-26) 4 commits
- gitweb/Makefile: Include gitweb/config.mak
- gitweb/Makefile: Add 'test' and 'test-installed' targets
- t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
- gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
* ak/apply-non-git-epoch (2010-09-29) 1 commit
- apply: Recognize epoch timestamps with : in the timezone
* ak/submodule-sync (2010-10-08) 1 commit
- submodule sync: Update "submodule.<name>.url" for empty directories
* cb/leading-path-removal (2010-10-09) 5 commits
- do not overwrite files in leading path
- lstat_cache: optionally return match_len
- add function check_ok_to_remove()
- t7607: add leading-path tests
- t7607: use test-lib functions and check MERGE_HEAD
* jh/notes-merge (2010-10-09) 21 commits
- Provide 'git notes get-ref' to easily retrieve current notes ref
- git notes merge: Add testcases for merging notes trees at different fanouts
- git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
- git notes merge: --commit should fail if underlying notes ref has moved
- git notes merge: List conflicting notes in notes merge commit message
- git notes merge: Manual conflict resolution, part 2/2
- git notes merge: Manual conflict resolution, part 1/2
- Documentation: Preliminary docs on 'git notes merge'
- git notes merge: Add automatic conflict resolvers (ours, theirs, union)
- git notes merge: Handle real, non-conflicting notes merges
- builtin/notes.c: Refactor creation of notes commits.
- git notes merge: Initial implementation handling trivial merges only
- builtin/notes.c: Split notes ref DWIMmery into a separate function
- notes.c: Use two newlines (instead of one) when concatenating notes
- (trivial) t3303: Indent with tabs instead of spaces for consistency
- notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
- notes.h/c: Clarify the handling of notes objects that are == null_sha1
- notes.c: Reorder functions in preparation for next commit
- notes.h: Make default_notes_ref() available in notes API
- (trivial) notes.h: Minor documentation fixes to copy_notes()
- notes.c: Hexify SHA1 in die() message from init_notes()
Breaks build with arithmetic on (void *).
* jk/maint-rev-list-nul (2010-10-07) 1 commit
- rev-list: handle %x00 NUL in user format
* jk/push-progress (2010-10-14) 2 commits
- push: pass --progress down to git-pack-objects
- t5523-push-upstream: test progress messages
* jm/mailmap (2010-10-11) 1 commit
- mailmap: fix use of freed memory
The new test seems to make t4203 break intermittently.
* jn/send-pack-error (2010-10-12) 1 commit
- send-pack: avoid redundant "pack-objects died with strange error"
* kb/completion-checkout (2010-10-12) 1 commit
- completion: Support the DWIM mode for git checkout
* pn/commit-autosquash (2010-10-07) 8 commits
- add tests of commit --squash
- commit: --squash option for use with rebase --autosquash
- add tests of commit --fixup
- commit: --fixup option for use with rebase --autosquash
- pretty.c: teach format_commit_message() to reencode the output
- pretty.c: helper methods for getting output encodings
- commit.c: new function for looking up a comit by name
- commit.c: prefer get_header() to manual searching
* sg/bisect (2010-10-10) 3 commits
- bisect: check for mandatory argument of 'bisect replay'
- bisect: improve error msg of 'bisect reset' when original HEAD is deleted
- bisect: improve error message of 'bisect log' while not bisecting
* sg/completion (2010-10-11) 4 commits
- bash: support pretty format aliases
- bash: support more 'git notes' subcommands and their options
- bash: not all 'git bisect' subcommands make sense when not bisecting
- bash: offer refs for 'git bisect start'
* sn/doc-opt-notation (2010-10-08) 6 commits
(merged to 'next' on 2010-10-13 at 53ea256)
+ Fix {update,checkout}-index usage strings
+ Put a space between `<' and argument in pack-objects usage string
+ Remove stray quotes in --pretty and --format documentation
+ Use parentheses and `...' where appropriate
+ Fix odd markup in --diff-filter documentation
+ Use angles for placeholders consistently
* yd/dir-rename (2010-10-10) 5 commits
- diff --check: correct line numbers of new blank lines at EOF
- Transfer special display of toplevel dir to display-time.
- Only show bulkmoves in output.
- Add testcases for the --detect-bulk-moves diffcore flag.
- Introduce bulk-move detection in diffcore.
This seems to break the build with decl-after-stmt.
--------------------------------------------------
[Stalled]
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* by/line-log (2010-09-11) 18 commits
. log -L: do not free parents lists we might need again
. Document line history browser
. Add tests for line history browser
. Add --full-line-diff option
. Add --graph prefix before line history output
. Add parent rewriting to line history browser
. Make graph_next_line external to other part of git
. Make rewrite_parents public to other part of git
. Hook line history into cmd_log, ensuring a topo-ordered walk
. Print the line log
. map/take range to the parent of commits
. Add range clone functions
. Export three functions from diff.c
. Parse the -L options
. Refactor parse_loc
. Add the basic data structure for line level history
. parse-options: add two helper functions
. parse-options: enhance STOP_AT_NON_OPTION
Temporarily ejected to give room to nd/struct-pathspec topic as this
conflicts with it.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
--------------------------------------------------
[Cooking]
* jj/icase-directory (2010-10-03) 8 commits
- Support case folding in git fast-import when core.ignorecase=true
- Support case folding for git add when core.ignorecase=true
- Add case insensitivity support when using git ls-files
- Add case insensitivity support for directories when using git status
- Case insensitivity support for .gitignore via core.ignorecase
- Add string comparison functions that respect the ignore_case variable.
- Makefile & configure: add a NO_FNMATCH_CASEFOLD flag
- Makefile & configure: add a NO_FNMATCH flag
* ab/require-perl-5.8 (2010-09-24) 2 commits
(merged to 'next' on 2010-09-27 at 1fcdd3c)
+ perl: use "use warnings" instead of -w
+ perl: bump the required Perl version to 5.8 from 5.6.[21]
* en/and-cascade-tests (2010-10-03) 13 commits
- Introduce sane_unset and use it to ensure proper && chaining
- t7800 (difftool): add missing &&
- t7601 (merge-pull-config): add missing &&
- t7001 (mv): add missing &&
- t6016 (rev-list-graph-simplify-history): add missing &&
- t5602 (clone-remote-exec): add missing &&
- t4026 (color): remove unneeded and unchained command
- t4019 (diff-wserror): add lots of missing &&
- t4202 (log): Replace '<git-command> || :' with test_might_fail
- t4002 (diff-basic): use test_might_fail for commands that might fail
- t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
- t4017 (diff-retval): replace manual exit code check with test_expect_code
- test-lib: make test_expect_code a test command
Somewhat rerolled, but the largest one among the series was Nacked by a
few people and needs to be rerolled again.
* jk/no-textconv-symlink (2010-09-21) 1 commit
- diff: don't use pathname-based diff drivers for symlinks
(this branch is used by ks/no-textconv-symlink.)
* ks/no-textconv-symlink (2010-09-29) 3 commits
- blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
- blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
- blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
(this branch uses jk/no-textconv-symlink.)
* jp/send-email-to-cmd (2010-09-24) 1 commit
(merged to 'next' on 2010-09-30 at 4284ddb)
+ git-send-email.perl: Add --to-cmd
* kb/merge-recursive-rename-threshold (2010-09-27) 2 commits
(merged to 'next' on 2010-09-30 at 4f33817)
+ diff: add synonyms for -M, -C, -B
+ merge-recursive: option to specify rename threshold
(this branch uses jf/merge-ignore-ws.)
* mg/fix-build-remote-helpers (2010-09-17) 1 commit
(merged to 'next' on 2010-09-30 at 0583d5f)
+ remote-helpers: build in platform independent directory
* nd/struct-pathspec (2010-09-20) 5 commits
- ce_path_match: drop prefix matching in favor of match_pathspec
- Convert ce_path_match() to use struct pathspec
- tree_entry_interesting: turn to match_pathspec if wildcard is present
- pathspec: add tree_recursive_diff parameter
- pathspec: mark wildcard pathspecs from the beginning
(this branch uses en/object-list-with-pathspec.)
* en/object-list-with-pathspec (2010-09-20) 8 commits
- Add testcases showing how pathspecs are handled with rev-list --objects
- Make rev-list --objects work together with pathspecs
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initializing pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is used by nd/struct-pathspec.)
* sb/send-email-use-to-from-input (2010-10-04) 2 commits
(merged to 'next' on 2010-10-06 at 5e9cb61)
+ send-email: Don't leak To: headers between patches
(merged to 'next' on 2010-09-30 at 513b6f1)
+ send-email: Use To: headers in patch files
* tc/smart-http-post-redirect (2010-09-25) 1 commit
- smart-http: Don't change POST to GET when following redirect
* as/daemon-multi-listen (2010-08-30) 2 commits
(merged to 'next' on 2010-09-30 at 8083bf4)
+ daemon: allow more than one host address given via --listen
+ daemon: add helper function named_sock_setup
* dm/mergetool-vimdiff (2010-09-27) 3 commits
(merged to 'next' on 2010-09-29 at c8e22ea)
+ mergetool-lib: make the three-way diff the default for vim/gvim
(merged to 'next' on 2010-09-22 at 12f7559)
+ mergetool-lib: add a three-way diff view for vim/gvim
+ mergetool-lib: combine vimdiff and gvimdiff run blocks
* en/rename-d-f (2010-09-08) 2 commits
- merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
- t3509: Add rename + D/F conflict testcase that recursive strategy fails
(this branch is used by en/merge-recursive.)
* kf/post-receive-sample-hook (2010-09-10) 1 commit
(merged to 'next' on 2010-09-22 at db674a3)
+ post-receive-email: ensure sent messages are not empty
I notice that it uses "PAGER= generate_email" where generate_email is a
shell function, which may break in some implementations of POSIX /bin/sh.
This is not a regression (the original also had the same issue), but
somebody who cares enough might want to look into it.
* ml/completion-zsh (2010-09-06) 1 commit
(merged to 'next' on 2010-09-22 at d62d10e)
+ completion: make compatible with zsh
Reported as breaking people with "set -u".
* po/sendemail (2010-09-06) 3 commits
(merged to 'next' on 2010-09-22 at 1105f62)
+ New send-email option smtpserveroption.
+ Remove @smtp_host_parts variable as not used.
+ Minor indentation fix.
Will merge to 'master' shortly.
* jl/fetch-submodule-recursive (2010-09-19) 4 commits
- fetch: Get submodule paths from index and not from .gitmodules
- fetch: Fix a bug swallowing the output of recursive submodule fetching
- Submodules: Add the new "fetch" config option for fetch and pull
- fetch/pull: Recursively fetch populated submodules
I haven't picked up the rerolled one yet.
* jf/merge-ignore-ws (2010-08-26) 4 commits
(merged to 'next' on 2010-09-22 at 5161fb8)
+ merge-recursive: options to ignore whitespace changes
+ merge-recursive --patience
+ ll-merge: replace flag argument with options struct
+ merge-recursive: expose merge options for builtin merge
(this branch is used by kb/merge-recursive-rename-threshold.)
Possibly one of the star features of the coming release.
* tr/merge-unborn-clobber (2010-08-22) 1 commit
- Exhibit merge bug that clobbers index&WT
* en/tree-walk-optim (2010-08-26) 4 commits
(merged to 'next' on 2010-09-22 at 0601f1b)
+ diff_tree(): Skip skip_uninteresting() when all remaining paths interesting
+ tree_entry_interesting(): Make return value more specific
+ tree-walk: Correct bitrotted comment about tree_entry()
+ Document pre-condition for tree_entry_interesting
Will merge to 'master' shortly.
* ab/i18n (2010-09-12) 159 commits
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
^ permalink raw reply [relevance 1%]
* What's cooking in git.git (Oct 2010, #02; Tue, 26)
@ 2010-10-27 6:13 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2010-10-27 6:13 UTC (permalink / raw)
To: git
What's cooking in git.git (Oct 2010, #02; Tue, 26)
--------------------------------------------------
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.
Many topics have been cooking for a while in 'next', some of them for too
long. Tonight's pushout is fairly large, and the result makes the set of
remaining topics on 'next' very thin. A few people sent series based on
'next'; that was not a pleasant experience for me to try separating them
out, but I am in no position to complain---all of the topics that have
been cooking for a very long time are long overdue.
--------------------------------------------------
[New Topics]
* ao/send-email-irt (2010-10-19) 7 commits
- t9001: send-email interation with --in-reply-to and --chain-reply-to
- t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To'
- Clarify and extend the "git diff" format documentation
- git-show-ref.txt: clarify the pattern matching
- documentation: git-config minor cleanups
- Update test script annotate-tests.sh to handle missing/extra authors
- {cvs,svn}import: use the new 'git read-tree --empty'
* aw/git-p4-deletion (2010-10-22) 1 commit
(merged to 'next' on 2010-10-26 at 5847c40)
+ Fix handling of git-p4 on deleted files
* bg/maint-gitweb-test-lib (2010-10-20) 1 commit
- t/gitweb-lib: Don't pass constant to decode_utf8
* cm/diff-check-at-eol (2010-10-10) 1 commit
- diff --check: correct line numbers of new blank lines at EOF
* fc/apply-p2-get-header-name (2010-10-21) 3 commits
- test: git-apply -p2 rename/chmod only
- fixup! Fix git-apply with
- Fix git-apply with -p greater than 1
* jk/add-e-doc (2010-10-21) 1 commit
- docs: give more hints about how "add -e" works
* jk/diff-CBM (2010-10-21) 1 commit
- diff: report bogus input to -C/-M/-B
* jk/missing-config (2010-10-21) 1 commit
- config: treat non-existent config files as empty
* jn/fast-import-fix (2010-10-20) 4 commits
- fast-import: do not clear notes in do_change_note_fanout()
- t9300 (fast-import): another test for the "replace root" feature
- fast-import: tighten M 040000 syntax
- fast-import: filemodify after M 040000 <tree> "" crashes
* jn/git-cmd-h-bypass-setup (2010-10-22) 7 commits
- update-index -h: show usage even with corrupt index
- merge -h: show usage even with corrupt index
- ls-files -h: show usage even with corrupt index
- gc -h: show usage even with broken configuration
- commit/status -h: show usage even with broken configuration
- checkout-index -h: show usage even in an invalid repository
- branch -h: show usage even in an invalid repository
(this branch uses en/and-cascade-tests.)
* kb/blame-author-email (2010-10-15) 1 commit
- blame: Add option to show author email instead of name
* kb/maint-diff-ws-check (2010-10-20) 2 commits
- diff: handle lines containing only whitespace and tabs better
- test-lib: extend test_decode_color to handle more color codes
* mg/make-prove (2010-10-14) 1 commit
- test: allow running the tests under "prove"
* np/diff-in-corrupt-repository (2010-10-22) 1 commit
- diff: don't presume empty file when corresponding object is missing
* np/pack-broken-boundary (2010-10-22) 1 commit
- make pack-objects a bit more resilient to repo corruption
* tr/maint-git-repack-tmpfile (2010-10-19) 1 commit
- repack: place temporary packs under .git/objects/pack/
* tr/maint-merge-file-subdir (2010-10-17) 2 commits
- merge-file: correctly find files when called in subdir
- prefix_filename(): safely handle the case where pfx_len=0
--------------------------------------------------
[Graduated to "master"]
* ab/require-perl-5.8 (2010-09-24) 2 commits
(merged to 'next' on 2010-09-27 at 1fcdd3c)
+ perl: use "use warnings" instead of -w
+ perl: bump the required Perl version to 5.8 from 5.6.[21]
* ab/send-email-perl (2010-09-30) 16 commits
(merged to 'next' on 2010-09-30 at cf8e58e)
+ send-email: extract_valid_address use qr// regexes
+ send-email: is_rfc2047_quoted use qr// regexes
+ send-email: use Perl idioms in while loop
+ send-email: make_message_id use "require" instead of "use"
+ send-email: send_message die on $!, not $?
+ send-email: use (?:) instead of () if no match variables are needed
+ send-email: sanitize_address use qq["foo"], not "\"foo\""
+ send-email: sanitize_address use $foo, not "$foo"
+ send-email: use \E***\Q instead of \*\*\*
+ send-email: cleanup_compose_files doesn't need a prototype
+ send-email: unique_email_list doesn't need a prototype
+ send-email: file_declares_8bit_cte doesn't need a prototype
+ send-email: get_patch_subject doesn't need a prototype
+ send-email: use lexical filehandles during sending
+ send-email: use lexical filehandles for $compose
+ send-email: use lexical filehandle for opendir
* as/daemon-multi-listen (2010-08-30) 2 commits
(merged to 'next' on 2010-09-30 at 8083bf4)
+ daemon: allow more than one host address given via --listen
+ daemon: add helper function named_sock_setup
* dm/mergetool-vimdiff (2010-09-27) 3 commits
(merged to 'next' on 2010-09-29 at c8e22ea)
+ mergetool-lib: make the three-way diff the default for vim/gvim
(merged to 'next' on 2010-09-22 at 12f7559)
+ mergetool-lib: add a three-way diff view for vim/gvim
+ mergetool-lib: combine vimdiff and gvimdiff run blocks
* en/tree-walk-optim (2010-08-26) 4 commits
(merged to 'next' on 2010-09-22 at 0601f1b)
+ diff_tree(): Skip skip_uninteresting() when all remaining paths interesting
+ tree_entry_interesting(): Make return value more specific
+ tree-walk: Correct bitrotted comment about tree_entry()
+ Document pre-condition for tree_entry_interesting
* jf/merge-ignore-ws (2010-08-26) 4 commits
(merged to 'next' on 2010-09-22 at 5161fb8)
+ merge-recursive: options to ignore whitespace changes
+ merge-recursive --patience
+ ll-merge: replace flag argument with options struct
+ merge-recursive: expose merge options for builtin merge
(this branch is used by kb/merge-recursive-rename-threshold.)
Possibly one of the star features of the coming release.
* jp/send-email-to-cmd (2010-09-24) 1 commit
(merged to 'next' on 2010-09-30 at 4284ddb)
+ git-send-email.perl: Add --to-cmd
* kb/merge-recursive-rename-threshold (2010-09-27) 2 commits
(merged to 'next' on 2010-09-30 at 4f33817)
+ diff: add synonyms for -M, -C, -B
+ merge-recursive: option to specify rename threshold
(this branch uses jf/merge-ignore-ws.)
* kf/post-receive-sample-hook (2010-09-10) 1 commit
(merged to 'next' on 2010-09-22 at db674a3)
+ post-receive-email: ensure sent messages are not empty
I notice that it uses "PAGER= generate_email" where generate_email is a
shell function, which may break in some implementations of POSIX /bin/sh.
This is not a regression (the original also had the same issue), but
somebody who cares enough might want to look into it.
* mg/fix-build-remote-helpers (2010-09-17) 1 commit
(merged to 'next' on 2010-09-30 at 0583d5f)
+ remote-helpers: build in platform independent directory
* ml/completion-zsh (2010-09-06) 1 commit
(merged to 'next' on 2010-09-22 at d62d10e)
+ completion: make compatible with zsh
Reported as breaking people with "set -u".
* po/sendemail (2010-09-06) 3 commits
(merged to 'next' on 2010-09-22 at 1105f62)
+ New send-email option smtpserveroption.
+ Remove @smtp_host_parts variable as not used.
+ Minor indentation fix.
* sb/send-email-use-to-from-input (2010-10-04) 2 commits
(merged to 'next' on 2010-10-06 at 5e9cb61)
+ send-email: Don't leak To: headers between patches
(merged to 'next' on 2010-09-30 at 513b6f1)
+ send-email: Use To: headers in patch files
* sn/doc-opt-notation (2010-10-08) 6 commits
(merged to 'next' on 2010-10-13 at 53ea256)
+ Fix {update,checkout}-index usage strings
+ Put a space between `<' and argument in pack-objects usage string
+ Remove stray quotes in --pretty and --format documentation
+ Use parentheses and `...' where appropriate
+ Fix odd markup in --diff-filter documentation
+ Use angles for placeholders consistently
--------------------------------------------------
[Stalled]
* yd/dir-rename (2010-10-15) 5 commits
. Allow hiding renames of individual files involved in a directory rename.
. Consider all parents of a file as candidates for bulk rename.
. Handle the simpler case of a subdir invalidating bulk move.
. Add testcases for the --detect-bulk-moves diffcore flag.
. Introduce bulk-move detection in diffcore.
Need to replace this with a rerolled one posted recently.
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
--------------------------------------------------
[Cooking]
* cb/diff-fname-optim (2010-09-26) 3 commits
- diff: avoid repeated scanning while looking for funcname
- do not search functions for patch ID
- add rebase patch id tests
* en/merge-recursive (2010-10-21) 39 commits
- merge-recursive:make_room_for_directories - work around dumb compilers
- merge-recursive: Remove redundant path clearing for D/F conflicts
- merge-recursive: Make room for directories in D/F conflicts
- handle_delete_modify(): Check whether D/F conflicts are still present
- merge_content(): Check whether D/F conflicts are still present
- conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
- conflict_rename_delete(): Check whether D/F conflicts are still present
- merge-recursive: Delay modify/delete conflicts if D/F conflict present
- merge-recursive: Delay content merging for renames
- merge-recursive: Delay handling of rename/delete conflicts
- merge-recursive: Move handling of double rename of one file to other file
- merge-recursive: Move handling of double rename of one file to two
- merge-recursive: Avoid doubly merging rename/add conflict contents
- merge-recursive: Update merge_content() call signature
- merge-recursive: Update conflict_rename_rename_1to2() call signature
- merge-recursive: Structure process_df_entry() to handle more cases
- merge-recursive: Have process_entry() skip D/F or rename entries
- merge-recursive: New function to assist resolving renames in-core only
- merge-recursive: New data structures for deferring of D/F conflicts
- merge-recursive: Move process_entry's content merging into a function
- merge-recursive: Move delete/modify handling into dedicated function
- merge-recursive: Move rename/delete handling into dedicated function
- merge-recursive: Nuke rename/directory conflict detection
- merge-recursive: Rename conflict_rename_rename*() for clarity
- merge-recursive: Small code clarification -- variable name and comments
- t6036: Add testcase for undetected conflict
- t6036: Add a second testcase similar to the first but with content changes
- t6036: Test index and worktree state, not just that merge fails
- t6020: Add a testcase for modify/delete + directory/file conflict
- t6020: Modernize style a bit
- t6022: Add tests for rename/rename combined with D/F conflicts
- t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)
- t6022: Add tests with both rename source & dest involved in D/F conflicts
- t6022: Add tests for reversing order of merges when D/F conflicts present
- t6022: Add test combinations of {content conflict?, D/F conflict remains?}
- t6032: Add a test checking for excessive output from merge
- merge-recursive: Restructure showing how to chain more process_* functions
- t3030: Add a testcase for resolvable rename/add conflict with symlinks
- Merge branch 'en/rename-d-f' into en/merge-recursive
(this branch uses en/rename-d-f.)
* il/remote-fd-ext (2010-10-12) 3 commits
- git-remote-ext
- git-remote-fd
- Add bidirectional_transfer_loop()
* jn/gitweb-test (2010-09-26) 4 commits
- gitweb/Makefile: Include gitweb/config.mak
- gitweb/Makefile: Add 'test' and 'test-installed' targets
- t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
- gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
* ak/apply-non-git-epoch (2010-09-29) 1 commit
- apply: Recognize epoch timestamps with : in the timezone
* ak/submodule-sync (2010-10-08) 1 commit
- submodule sync: Update "submodule.<name>.url" for empty directories
* cb/leading-path-removal (2010-10-09) 5 commits
- do not overwrite files in leading path
- lstat_cache: optionally return match_len
- add function check_ok_to_remove()
- t7607: add leading-path tests
- t7607: use test-lib functions and check MERGE_HEAD
* jh/notes-merge (2010-10-21) 21 commits
- Provide 'git notes get-ref' to easily retrieve current notes ref
- git notes merge: Add testcases for merging notes trees at different fanouts
- git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
- git notes merge: --commit should fail if underlying notes ref has moved
- git notes merge: List conflicting notes in notes merge commit message
- git notes merge: Manual conflict resolution, part 2/2
- git notes merge: Manual conflict resolution, part 1/2
- Documentation: Preliminary docs on 'git notes merge'
- git notes merge: Add automatic conflict resolvers (ours, theirs, union)
- git notes merge: Handle real, non-conflicting notes merges
- builtin/notes.c: Refactor creation of notes commits.
- git notes merge: Initial implementation handling trivial merges only
- builtin/notes.c: Split notes ref DWIMmery into a separate function
- notes.c: Use two newlines (instead of one) when concatenating notes
- (trivial) t3303: Indent with tabs instead of spaces for consistency
- notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
- notes.h/c: Clarify the handling of notes objects that are == null_sha1
- notes.c: Reorder functions in preparation for next commit
- notes.h: Make default_notes_ref() available in notes API
- (trivial) notes.h: Minor documentation fixes to copy_notes()
- notes.c: Hexify SHA1 in die() message from init_notes()
* jk/maint-rev-list-nul (2010-10-07) 1 commit
- rev-list: handle %x00 NUL in user format
* jk/push-progress (2010-10-17) 8 commits
- push: pass --progress down to git-pack-objects
- t5523-push-upstream: test progress messages
- t5523-push-upstream: add function to ensure fresh upstream repo
- test_terminal: ensure redirections work reliably
- test_terminal: catch use without TTY prerequisite
- test-lib: allow test code to check the list of declared prerequisites
- tests: test terminal output to both stdout and stderr
- tests: factor out terminal handling from t7006
* jm/mailmap (2010-10-19) 3 commits
- t4203: do not let "git shortlog" DWIM based on tty
- t4203 (mailmap): stop hardcoding commit ids and dates
- mailmap: fix use of freed memory
The new test seems to make t4203 break intermittently.
* jn/send-pack-error (2010-10-16) 1 commit
- send-pack: avoid redundant "pack-objects died with strange error"
* kb/completion-checkout (2010-10-12) 1 commit
- completion: Support the DWIM mode for git checkout
* pn/commit-autosquash (2010-10-07) 8 commits
- add tests of commit --squash
- commit: --squash option for use with rebase --autosquash
- add tests of commit --fixup
- commit: --fixup option for use with rebase --autosquash
- pretty.c: teach format_commit_message() to reencode the output
- pretty.c: helper methods for getting output encodings
- commit.c: new function for looking up a comit by name
- commit.c: prefer get_header() to manual searching
* sg/bisect (2010-10-10) 3 commits
- bisect: check for mandatory argument of 'bisect replay'
- bisect: improve error msg of 'bisect reset' when original HEAD is deleted
- bisect: improve error message of 'bisect log' while not bisecting
* sg/completion (2010-10-11) 4 commits
- bash: support pretty format aliases
- bash: support more 'git notes' subcommands and their options
- bash: not all 'git bisect' subcommands make sense when not bisecting
- bash: offer refs for 'git bisect start'
* jj/icase-directory (2010-10-03) 8 commits
- Support case folding in git fast-import when core.ignorecase=true
- Support case folding for git add when core.ignorecase=true
- Add case insensitivity support when using git ls-files
- Add case insensitivity support for directories when using git status
- Case insensitivity support for .gitignore via core.ignorecase
- Add string comparison functions that respect the ignore_case variable.
- Makefile & configure: add a NO_FNMATCH_CASEFOLD flag
- Makefile & configure: add a NO_FNMATCH flag
* en/and-cascade-tests (2010-10-03) 13 commits
- Introduce sane_unset and use it to ensure proper && chaining
- t7800 (difftool): add missing &&
- t7601 (merge-pull-config): add missing &&
- t7001 (mv): add missing &&
- t6016 (rev-list-graph-simplify-history): add missing &&
- t5602 (clone-remote-exec): add missing &&
- t4026 (color): remove unneeded and unchained command
- t4019 (diff-wserror): add lots of missing &&
- t4202 (log): Replace '<git-command> || :' with test_might_fail
- t4002 (diff-basic): use test_might_fail for commands that might fail
- t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
- t4017 (diff-retval): replace manual exit code check with test_expect_code
- test-lib: make test_expect_code a test command
(this branch is used by jn/git-cmd-h-bypass-setup.)
* jk/no-textconv-symlink (2010-09-21) 1 commit
- diff: don't use pathname-based diff drivers for symlinks
(this branch is used by ks/no-textconv-symlink.)
* ks/no-textconv-symlink (2010-09-29) 3 commits
- blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
- blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
- blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
(this branch uses jk/no-textconv-symlink.)
* nd/struct-pathspec (2010-09-20) 5 commits
- ce_path_match: drop prefix matching in favor of match_pathspec
- Convert ce_path_match() to use struct pathspec
- tree_entry_interesting: turn to match_pathspec if wildcard is present
- pathspec: add tree_recursive_diff parameter
- pathspec: mark wildcard pathspecs from the beginning
(this branch uses en/object-list-with-pathspec.)
* en/object-list-with-pathspec (2010-09-20) 8 commits
- Add testcases showing how pathspecs are handled with rev-list --objects
- Make rev-list --objects work together with pathspecs
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initializing pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is used by nd/struct-pathspec.)
* tc/smart-http-post-redirect (2010-09-25) 1 commit
- smart-http: Don't change POST to GET when following redirect
* en/rename-d-f (2010-09-08) 2 commits
- merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
- t3509: Add rename + D/F conflict testcase that recursive strategy fails
(this branch is used by en/merge-recursive.)
* jl/fetch-submodule-recursive (2010-09-19) 4 commits
- fetch: Get submodule paths from index and not from .gitmodules
- fetch: Fix a bug swallowing the output of recursive submodule fetching
- Submodules: Add the new "fetch" config option for fetch and pull
- fetch/pull: Recursively fetch populated submodules
I haven't picked up the rerolled one yet.
* tr/merge-unborn-clobber (2010-08-22) 1 commit
- Exhibit merge bug that clobbers index&WT
* ab/i18n (2010-09-12) 160 commits
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: use libcharset.h instead of langinfo.h when available
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
^ permalink raw reply [relevance 1%]
* [PATCH/RFC 00/10] Re: [PATCH en/cascade-tests] tests: add missing &&
@ 2010-10-31 7:26 5% ` Jonathan Nieder
2010-10-31 7:30 6% ` [PATCH 01/10] tests: add missing &&, batch 2 Jonathan Nieder
0 siblings, 1 reply; 200+ results
From: Jonathan Nieder @ 2010-10-31 7:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Elijah Newren, git, avarab
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> @@ -36,7 +36,7 @@ test_expect_success 'see what we expect' '
>> {
>> ln -s x y 2> /dev/null &&
>> test -h y 2> /dev/null ||
>> - no_symlinks=1
>> + no_symlinks=1 &&
>> rm -f y
>
> ... if you allowed such a simple assignment failure, no_symlinks=1 may
> fail, and we end up not running "rm -f y" to clean up, which might be
> somewhat undesirable ;-)
Thanks. Will undo that bit in my local version.
Actually I don't see why the "rm -f y" is needed in the first place,
but that is a question for another day.
Here's another batch of patches in the same &&-adding vein. I'm only
sending 10 to the list for now; I can mete the rest out at whatever
rate is useful to people.
Jonathan Nieder (27):
tests: more missing &&
test-lib: introduce test_line_count to measure files
t6022 (renaming merge): chain test commands with &&
t1502 (rev-parse --parseopt): test exit code from "-h"
t1400 (update-ref): use test_must_fail
t3301 (notes): use test_expect_code for clarity
t3404 (rebase -i): unroll test_commit loops
t3404 (rebase -i): move comment to description
t3404 (rebase -i): introduce helper to check position of HEAD
t4124 (apply --whitespace): use test_might_fail
t5701 (clone -l): use test_must_fail
ttt03, t6032: use test_might_fail
t6032 (merge): give body of rename tests its own function
t7001 (mv): introduce test_grep function and use it
t7004 (tag): use test_must_fail
t9146 (git svn): check exit status from svn in loop
t9146 (git svn): use test_path_is_dir/missing helpers
t8007 (textconv): use test_must_fail
t7502 (commit): use test_must_fail
t0005 (signals): hide test-sigchain invocation from &&-chaining
checker
t0020 (convert): improve error checking in loops
t0020 (convert): use diff-index --exit-code
t0020 (convert): remove "Huh?" noise
t0040 (parse-options): use test_expect_code
t7300 (clean): use test_cmp instead of test "$foo" = bar
t1501 (rev-parse): use sane_unset
t4022 (diff -B): simplify using test_grep
t/README | 9 ++
t/t0005-signals.sh | 16 ++-
t/t0020-crlf.sh | 247 +++++++++---------------------------
t/t0040-parse-options.sh | 12 +-
t/t1400-update-ref.sh | 25 ++--
t/t1501-worktree.sh | 4 +-
t/t1502-rev-parse-parseopt.sh | 2 +-
t/t3301-notes.sh | 8 +-
t/t3404-rebase-interactive.sh | 88 ++++++-------
t/t4022-diff-rewrite.sh | 9 +-
t/t4124-apply-ws-rule.sh | 11 +-
t/t5503-tagfollow.sh | 10 +-
t/t5701-clone-local.sh | 22 +---
t/t6022-merge-rename.sh | 282 +++++++++++++---------------------------
t/t6032-merge-large-rename.sh | 36 ++++--
t/t7001-mv.sh | 8 +-
t/t7004-tag.sh | 36 +++---
t/t7300-clean.sh | 25 ++--
t/t7502-commit.sh | 4 +-
t/t7700-repack.sh | 6 +-
t/t8007-cat-file-textconv.sh | 2 +-
t/t9146-git-svn-empty-dirs.sh | 64 ++++------
t/test-lib.sh | 57 ++++++++
23 files changed, 395 insertions(+), 588 deletions(-)
--
1.7.2.3.557.gab647.dirty
^ permalink raw reply [relevance 5%]
* [PATCH 01/10] tests: add missing &&, batch 2
2010-10-31 7:26 5% ` [PATCH/RFC 00/10] " Jonathan Nieder
@ 2010-10-31 7:30 6% ` Jonathan Nieder
0 siblings, 0 replies; 200+ results
From: Jonathan Nieder @ 2010-10-31 7:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Elijah Newren, git, avarab
Same rules as before: this patch only adds " &&" to the end of
some lines in the test suite.
Intended to be applied on top of or squashed with the last
batch if they look okay.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
t/t0020-crlf.sh | 2 +-
t/t1400-update-ref.sh | 20 ++++++++++----------
t/t3301-notes.sh | 6 +++---
t/t3404-rebase-interactive.sh | 6 +++---
t/t4124-apply-ws-rule.sh | 6 +++---
t/t5503-tagfollow.sh | 6 +++---
t/t5701-clone-local.sh | 6 +++---
t/t7001-mv.sh | 2 +-
t/t7004-tag.sh | 30 +++++++++++++++---------------
t/t7300-clean.sh | 2 +-
t/t7502-commit.sh | 2 +-
t/t7700-repack.sh | 6 +++---
t/t9146-git-svn-empty-dirs.sh | 2 +-
13 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 234a94f..1a8f44c 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -439,7 +439,7 @@ test_expect_success 'checkout when deleting .gitattributes' '
git rm .gitattributes &&
echo "contentsQ" | q_to_cr > .file2 &&
git add .file2 &&
- git commit -m third
+ git commit -m third &&
git checkout master~1 &&
git checkout master &&
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 54ba3df..d17551e 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -185,55 +185,55 @@ gd="Thu, 26 May 2005 18:33:00 -0500"
ld="Thu, 26 May 2005 18:43:00 -0500"
test_expect_success \
'Query "master@{May 25 2005}" (before history)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{May 25 2005}" >o 2>e &&
test '"$C"' = $(cat o) &&
test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
test_expect_success \
"Query master@{2005-05-25} (before history)" \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify master@{2005-05-25} >o 2>e &&
test '"$C"' = $(cat o) &&
echo test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
test_expect_success \
'Query "master@{May 26 2005 23:31:59}" (1 second before history)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
test '"$C"' = $(cat o) &&
test "warning: Log for '\''master'\'' only goes back to $ed." = "$(cat e)"'
test_expect_success \
'Query "master@{May 26 2005 23:32:00}" (exactly history start)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
test '"$C"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{May 26 2005 23:32:30}" (first non-creation change)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e &&
test '"$A"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-26 23:33:01}" (middle of history with gap)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
test '"$B"' = $(cat o) &&
test "warning: Log .git/logs/'"$m has gap after $gd"'." = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-26 23:38:00}" (middle of history)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
test '"$Z"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-26 23:43:00}" (exact end of history)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
test '"$E"' = $(cat o) &&
test "" = "$(cat e)"'
test_expect_success \
'Query "master@{2005-05-28}" (past end of history)' \
- 'rm -f o e
+ 'rm -f o e &&
git rev-parse --verify "master@{2005-05-28}" >o 2>e &&
test '"$D"' = $(cat o) &&
test "warning: Log .git/logs/'"$m unexpectedly ended on $ld"'." = "$(cat e)"'
@@ -247,7 +247,7 @@ test_expect_success \
git add F &&
GIT_AUTHOR_DATE="2005-05-26 23:30" \
GIT_COMMITTER_DATE="2005-05-26 23:30" git commit -m add -a &&
- h_TEST=$(git rev-parse --verify HEAD)
+ h_TEST=$(git rev-parse --verify HEAD) &&
echo The other day this did not work. >M &&
echo And then Bob told me how to fix it. >>M &&
echo OTHER >F &&
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index a2b79a0..6931171 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -627,16 +627,16 @@ test_expect_success '--show-notes=ref accumulates' '
test_expect_success 'Allow notes on non-commits (trees, blobs, tags)' '
git config core.notesRef refs/notes/other &&
- echo "Note on a tree" > expect
+ echo "Note on a tree" > expect &&
git notes add -m "Note on a tree" HEAD: &&
git notes show HEAD: > actual &&
test_cmp expect actual &&
- echo "Note on a blob" > expect
+ echo "Note on a blob" > expect &&
filename=$(git ls-tree --name-only HEAD | head -n1) &&
git notes add -m "Note on a blob" HEAD:$filename &&
git notes show HEAD:$filename > actual &&
test_cmp expect actual &&
- echo "Note on a tag" > expect
+ echo "Note on a tag" > expect &&
git tag -a -m "This is an annotated tag" foobar HEAD^ &&
git notes add -m "Note on a tag" foobar &&
git notes show foobar > actual &&
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 7d20a74..c0e69f6 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -46,7 +46,7 @@ test_expect_success 'setup' '
test_commit G file1 &&
test_commit H file5 &&
git checkout -b branch2 F &&
- test_commit I file6
+ test_commit I file6 &&
git checkout -b conflict-branch A &&
for n in one two three four
do
@@ -584,7 +584,7 @@ test_expect_success 'do "noop" when there is nothing to cherry-pick' '
git checkout -b branch4 HEAD &&
GIT_EDITOR=: git commit --amend \
- --author="Somebody else <somebody@else.com>"
+ --author="Somebody else <somebody@else.com>" &&
test $(git rev-parse branch3) != $(git rev-parse branch4) &&
git rebase -i branch3 &&
test $(git rev-parse branch3) = $(git rev-parse branch4)
@@ -599,7 +599,7 @@ test_expect_success 'submodule rebase setup' '
git add elif && git commit -m "submodule initial"
) &&
echo 1 >file1 &&
- git add file1 sub
+ git add file1 sub &&
test_tick &&
git commit -m "One" &&
echo 2 >file1 &&
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index 8a676a5..414b09b 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -368,7 +368,7 @@ test_expect_success 'missing blanks at EOF must only match blank lines' '
git diff -- one >patch &&
echo a >one &&
- test_must_fail git apply patch
+ test_must_fail git apply patch &&
test_must_fail git apply --whitespace=fix patch &&
test_must_fail git apply --ignore-space-change --whitespace=fix patch
'
@@ -419,7 +419,7 @@ test_expect_success 'same, but with CR-LF line endings && cr-at-eol set' '
printf "b\r\n" >>one &&
printf "c\r\n" >>one &&
cp one save-one &&
- printf " \r\n" >>one
+ printf " \r\n" >>one &&
git add one &&
printf "d\r\n" >>one &&
cp one expect &&
@@ -436,7 +436,7 @@ test_expect_success 'same, but with CR-LF line endings && cr-at-eol unset' '
printf "b\r\n" >>one &&
printf "c\r\n" >>one &&
cp one save-one &&
- printf " \r\n" >>one
+ printf " \r\n" >>one &&
git add one &&
cp one expect &&
printf "d\r\n" >>one &&
diff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh
index 8a298a6..7f6d3d2 100755
--- a/t/t5503-tagfollow.sh
+++ b/t/t5503-tagfollow.sh
@@ -54,7 +54,7 @@ EOF
'
test_expect_success NOT_MINGW 'fetch A (new commit : 1 connection)' '
- rm -f $U
+ rm -f $U &&
(
cd cloned &&
GIT_DEBUG_SEND_PACK=3 git fetch 3>../$U &&
@@ -87,7 +87,7 @@ EOF
'
test_expect_success NOT_MINGW 'fetch C, T (new branch, tag : 1 connection)' '
- rm -f $U
+ rm -f $U &&
(
cd cloned &&
GIT_DEBUG_SEND_PACK=3 git fetch 3>../$U &&
@@ -126,7 +126,7 @@ EOF
'
test_expect_success NOT_MINGW 'fetch B, S (commit and tag : 1 connection)' '
- rm -f $U
+ rm -f $U &&
(
cd cloned &&
GIT_DEBUG_SEND_PACK=3 git fetch 3>../$U &&
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh
index 8b4c356..0f4d487 100755
--- a/t/t5701-clone-local.sh
+++ b/t/t5701-clone-local.sh
@@ -10,11 +10,11 @@ test_expect_success 'preparing origin repository' '
git clone --bare . a.git &&
git clone --bare . x &&
test "$(GIT_CONFIG=a.git/config git config --bool core.bare)" = true &&
- test "$(GIT_CONFIG=x/config git config --bool core.bare)" = true
+ test "$(GIT_CONFIG=x/config git config --bool core.bare)" = true &&
git bundle create b1.bundle --all &&
git bundle create b2.bundle master &&
mkdir dir &&
- cp b1.bundle dir/b3
+ cp b1.bundle dir/b3 &&
cp b1.bundle b4
'
@@ -112,7 +112,7 @@ test_expect_success 'bundle clone with nonexistent HEAD' '
cd "$D" &&
git clone b2.bundle b2 &&
cd b2 &&
- git fetch
+ git fetch &&
test ! -e .git/refs/heads/master
'
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 624e6d2..a845b15 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -207,7 +207,7 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
git init &&
echo 1 >dirty &&
git add dirty &&
- entry="$(git ls-files --stage dirty | cut -f 1)"
+ entry="$(git ls-files --stage dirty | cut -f 1)" &&
git mv dirty dirty2 &&
[ "$entry" = "$(git ls-files --stage dirty2 | cut -f 1)" ] &&
echo 2 >dirty2 &&
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index ac943f5..d05f421 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1097,7 +1097,7 @@ hash1=$(git rev-parse HEAD)
test_expect_success 'creating second commit and tag' '
echo foo-2.0 >foo &&
git add foo &&
- git commit -m second
+ git commit -m second &&
git tag v2.0
'
@@ -1122,18 +1122,18 @@ v2.0
EOF
test_expect_success 'checking that first commit is in all tags (hash)' "
- git tag -l --contains $hash1 v* >actual
+ git tag -l --contains $hash1 v* >actual &&
test_cmp expected actual
"
# other ways of specifying the commit
test_expect_success 'checking that first commit is in all tags (tag)' "
- git tag -l --contains v1.0 v* >actual
+ git tag -l --contains v1.0 v* >actual &&
test_cmp expected actual
"
test_expect_success 'checking that first commit is in all tags (relative)' "
- git tag -l --contains HEAD~2 v* >actual
+ git tag -l --contains HEAD~2 v* >actual &&
test_cmp expected actual
"
@@ -1142,7 +1142,7 @@ v2.0
EOF
test_expect_success 'checking that second commit only has one tag' "
- git tag -l --contains $hash2 v* >actual
+ git tag -l --contains $hash2 v* >actual &&
test_cmp expected actual
"
@@ -1151,7 +1151,7 @@ cat > expected <<EOF
EOF
test_expect_success 'checking that third commit has no tags' "
- git tag -l --contains $hash3 v* >actual
+ git tag -l --contains $hash3 v* >actual &&
test_cmp expected actual
"
@@ -1161,7 +1161,7 @@ test_expect_success 'creating simple branch' '
git branch stable v2.0 &&
git checkout stable &&
echo foo-3.0 > foo &&
- git commit foo -m fourth
+ git commit foo -m fourth &&
git tag v3.0
'
@@ -1172,7 +1172,7 @@ v3.0
EOF
test_expect_success 'checking that branch head only has one tag' "
- git tag -l --contains $hash4 v* >actual
+ git tag -l --contains $hash4 v* >actual &&
test_cmp expected actual
"
@@ -1186,7 +1186,7 @@ v4.0
EOF
test_expect_success 'checking that original branch head has one tag now' "
- git tag -l --contains $hash3 v* >actual
+ git tag -l --contains $hash3 v* >actual &&
test_cmp expected actual
"
@@ -1201,18 +1201,18 @@ v4.0
EOF
test_expect_success 'checking that initial commit is in all tags' "
- git tag -l --contains $hash1 v* >actual
+ git tag -l --contains $hash1 v* >actual &&
test_cmp expected actual
"
# mixing modes and options:
test_expect_success 'mixing incompatibles modes and options is forbidden' '
- test_must_fail git tag -a
- test_must_fail git tag -l -v
- test_must_fail git tag -n 100
- test_must_fail git tag -l -m msg
- test_must_fail git tag -l -F some file
+ test_must_fail git tag -a &&
+ test_must_fail git tag -l -v &&
+ test_must_fail git tag -n 100 &&
+ test_must_fail git tag -l -m msg &&
+ test_must_fail git tag -l -F some file &&
test_must_fail git tag -v -s
'
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 6c776e9..c802ef8 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -183,7 +183,7 @@ test_expect_success 'git clean symbolic link' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- ln -s docs/manual.txt src/part4.c
+ ln -s docs/manual.txt src/part4.c &&
git clean &&
test -f Makefile &&
test -f README &&
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index c1c6645..50da034 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -390,7 +390,7 @@ try_commit_status_combo () {
test_expect_success 'commit --no-status' '
clear_config commit.status &&
- try_commit --no-status
+ try_commit --no-status &&
! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
'
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index c2f66ff..d954b84 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -56,7 +56,7 @@ test_expect_success 'loose objects in alternate ODB are not repacked' '
'
test_expect_success 'packed obs in alt ODB are repacked even when local repo is packless' '
- mkdir alt_objects/pack
+ mkdir alt_objects/pack &&
mv .git/objects/pack/* alt_objects/pack &&
git repack -a &&
myidx=$(ls -1 .git/objects/pack/*.idx) &&
@@ -95,14 +95,14 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' '
# swap the .keep so the commit object is in the pack with .keep
for p in alt_objects/pack/*.pack
do
- base_name=$(basename $p .pack)
+ base_name=$(basename $p .pack) &&
if test -f alt_objects/pack/$base_name.keep
then
rm alt_objects/pack/$base_name.keep
else
touch alt_objects/pack/$base_name.keep
fi
- done
+ done &&
git repack -a -d &&
myidx=$(ls -1 .git/objects/pack/*.idx) &&
test -f "$myidx" &&
diff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh
index 565365c..158c8e3 100755
--- a/t/t9146-git-svn-empty-dirs.sh
+++ b/t/t9146-git-svn-empty-dirs.sh
@@ -33,7 +33,7 @@ test_expect_success 'more emptiness' '
'
test_expect_success 'git svn rebase creates empty directory' '
- ( cd cloned && git svn rebase )
+ ( cd cloned && git svn rebase ) &&
test -d cloned/"! !"
'
--
1.7.2.3.557.gab647.dirty
^ permalink raw reply related [relevance 6%]
* What's cooking in git.git (Nov 2010, #01; Tue, 9)
@ 2010-11-09 19:53 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2010-11-09 19:53 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.
--------------------------------------------------
[New Topics]
* dk/maint-blame-el (2010-05-25) 1 commit
(merged to 'next' on 2010-11-05 at 8456c66)
+ git-blame.el: Add (require 'format-spec)
* ef/mingw-daemon (2010-11-04) 16 commits
- daemon: opt-out on features that require posix
- daemon: make --inetd and --detach incompatible
- daemon: use socklen_t
- mingw: use poll-emulation from gnulib
- mingw: import poll-emulation from gnulib
- daemon: get remote host address from root-process
- Improve the mingw getaddrinfo stub to handle more use cases
- daemon: use full buffered mode for stderr
- daemon: use run-command api for async serving
- mingw: add kill emulation
- mingw: support waitpid with pid > 0 and WNOHANG
- mingw: use real pid
- inet_ntop: fix a couple of old-style decls
- compat: add inet_pton and inet_ntop prototypes
- mingw: implement syslog
- mingw: add network-wrappers for daemon
Will merge to 'next'.
* jc/abbrev-guard (2010-10-28) 1 commit
- core.abbrevguard: Ensure short object names stay unique a bit longer
* jc/emfile (2010-10-28) 2 commits
- A loose object is not corrupt if it cannot be read due to EMFILE
- read_sha1_file(): report correct name of packfile with a corrupt object
(this branch is used by sp/emfile.)
Will merge to 'next'.
* sp/emfile (2010-11-01) 2 commits
- Work around EMFILE when there are too many pack files
- Use git_open_noatime when accessing pack data
(this branch uses jc/emfile.)
Will merge to 'next', but might want to restructure the API a bit.
* jh/gitweb-caching (2010-11-01) 4 commits
- gitweb: Minimal testing of gitweb caching
- gitweb: File based caching layer (from git.kernel.org)
- gitweb: add output buffering and associated functions
- gitweb: Prepare for splitting gitweb
(this branch uses jn/gitweb-test.)
* jk/maint-apply-no-binary (2010-10-18) 1 commit
(merged to 'next' on 2010-11-05 at 8b7543a)
+ apply: don't segfault on binary files with missing data
* jl/add-p-reverse-message (2010-10-27) 1 commit
- Correct help blurb in checkout -p and friends
Looked Ok; will merge to 'next' soonish.
* jl/clone-recurse-sm-synonym (2010-11-04) 1 commit
- clone: Add the --recurse-submodules option as alias for --recursive
Looked Ok; will merge to 'next' soonish.
* jl/maint-pull-tags-doc (2010-11-03) 1 commit
(merged to 'next' on 2010-11-05 at 861d16a)
+ pull: Remove --tags option from manpage
* jn/cherry-pick-refresh-index (2010-10-31) 1 commit
- cherry-pick/revert: transparently refresh index
Looked Ok; will merge to 'next' soonish.
* jn/parse-options-extra (2010-10-24) 4 commits
- update-index: migrate to parse-options API
- setup: save prefix (original cwd relative to toplevel) in startup_info
- parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
- parse-options: allow git commands to invent new option types
Looked Ok; will merge to 'next' soonish.
* kb/maint-submodule-savearg (2010-11-02) 2 commits
(merged to 'next' on 2010-11-05 at 10e1aeb)
+ submodule: only preserve flags across recursive status/update invocations
+ submodule: preserve all arguments exactly when recursing
* md/interix (2010-10-27) 2 commits
- Interix: add configure checks
- add support for the SUA layer (interix; windows)
Looked Ok, in the sense that I do not think it will negatively affect
other platforms. Will merge to 'next' soonish.
* mm/phrase-remote-tracking (2010-11-02) 10 commits
- git-branch.txt: mention --set-upstream as a way to change upstream configuration
- user-manual: remote-tracking can be checked out, with detached HEAD
- user-manual.txt: explain better the remote(-tracking) branch terms
- Change incorrect "remote branch" to "remote tracking branch" in C code
- Change incorrect uses of "remote branch" meaning "remote-tracking"
- Change "tracking branch" to "remote-tracking branch"
- everyday.txt: change "tracking branch" to "remote-tracking branch"
- Change remote tracking to remote-tracking in non-trivial places
- Replace "remote tracking" with "remote-tracking"
- Better "Changed but not updated" message in git-status
Is everybody happy with this round? I'd prefer to merge it to 'next' or
even 'master' and have further polishing be done, if necessary, in-tree.
* nd/setup (2010-11-08) 44 commits
- t1020-subdirectory: test alias expansion in a subdirectory
- Remove all logic from get_git_work_tree()
- setup: rework setup_explicit_git_dir()
- setup: clean up setup_discovered_git_dir()
- setup: clean up setup_bare_git_dir()
- setup: limit get_git_work_tree()'s to explicit setup case only
- Use git_config_early() instead of git_config() during repo setup
- Add git_config_early()
- rev-parse: prints --git-dir relative to user's cwd
- git-rev-parse.txt: clarify --git-dir
- t1510: setup case #31
- t1510: setup case #30
- t1510: setup case #29
- t1510: setup case #28
- t1510: setup case #27
- t1510: setup case #26
- t1510: setup case #25
- t1510: setup case #24
- t1510: setup case #23
- t1510: setup case #22
- t1510: setup case #21
- t1510: setup case #20
- t1510: setup case #19
- t1510: setup case #18
- t1510: setup case #17
- t1510: setup case #16
- t1510: setup case #15
- t1510: setup case #14
- t1510: setup case #13
- t1510: setup case #12
- t1510: setup case #11
- t1510: setup case #10
- t1510: setup case #9
- t1510: setup case #8
- t1510: setup case #7
- t1510: setup case #6
- t1510: setup case #5
- t1510: setup case #4
- t1510: setup case #3
- t1510: setup case #2
- t1510: setup case #1
- t1510: setup case #0
- Add t1510 and basic rules that run repo setup
- builtins: print setup info if repo is found
* rr/needs-clean-work-tree (2010-10-19) 1 commit
- Porcelain scripts: Rewrite cryptic "needs update" error message
Looked Ok, will merge to 'next' soonish.
* sn/diff-doc (2010-11-04) 3 commits
- docs: clarify git diff modes of operation
- diff,difftool: Don't use the {0,2} notation in usage strings
- CodingGuidelines: Add a section on writing documentation
* tr/config-doc (2010-10-24) 2 commits
. Documentation: complete config list from other manpages
. Documentation: Move variables from config.txt to separate file
This unfortunately heavily conflicts with patches in flight...
* kb/maint-rebase-autosquash (2010-11-04) 2 commits
- rebase: teach --autosquash to match on sha1 in addition to message
- rebase: better rearranging of fixup!/squash! lines with --autosquash
* kb/maint-status-cquote (2010-11-08) 1 commit
- status: Quote paths with spaces in short format
* mg/maint-tag-rfc1991 (2010-11-06) 5 commits
- tag: recognize rfc1991 signatures
- tag: factor out sig detection for tag display
- tag: factor out sig detection for body edits
- verify-tag: factor out signature detection
- t/t7004-tag: test handling of rfc1991 signatures
--------------------------------------------------
[Graduated to "master"]
* aw/git-p4-deletion (2010-10-22) 1 commit
(merged to 'next' on 2010-10-26 at 5847c40)
+ Fix handling of git-p4 on deleted files
--------------------------------------------------
[Stalled]
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
--------------------------------------------------
[Cooking]
* ao/send-email-irt (2010-10-19) 1 commit
(merged to 'next' on 2010-11-08 at d103166)
+ t9001: send-email interation with --in-reply-to and --chain-reply-to
* bg/maint-gitweb-test-lib (2010-10-20) 1 commit
(merged to 'next' on 2010-11-05 at 0ead869)
+ t/gitweb-lib: Don't pass constant to decode_utf8
* cm/diff-check-at-eol (2010-10-10) 1 commit
- diff --check: correct line numbers of new blank lines at EOF
Looked Ok; will merge to 'next' soonish.
* fc/apply-p2-get-header-name (2010-10-21) 2 commits
- test: git-apply -p2 rename/chmod only
- Fix git-apply with -p greater than 1
Looked Ok; will merge to 'next' soonish.
* jk/add-e-doc (2010-10-21) 1 commit
(merged to 'next' on 2010-11-05 at 389fee7)
+ docs: give more hints about how "add -e" works
* jk/diff-CBM (2010-10-21) 1 commit
(merged to 'next' on 2010-11-05 at 9d1ec14)
+ diff: report bogus input to -C/-M/-B
* jk/missing-config (2010-10-21) 1 commit
(merged to 'next' on 2010-11-05 at 31fda69)
+ config: treat non-existent config files as empty
* jn/fast-import-fix (2010-10-20) 4 commits
- fast-import: do not clear notes in do_change_note_fanout()
- t9300 (fast-import): another test for the "replace root" feature
- fast-import: tighten M 040000 syntax
- fast-import: filemodify after M 040000 <tree> "" crashes
Looked Ok; will merge to 'next' soonish.
* jn/git-cmd-h-bypass-setup (2010-10-22) 7 commits
- update-index -h: show usage even with corrupt index
- merge -h: show usage even with corrupt index
- ls-files -h: show usage even with corrupt index
- gc -h: show usage even with broken configuration
- commit/status -h: show usage even with broken configuration
- checkout-index -h: show usage even in an invalid repository
- branch -h: show usage even in an invalid repository
(this branch uses en/and-cascade-tests.)
* kb/blame-author-email (2010-10-15) 1 commit
- blame: Add option to show author email instead of name
Looked Ok; will merge to 'next' soonish.
* kb/maint-diff-ws-check (2010-10-20) 2 commits
(merged to 'next' on 2010-11-05 at 861b5ac)
+ diff: handle lines containing only whitespace and tabs better
+ test-lib: extend test_decode_color to handle more color codes
* mg/make-prove (2010-10-14) 1 commit
(merged to 'next' on 2010-11-05 at ec4f806)
+ test: allow running the tests under "prove"
* np/diff-in-corrupt-repository (2010-10-22) 1 commit
- diff: don't presume empty file when corresponding object is missing
Looked Ok; will merge to 'next' soonish.
* np/pack-broken-boundary (2010-10-22) 1 commit
- make pack-objects a bit more resilient to repo corruption
Looked Ok; will merge to 'next' soonish.
* tr/maint-git-repack-tmpfile (2010-10-19) 1 commit
(merged to 'next' on 2010-11-05 at 80ad03a)
+ repack: place temporary packs under .git/objects/pack/
* tr/maint-merge-file-subdir (2010-10-17) 2 commits
(merged to 'next' on 2010-11-05 at a2873a4)
+ merge-file: correctly find files when called in subdir
+ prefix_filename(): safely handle the case where pfx_len=0
* yd/dir-rename (2010-10-29) 5 commits
- Allow hiding renames of individual files involved in a directory rename.
- Unified diff output format for bulk moves.
- Add testcases for the --detect-bulk-moves diffcore flag.
- Raw diff output format for bulk moves.
- Introduce bulk-move detection in diffcore.
* cb/diff-fname-optim (2010-09-26) 3 commits
(merged to 'next' on 2010-11-05 at b3b09f3)
+ diff: avoid repeated scanning while looking for funcname
+ do not search functions for patch ID
+ add rebase patch id tests
* en/merge-recursive (2010-10-21) 39 commits
(merged to 'next' on 2010-11-05 at 16902eb)
+ merge-recursive:make_room_for_directories - work around dumb compilers
+ merge-recursive: Remove redundant path clearing for D/F conflicts
+ merge-recursive: Make room for directories in D/F conflicts
+ handle_delete_modify(): Check whether D/F conflicts are still present
+ merge_content(): Check whether D/F conflicts are still present
+ conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
+ conflict_rename_delete(): Check whether D/F conflicts are still present
+ merge-recursive: Delay modify/delete conflicts if D/F conflict present
+ merge-recursive: Delay content merging for renames
+ merge-recursive: Delay handling of rename/delete conflicts
+ merge-recursive: Move handling of double rename of one file to other file
+ merge-recursive: Move handling of double rename of one file to two
+ merge-recursive: Avoid doubly merging rename/add conflict contents
+ merge-recursive: Update merge_content() call signature
+ merge-recursive: Update conflict_rename_rename_1to2() call signature
+ merge-recursive: Structure process_df_entry() to handle more cases
+ merge-recursive: Have process_entry() skip D/F or rename entries
+ merge-recursive: New function to assist resolving renames in-core only
+ merge-recursive: New data structures for deferring of D/F conflicts
+ merge-recursive: Move process_entry's content merging into a function
+ merge-recursive: Move delete/modify handling into dedicated function
+ merge-recursive: Move rename/delete handling into dedicated function
+ merge-recursive: Nuke rename/directory conflict detection
+ merge-recursive: Rename conflict_rename_rename*() for clarity
+ merge-recursive: Small code clarification -- variable name and comments
+ t6036: Add testcase for undetected conflict
+ t6036: Add a second testcase similar to the first but with content changes
+ t6036: Test index and worktree state, not just that merge fails
+ t6020: Add a testcase for modify/delete + directory/file conflict
+ t6020: Modernize style a bit
+ t6022: Add tests for rename/rename combined with D/F conflicts
+ t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)
+ t6022: Add tests with both rename source & dest involved in D/F conflicts
+ t6022: Add tests for reversing order of merges when D/F conflicts present
+ t6022: Add test combinations of {content conflict?, D/F conflict remains?}
+ t6032: Add a test checking for excessive output from merge
+ merge-recursive: Restructure showing how to chain more process_* functions
+ t3030: Add a testcase for resolvable rename/add conflict with symlinks
+ Merge branch 'en/rename-d-f' into en/merge-recursive
(this branch uses en/rename-d-f.)
* il/remote-fd-ext (2010-10-12) 3 commits
(merged to 'next' on 2010-11-05 at 7413413)
+ git-remote-ext
+ git-remote-fd
+ Add bidirectional_transfer_loop()
* jn/gitweb-test (2010-09-26) 4 commits
(merged to 'next' on 2010-11-05 at 90b3adf)
+ gitweb/Makefile: Include gitweb/config.mak
+ gitweb/Makefile: Add 'test' and 'test-installed' targets
+ t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
+ gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
(this branch is used by jh/gitweb-caching.)
* ak/apply-non-git-epoch (2010-09-29) 1 commit
- apply: Recognize epoch timestamps with : in the timezone
Looked Ok; will merge to 'next' soonish.
* ak/submodule-sync (2010-10-08) 1 commit
(merged to 'next' on 2010-11-05 at 5a2f940)
+ submodule sync: Update "submodule.<name>.url" for empty directories
* cb/leading-path-removal (2010-10-09) 5 commits
(merged to 'next' on 2010-11-05 at 55ea322)
+ do not overwrite files in leading path
+ lstat_cache: optionally return match_len
+ add function check_ok_to_remove()
+ t7607: add leading-path tests
+ t7607: use test-lib functions and check MERGE_HEAD
* jh/notes-merge (2010-10-29) 25 commits
- portability fix for c8af1a3b2f
- notes-merge series: fixup minor style issues
- Provide 'git merge --abort' as a synonym to 'git reset --merge'
- cmd_merge(): Parse options before checking MERGE_HEAD
- Provide 'git notes get-ref' to easily retrieve current notes ref
- git notes merge: Add testcases for merging notes trees at different fanouts
- git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
- git notes merge: --commit should fail if underlying notes ref has moved
- git notes merge: List conflicting notes in notes merge commit message
- git notes merge: Manual conflict resolution, part 2/2
- git notes merge: Manual conflict resolution, part 1/2
- Documentation: Preliminary docs on 'git notes merge'
- git notes merge: Add automatic conflict resolvers (ours, theirs, union)
- git notes merge: Handle real, non-conflicting notes merges
- builtin/notes.c: Refactor creation of notes commits.
- git notes merge: Initial implementation handling trivial merges only
- builtin/notes.c: Split notes ref DWIMmery into a separate function
- notes.c: Use two newlines (instead of one) when concatenating notes
- (trivial) t3303: Indent with tabs instead of spaces for consistency
- notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
- notes.h/c: Allow combine_notes functions to remove notes
- notes.c: Reorder functions in preparation for next commit
- notes.h: Make default_notes_ref() available in notes API
- (trivial) notes.h: Minor documentation fixes to copy_notes()
- notes.c: Hexify SHA1 in die() message from init_notes()
Still in flux?
* jk/maint-rev-list-nul (2010-10-07) 1 commit
(merged to 'next' on 2010-11-05 at 406cba1)
+ rev-list: handle %x00 NUL in user format
* jk/push-progress (2010-10-17) 8 commits
(merged to 'next' on 2010-11-05 at 9207c6d)
+ push: pass --progress down to git-pack-objects
+ t5523-push-upstream: test progress messages
+ t5523-push-upstream: add function to ensure fresh upstream repo
+ test_terminal: ensure redirections work reliably
+ test_terminal: catch use without TTY prerequisite
+ test-lib: allow test code to check the list of declared prerequisites
+ tests: test terminal output to both stdout and stderr
+ tests: factor out terminal handling from t7006
* jm/mailmap (2010-10-19) 3 commits
(merged to 'next' on 2010-11-05 at ef1e754)
+ t4203: do not let "git shortlog" DWIM based on tty
+ t4203 (mailmap): stop hardcoding commit ids and dates
+ mailmap: fix use of freed memory
* jn/send-pack-error (2010-10-16) 1 commit
(merged to 'next' on 2010-11-05 at ef559d4)
+ send-pack: avoid redundant "pack-objects died with strange error"
* kb/completion-checkout (2010-10-12) 1 commit
(merged to 'next' on 2010-11-05 at 6836d70)
+ completion: Support the DWIM mode for git checkout
* pn/commit-autosquash (2010-11-02) 6 commits
- add tests of commit --squash
- commit: --squash option for use with rebase --autosquash
- add tests of commit --fixup
- commit: --fixup option for use with rebase --autosquash
- pretty.c: teach format_commit_message() to reencode the output
- commit: helper methods to reduce redundant blocks of code
* sg/bisect (2010-10-10) 3 commits
(merged to 'next' on 2010-11-05 at 4a8b88d)
+ bisect: check for mandatory argument of 'bisect replay'
+ bisect: improve error msg of 'bisect reset' when original HEAD is deleted
+ bisect: improve error message of 'bisect log' while not bisecting
* sg/completion (2010-10-11) 4 commits
(merged to 'next' on 2010-11-05 at 4967932)
+ bash: support pretty format aliases
+ bash: support more 'git notes' subcommands and their options
+ bash: not all 'git bisect' subcommands make sense when not bisecting
+ bash: offer refs for 'git bisect start'
* jj/icase-directory (2010-10-03) 8 commits
- Support case folding in git fast-import when core.ignorecase=true
- Support case folding for git add when core.ignorecase=true
- Add case insensitivity support when using git ls-files
- Add case insensitivity support for directories when using git status
- Case insensitivity support for .gitignore via core.ignorecase
- Add string comparison functions that respect the ignore_case variable.
- Makefile & configure: add a NO_FNMATCH_CASEFOLD flag
- Makefile & configure: add a NO_FNMATCH flag
* en/and-cascade-tests (2010-10-03) 13 commits
- Introduce sane_unset and use it to ensure proper && chaining
- t7800 (difftool): add missing &&
- t7601 (merge-pull-config): add missing &&
- t7001 (mv): add missing &&
- t6016 (rev-list-graph-simplify-history): add missing &&
- t5602 (clone-remote-exec): add missing &&
- t4026 (color): remove unneeded and unchained command
- t4019 (diff-wserror): add lots of missing &&
- t4202 (log): Replace '<git-command> || :' with test_might_fail
- t4002 (diff-basic): use test_might_fail for commands that might fail
- t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
- t4017 (diff-retval): replace manual exit code check with test_expect_code
- test-lib: make test_expect_code a test command
(this branch is used by jn/git-cmd-h-bypass-setup.)
* jk/no-textconv-symlink (2010-09-21) 1 commit
(merged to 'next' on 2010-11-05 at 0a99e75)
+ diff: don't use pathname-based diff drivers for symlinks
(this branch is used by ks/no-textconv-symlink.)
* ks/no-textconv-symlink (2010-09-29) 3 commits
(merged to 'next' on 2010-11-05 at 32f0580)
+ blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
+ blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
+ blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
(this branch uses jk/no-textconv-symlink.)
* nd/struct-pathspec (2010-09-20) 5 commits
- ce_path_match: drop prefix matching in favor of match_pathspec
- Convert ce_path_match() to use struct pathspec
- tree_entry_interesting: turn to match_pathspec if wildcard is present
- pathspec: add tree_recursive_diff parameter
- pathspec: mark wildcard pathspecs from the beginning
(this branch uses en/object-list-with-pathspec.)
This is related to something I have long been wanting to see happen. Will
give it another look and merge to 'next'.
* en/object-list-with-pathspec (2010-09-20) 8 commits
- Add testcases showing how pathspecs are handled with rev-list --objects
- Make rev-list --objects work together with pathspecs
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initializing pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is used by nd/struct-pathspec.)
* tc/smart-http-post-redirect (2010-09-25) 1 commit
- smart-http: Don't change POST to GET when following redirect
Will merge to 'next' to see what happens.
* en/rename-d-f (2010-09-08) 2 commits
+ merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
+ t3509: Add rename + D/F conflict testcase that recursive strategy fails
(this branch is used by en/merge-recursive.)
* jl/fetch-submodule-recursive (2010-09-19) 4 commits
- fetch: Get submodule paths from index and not from .gitmodules
- fetch: Fix a bug swallowing the output of recursive submodule fetching
- Submodules: Add the new "fetch" config option for fetch and pull
- fetch/pull: Recursively fetch populated submodules
* tr/merge-unborn-clobber (2010-08-22) 1 commit
- Exhibit merge bug that clobbers index&WT
* ab/i18n (2010-10-07) 161 commits
- po/de.po: complete German translation
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: use libcharset.h instead of langinfo.h when available
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
Will merge to 'next' to see what happens; it is getting ridiculously
painful to keep re-resolving the conflicts with other topics in flight,
even with the help with rerere.
^ permalink raw reply [relevance 1%]
* What's cooking in git.git (Nov 2010, #02; Wed, 17)
@ 2010-11-18 0:56 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2010-11-18 0:56 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.
--------------------------------------------------
[Graduated to "master"]
* ak/submodule-sync (2010-10-08) 1 commit
(merged to 'next' on 2010-11-05 at 5a2f940)
+ submodule sync: Update "submodule.<name>.url" for empty directories
* bg/maint-gitweb-test-lib (2010-10-20) 1 commit
(merged to 'next' on 2010-11-05 at 0ead869)
+ t/gitweb-lib: Don't pass constant to decode_utf8
* cb/diff-fname-optim (2010-09-26) 3 commits
(merged to 'next' on 2010-11-05 at b3b09f3)
+ diff: avoid repeated scanning while looking for funcname
+ do not search functions for patch ID
+ add rebase patch id tests
* dk/maint-blame-el (2010-05-25) 1 commit
(merged to 'next' on 2010-11-05 at 8456c66)
+ git-blame.el: Add (require 'format-spec)
* jk/maint-apply-no-binary (2010-10-18) 1 commit
(merged to 'next' on 2010-11-05 at 8b7543a)
+ apply: don't segfault on binary files with missing data
* jk/maint-rev-list-nul (2010-10-07) 1 commit
(merged to 'next' on 2010-11-05 at 406cba1)
+ rev-list: handle %x00 NUL in user format
* jk/missing-config (2010-10-21) 1 commit
(merged to 'next' on 2010-11-05 at 31fda69)
+ config: treat non-existent config files as empty
* jk/no-textconv-symlink (2010-09-21) 1 commit
(merged to 'next' on 2010-11-05 at 0a99e75)
+ diff: don't use pathname-based diff drivers for symlinks
(this branch is used by ks/no-textconv-symlink.)
* jk/push-progress (2010-10-17) 8 commits
(merged to 'next' on 2010-11-05 at 9207c6d)
+ push: pass --progress down to git-pack-objects
+ t5523-push-upstream: test progress messages
+ t5523-push-upstream: add function to ensure fresh upstream repo
+ test_terminal: ensure redirections work reliably
+ test_terminal: catch use without TTY prerequisite
+ test-lib: allow test code to check the list of declared prerequisites
+ tests: test terminal output to both stdout and stderr
+ tests: factor out terminal handling from t7006
* jl/maint-pull-tags-doc (2010-11-03) 1 commit
(merged to 'next' on 2010-11-05 at 861d16a)
+ pull: Remove --tags option from manpage
* jm/mailmap (2010-10-19) 3 commits
(merged to 'next' on 2010-11-05 at ef1e754)
+ t4203: do not let "git shortlog" DWIM based on tty
+ t4203 (mailmap): stop hardcoding commit ids and dates
+ mailmap: fix use of freed memory
* jn/gitweb-test (2010-09-26) 4 commits
(merged to 'next' on 2010-11-05 at 90b3adf)
+ gitweb/Makefile: Include gitweb/config.mak
+ gitweb/Makefile: Add 'test' and 'test-installed' targets
+ t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
+ gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
(this branch is used by jh/gitweb-caching.)
* jn/send-pack-error (2010-10-16) 1 commit
(merged to 'next' on 2010-11-05 at ef559d4)
+ send-pack: avoid redundant "pack-objects died with strange error"
* kb/completion-checkout (2010-10-12) 1 commit
(merged to 'next' on 2010-11-05 at 6836d70)
+ completion: Support the DWIM mode for git checkout
* kb/maint-diff-ws-check (2010-10-20) 2 commits
(merged to 'next' on 2010-11-05 at 861b5ac)
+ diff: handle lines containing only whitespace and tabs better
+ test-lib: extend test_decode_color to handle more color codes
* kb/maint-submodule-savearg (2010-11-02) 2 commits
(merged to 'next' on 2010-11-05 at 10e1aeb)
+ submodule: only preserve flags across recursive status/update invocations
+ submodule: preserve all arguments exactly when recursing
* ks/no-textconv-symlink (2010-09-29) 3 commits
(merged to 'next' on 2010-11-05 at 32f0580)
+ blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
+ blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
+ blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
(this branch uses jk/no-textconv-symlink.)
* mg/make-prove (2010-10-14) 1 commit
(merged to 'next' on 2010-11-05 at ec4f806)
+ test: allow running the tests under "prove"
* sg/bisect (2010-10-10) 3 commits
(merged to 'next' on 2010-11-05 at 4a8b88d)
+ bisect: check for mandatory argument of 'bisect replay'
+ bisect: improve error msg of 'bisect reset' when original HEAD is deleted
+ bisect: improve error message of 'bisect log' while not bisecting
* sg/completion (2010-10-11) 4 commits
(merged to 'next' on 2010-11-05 at 4967932)
+ bash: support pretty format aliases
+ bash: support more 'git notes' subcommands and their options
+ bash: not all 'git bisect' subcommands make sense when not bisecting
+ bash: offer refs for 'git bisect start'
* tr/maint-git-repack-tmpfile (2010-10-19) 1 commit
(merged to 'next' on 2010-11-05 at 80ad03a)
+ repack: place temporary packs under .git/objects/pack/
* tr/maint-merge-file-subdir (2010-10-17) 2 commits
(merged to 'next' on 2010-11-05 at a2873a4)
+ merge-file: correctly find files when called in subdir
+ prefix_filename(): safely handle the case where pfx_len=0
--------------------------------------------------
[New Topics]
* cb/maint-orphan-merge-noclobber (2010-11-14) 1 commit
(merged to 'next' on 2010-11-15 at 046c5e5)
+ do not overwrite untracked during merge from unborn branch
Will merge to master soonish.
* gb/gitweb-remote-heads (2010-11-11) 11 commits
- git instaweb: enable remote_heads
- gitweb: group remote heads by remote
- gitweb: provide a routine to display (sub)sections
- gitweb: refactor repository URL printing
- gitweb: remotes view for a single remote
- gitweb: allow action specialization in page header
- gitweb: nagivation menu for tags, heads and remotes
- gitweb: separate heads and remotes lists
- gitweb: git_get_heads_list accepts an optional list of refs
- gitweb: introduce remote_heads feature
- gitweb: use fullname as hash_base in heads link
Acked by Jakub. Will merge to next.
* gc/http-with-non-ascii-username-url (2010-11-14) 2 commits
- Fix username and password extraction from HTTP URLs
- t5550: test HTTP authentication and userinfo decoding
Acked by Tay. Will merge to next.
* jk/maint-decorate-01-bool (2010-11-17) 1 commit
- log.decorate: accept 0/1 bool values
(this branch is used by jk/pager-per-command.)
Looked reasonable. Will merge to next.
* jk/pager-per-command (2010-11-17) 1 commit
- allow command-specific pagers in pager.<cmd>
(this branch uses jk/maint-decorate-01-bool.)
Looked reasonable. Will merge to next.
* jn/getenv-poison (2010-11-12) 1 commit
. add GETENV_POISON option to simulate unfriendly getenv()
(this branch uses ks/maint-getenv-fix.)
* jn/gitweb-time-hires-comes-with-5.8 (2010-11-09) 1 commit
- gitweb: Time::HiRes is in core for Perl 5.8
Looked reasonable. Will merge to next.
* jn/ignore-doc (2010-11-10) 2 commits
- Documentation: point to related commands from gitignore
- Documentation: split gitignore page into sections
Looked reasonable. Will merge to next.
* jn/thinner-wrapper (2010-11-06) 7 commits
- Remove pack file handling dependency from wrapper.o
- pack-objects: mark file-local variable static
- wrapper: give zlib wrappers their own translation unit
- strbuf: move strbuf_branchname to sha1_name.c
- path helpers: move git_mkstemp* to wrapper.c
- wrapper: move odb_* to environment.c
- wrapper: move xmmap() to sha1_file.c
Looked reasonable. Will merge to next.
* ks/maint-getenv-fix (2010-11-11) 1 commit
- setup: make sure git_dir path is in a permanent buffer, getenv(3) case
(this branch is used by jn/getenv-poison.)
Looked reasonable. Will merge to next.
* nd/extended-sha1-relpath (2010-11-11) 2 commits
- get_sha1: support relative path ":path" syntax
- Make prefix_path() return char* without const
(this branch uses jn/parse-options-extra.)
Perhaps needs a documentation update.
* nd/maint-fix-add-typo-detection (2010-11-11) 1 commit
- add: do not rely on dtype being NULL behavior
Looked reasonable. Will merge to next.
* rs/opt-help-text (2010-11-08) 8 commits
(merged to 'next' on 2010-11-15 at 631c222)
+ verify-tag: document --verbose
+ branch: improve --verbose description
+ archive: improve --verbose description
+ Describe various forms of "be quiet" using OPT__QUIET
+ add OPT__FORCE
+ add description parameter to OPT__QUIET
+ add description parameter to OPT__DRY_RUN
+ add description parameter to OPT__VERBOSE
Will merge to master soonish.
--------------------------------------------------
[Stalled]
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
* jh/gitweb-caching (2010-11-01) 4 commits
. gitweb: Minimal testing of gitweb caching
. gitweb: File based caching layer (from git.kernel.org)
. gitweb: add output buffering and associated functions
. gitweb: Prepare for splitting gitweb
Temporarily ejected while I shuffled jn/gitweb-testing; will queue the
latest back in pu or perhaps in next.
* tr/config-doc (2010-10-24) 2 commits
. Documentation: complete config list from other manpages
. Documentation: Move variables from config.txt to separate file
This unfortunately heavily conflicts with patches in flight...
--------------------------------------------------
[Cooking]
* ef/mingw-daemon (2010-11-04) 16 commits
(merged to 'next' on 2010-11-17 at 4a295c7)
+ daemon: opt-out on features that require posix
+ daemon: make --inetd and --detach incompatible
+ daemon: use socklen_t
+ mingw: use poll-emulation from gnulib
+ mingw: import poll-emulation from gnulib
+ daemon: get remote host address from root-process
+ Improve the mingw getaddrinfo stub to handle more use cases
+ daemon: use full buffered mode for stderr
+ daemon: use run-command api for async serving
+ mingw: add kill emulation
+ mingw: support waitpid with pid > 0 and WNOHANG
+ mingw: use real pid
+ inet_ntop: fix a couple of old-style decls
+ compat: add inet_pton and inet_ntop prototypes
+ mingw: implement syslog
+ mingw: add network-wrappers for daemon
* jc/abbrev-guard (2010-10-28) 1 commit
- core.abbrevguard: Ensure short object names stay unique a bit longer
Will merge to next.
* jc/emfile (2010-10-28) 2 commits
(merged to 'next' on 2010-11-17 at dac1bc6)
+ A loose object is not corrupt if it cannot be read due to EMFILE
+ read_sha1_file(): report correct name of packfile with a corrupt object
(this branch is used by sp/emfile.)
* sp/emfile (2010-11-01) 2 commits
- Work around EMFILE when there are too many pack files
- Use git_open_noatime when accessing pack data
(this branch uses jc/emfile.)
Will merge to 'next', but might want to restructure the API a bit.
* jl/add-p-reverse-message (2010-10-27) 1 commit
(merged to 'next' on 2010-11-17 at db2ce14)
+ Correct help blurb in checkout -p and friends
* jl/clone-recurse-sm-synonym (2010-11-04) 1 commit
(merged to 'next' on 2010-11-17 at 8c326c2)
+ clone: Add the --recurse-submodules option as alias for --recursive
* jn/cherry-pick-refresh-index (2010-10-31) 1 commit
(merged to 'next' on 2010-11-17 at 75e9103)
+ cherry-pick/revert: transparently refresh index
* jn/parse-options-extra (2010-10-24) 4 commits
- update-index: migrate to parse-options API
- setup: save prefix (original cwd relative to toplevel) in startup_info
- parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
- parse-options: allow git commands to invent new option types
(this branch is used by nd/extended-sha1-relpath.)
Wait for a reroll from Jonathan (2010-11-09).
* md/interix (2010-10-27) 2 commits
(merged to 'next' on 2010-11-17 at 2a8b562)
+ Interix: add configure checks
+ add support for the SUA layer (interix; windows)
* mm/phrase-remote-tracking (2010-11-02) 10 commits
(merged to 'next' on 2010-11-15 at 07d67f4)
+ git-branch.txt: mention --set-upstream as a way to change upstream configuration
+ user-manual: remote-tracking can be checked out, with detached HEAD
+ user-manual.txt: explain better the remote(-tracking) branch terms
+ Change incorrect "remote branch" to "remote tracking branch" in C code
+ Change incorrect uses of "remote branch" meaning "remote-tracking"
+ Change "tracking branch" to "remote-tracking branch"
+ everyday.txt: change "tracking branch" to "remote-tracking branch"
+ Change remote tracking to remote-tracking in non-trivial places
+ Replace "remote tracking" with "remote-tracking"
+ Better "Changed but not updated" message in git-status
Will merge to master soonish.
* nd/setup (2010-11-11) 47 commits
- git.txt: correct where --work-tree path is relative to
- Revert "Documentation: always respect core.worktree if set"
- t0001: test git init when run via an alias
- Remove all logic from get_git_work_tree()
- setup: rework setup_explicit_git_dir()
- setup: clean up setup_discovered_git_dir()
- t1020-subdirectory: test alias expansion in a subdirectory
- setup: clean up setup_bare_git_dir()
- setup: limit get_git_work_tree()'s to explicit setup case only
- Use git_config_early() instead of git_config() during repo setup
- Add git_config_early()
- rev-parse: prints --git-dir relative to user's cwd
- git-rev-parse.txt: clarify --git-dir
- t1510: setup case #31
- t1510: setup case #30
- t1510: setup case #29
- t1510: setup case #28
- t1510: setup case #27
- t1510: setup case #26
- t1510: setup case #25
- t1510: setup case #24
- t1510: setup case #23
- t1510: setup case #22
- t1510: setup case #21
- t1510: setup case #20
- t1510: setup case #19
- t1510: setup case #18
- t1510: setup case #17
- t1510: setup case #16
- t1510: setup case #15
- t1510: setup case #14
- t1510: setup case #13
- t1510: setup case #12
- t1510: setup case #11
- t1510: setup case #10
- t1510: setup case #9
- t1510: setup case #8
- t1510: setup case #7
- t1510: setup case #6
- t1510: setup case #5
- t1510: setup case #4
- t1510: setup case #3
- t1510: setup case #2
- t1510: setup case #1
- t1510: setup case #0
- Add t1510 and basic rules that run repo setup
- builtins: print setup info if repo is found
I have to queue a handful of fixups still in flight.
* rr/needs-clean-work-tree (2010-10-19) 1 commit
(merged to 'next' on 2010-11-17 at b8aee21)
+ Porcelain scripts: Rewrite cryptic "needs update" error message
Will merge to master soonish.
* sn/diff-doc (2010-11-04) 3 commits
- docs: clarify git diff modes of operation
- diff,difftool: Don't use the {0,2} notation in usage strings
- CodingGuidelines: Add a section on writing documentation
Will merge to next.
* kb/maint-rebase-autosquash (2010-11-04) 2 commits
(merged to 'next' on 2010-11-15 at 9b8c830)
+ rebase: teach --autosquash to match on sha1 in addition to message
+ rebase: better rearranging of fixup!/squash! lines with --autosquash
Will merge to master soonish.
* kb/maint-status-cquote (2010-11-08) 1 commit
- status: Quote paths with spaces in short format
Will merge to next.
* mg/maint-tag-rfc1991 (2010-11-10) 5 commits
- tag: recognize rfc1991 signatures
- tag: factor out sig detection for tag display
- tag: factor out sig detection for body edits
- verify-tag: factor out signature detection
- t/t7004-tag: test handling of rfc1991 signatures
Will merge to next.
* ao/send-email-irt (2010-11-12) 2 commits
(merged to 'next' on 2010-11-15 at 257c77a)
+ git-send-email.perl: make initial In-Reply-To apply only to first email
(merged to 'next' on 2010-11-08 at d103166)
+ t9001: send-email interation with --in-reply-to and --chain-reply-to
Will merge to master soonish.
* cm/diff-check-at-eol (2010-10-10) 1 commit
(merged to 'next' on 2010-11-17 at ad7005a)
+ diff --check: correct line numbers of new blank lines at EOF
* fc/apply-p2-get-header-name (2010-10-21) 2 commits
(merged to 'next' on 2010-11-17 at 05a8e94)
+ test: git-apply -p2 rename/chmod only
+ Fix git-apply with -p greater than 1
* jk/add-e-doc (2010-11-08) 2 commits
(merged to 'next' on 2010-11-15 at e971401)
+ docs: give more hints about how "add -e" works
(merged to 'next' on 2010-11-05 at 389fee7)
+ docs: give more hints about how "add -e" works
Will merge to master soonish.
* jk/diff-CBM (2010-10-21) 1 commit
(merged to 'next' on 2010-11-05 at 9d1ec14)
+ diff: report bogus input to -C/-M/-B
Will merge to master soonish.
* jn/fast-import-fix (2010-10-20) 4 commits
(merged to 'next' on 2010-11-17 at ef3b791)
+ fast-import: do not clear notes in do_change_note_fanout()
+ t9300 (fast-import): another test for the "replace root" feature
+ fast-import: tighten M 040000 syntax
+ fast-import: filemodify after M 040000 <tree> "" crashes
* jn/git-cmd-h-bypass-setup (2010-10-22) 7 commits
- update-index -h: show usage even with corrupt index
- merge -h: show usage even with corrupt index
- ls-files -h: show usage even with corrupt index
- gc -h: show usage even with broken configuration
- commit/status -h: show usage even with broken configuration
- checkout-index -h: show usage even in an invalid repository
- branch -h: show usage even in an invalid repository
(this branch uses en/and-cascade-tests.)
Will merge to next.
* kb/blame-author-email (2010-10-15) 1 commit
(merged to 'next' on 2010-11-17 at 6fd6a2f)
+ blame: Add option to show author email instead of name
* np/diff-in-corrupt-repository (2010-10-22) 1 commit
(merged to 'next' on 2010-11-17 at b57a6cb)
+ diff: don't presume empty file when corresponding object is missing
* np/pack-broken-boundary (2010-10-22) 1 commit
(merged to 'next' on 2010-11-17 at 69a9f46)
+ make pack-objects a bit more resilient to repo corruption
* yd/dir-rename (2010-10-29) 5 commits
- Allow hiding renames of individual files involved in a directory rename.
- Unified diff output format for bulk moves.
- Add testcases for the --detect-bulk-moves diffcore flag.
- Raw diff output format for bulk moves.
- Introduce bulk-move detection in diffcore.
Yet to be rerolled.
* en/merge-recursive (2010-11-08) 40 commits
(merged to 'next' on 2010-11-17 at 1b6f865)
+ t6022: Use -eq not = to test output of wc -l
(merged to 'next' on 2010-11-05 at 16902eb)
+ merge-recursive:make_room_for_directories - work around dumb compilers
+ merge-recursive: Remove redundant path clearing for D/F conflicts
+ merge-recursive: Make room for directories in D/F conflicts
+ handle_delete_modify(): Check whether D/F conflicts are still present
+ merge_content(): Check whether D/F conflicts are still present
+ conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
+ conflict_rename_delete(): Check whether D/F conflicts are still present
+ merge-recursive: Delay modify/delete conflicts if D/F conflict present
+ merge-recursive: Delay content merging for renames
+ merge-recursive: Delay handling of rename/delete conflicts
+ merge-recursive: Move handling of double rename of one file to other file
+ merge-recursive: Move handling of double rename of one file to two
+ merge-recursive: Avoid doubly merging rename/add conflict contents
+ merge-recursive: Update merge_content() call signature
+ merge-recursive: Update conflict_rename_rename_1to2() call signature
+ merge-recursive: Structure process_df_entry() to handle more cases
+ merge-recursive: Have process_entry() skip D/F or rename entries
+ merge-recursive: New function to assist resolving renames in-core only
+ merge-recursive: New data structures for deferring of D/F conflicts
+ merge-recursive: Move process_entry's content merging into a function
+ merge-recursive: Move delete/modify handling into dedicated function
+ merge-recursive: Move rename/delete handling into dedicated function
+ merge-recursive: Nuke rename/directory conflict detection
+ merge-recursive: Rename conflict_rename_rename*() for clarity
+ merge-recursive: Small code clarification -- variable name and comments
+ t6036: Add testcase for undetected conflict
+ t6036: Add a second testcase similar to the first but with content changes
+ t6036: Test index and worktree state, not just that merge fails
+ t6020: Add a testcase for modify/delete + directory/file conflict
+ t6020: Modernize style a bit
+ t6022: Add tests for rename/rename combined with D/F conflicts
+ t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)
+ t6022: Add tests with both rename source & dest involved in D/F conflicts
+ t6022: Add tests for reversing order of merges when D/F conflicts present
+ t6022: Add test combinations of {content conflict?, D/F conflict remains?}
+ t6032: Add a test checking for excessive output from merge
+ merge-recursive: Restructure showing how to chain more process_* functions
+ t3030: Add a testcase for resolvable rename/add conflict with symlinks
+ Merge branch 'en/rename-d-f' into en/merge-recursive
(this branch uses en/rename-d-f.)
* il/remote-fd-ext (2010-10-12) 3 commits
(merged to 'next' on 2010-11-05 at 7413413)
+ git-remote-ext
+ git-remote-fd
+ Add bidirectional_transfer_loop()
* ak/apply-non-git-epoch (2010-09-29) 2 commits
(merged to 'next' on 2010-11-17 at a00579c)
+ apply: handle patches with funny filename and colon in timezone
+ apply: Recognize epoch timestamps with : in the timezone
* cb/leading-path-removal (2010-11-15) 6 commits
(merged to 'next' on 2010-11-17 at ec7d709)
+ use persistent memory for rejected paths
(merged to 'next' on 2010-11-05 at 55ea322)
+ do not overwrite files in leading path
+ lstat_cache: optionally return match_len
+ add function check_ok_to_remove()
+ t7607: add leading-path tests
+ t7607: use test-lib functions and check MERGE_HEAD
* jh/notes-merge (2010-11-09) 23 commits
- Provide 'git merge --abort' as a synonym to 'git reset --merge'
- cmd_merge(): Parse options before checking MERGE_HEAD
- Provide 'git notes get-ref' to easily retrieve current notes ref
- git notes merge: Add testcases for merging notes trees at different fanouts
- git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
- git notes merge: --commit should fail if underlying notes ref has moved
- git notes merge: List conflicting notes in notes merge commit message
- git notes merge: Manual conflict resolution, part 2/2
- git notes merge: Manual conflict resolution, part 1/2
- Documentation: Preliminary docs on 'git notes merge'
- git notes merge: Add automatic conflict resolvers (ours, theirs, union)
- git notes merge: Handle real, non-conflicting notes merges
- builtin/notes.c: Refactor creation of notes commits.
- git notes merge: Initial implementation handling trivial merges only
- builtin/notes.c: Split notes ref DWIMmery into a separate function
- notes.c: Use two newlines (instead of one) when concatenating notes
- (trivial) t3303: Indent with tabs instead of spaces for consistency
- notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
- notes.h/c: Allow combine_notes functions to remove notes
- notes.c: Reorder functions in preparation for next commit
- notes.h: Make default_notes_ref() available in notes API
- (trivial) notes.h: Minor documentation fixes to copy_notes()
- notes.c: Hexify SHA1 in die() message from init_notes()
Rerolled; will merge to next.
* pn/commit-autosquash (2010-11-02) 6 commits
- add tests of commit --squash
- commit: --squash option for use with rebase --autosquash
- add tests of commit --fixup
- commit: --fixup option for use with rebase --autosquash
- pretty.c: teach format_commit_message() to reencode the output
- commit: helper methods to reduce redundant blocks of code
Will merge to next.
* jj/icase-directory (2010-10-03) 8 commits
- Support case folding in git fast-import when core.ignorecase=true
- Support case folding for git add when core.ignorecase=true
- Add case insensitivity support when using git ls-files
- Add case insensitivity support for directories when using git status
- Case insensitivity support for .gitignore via core.ignorecase
- Add string comparison functions that respect the ignore_case variable.
- Makefile & configure: add a NO_FNMATCH_CASEFOLD flag
- Makefile & configure: add a NO_FNMATCH flag
Will merge to next.
* en/and-cascade-tests (2010-10-31) 25 commits
(merged to 'next' on 2010-11-15 at d51ec77)
+ t4124 (apply --whitespace): use test_might_fail
+ t3404: do not use 'describe' to implement test_cmp_rev
+ t3404 (rebase -i): introduce helper to check position of HEAD
+ t3404 (rebase -i): move comment to description
+ t3404 (rebase -i): unroll test_commit loops
+ t3301 (notes): use test_expect_code for clarity
+ t1400 (update-ref): use test_must_fail
+ t1502 (rev-parse --parseopt): test exit code from "-h"
+ t6022 (renaming merge): chain test commands with &&
+ test-lib: introduce test_line_count to measure files
+ tests: add missing &&, batch 2
+ tests: add missing &&
+ Introduce sane_unset and use it to ensure proper && chaining
+ t7800 (difftool): add missing &&
+ t7601 (merge-pull-config): add missing &&
+ t7001 (mv): add missing &&
+ t6016 (rev-list-graph-simplify-history): add missing &&
+ t5602 (clone-remote-exec): add missing &&
+ t4026 (color): remove unneeded and unchained command
+ t4019 (diff-wserror): add lots of missing &&
+ t4202 (log): Replace '<git-command> || :' with test_might_fail
+ t4002 (diff-basic): use test_might_fail for commands that might fail
+ t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
+ t4017 (diff-retval): replace manual exit code check with test_expect_code
+ test-lib: make test_expect_code a test command
(this branch is used by jn/git-cmd-h-bypass-setup.)
* nd/struct-pathspec (2010-09-20) 5 commits
- ce_path_match: drop prefix matching in favor of match_pathspec
- Convert ce_path_match() to use struct pathspec
- tree_entry_interesting: turn to match_pathspec if wildcard is present
- pathspec: add tree_recursive_diff parameter
- pathspec: mark wildcard pathspecs from the beginning
(this branch uses en/object-list-with-pathspec.)
This is related to something I have long been wanting to see happen.
Wait Nguyen for another round (2010-11-11).
* en/object-list-with-pathspec (2010-09-20) 8 commits
- Add testcases showing how pathspecs are handled with rev-list --objects
- Make rev-list --objects work together with pathspecs
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initializing pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is used by nd/struct-pathspec.)
* tc/smart-http-post-redirect (2010-09-25) 1 commit
(merged to 'next' on 2010-11-17 at 6478f7f)
+ smart-http: Don't change POST to GET when following redirect
* en/rename-d-f (2010-09-08) 2 commits
+ merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
+ t3509: Add rename + D/F conflict testcase that recursive strategy fails
(this branch is used by en/merge-recursive.)
* jl/fetch-submodule-recursive (2010-11-11) 3 commits
- Submodules: Add the "fetchRecurseSubmodules" config option
- Add the 'fetch.recurseSubmodules' config setting
- fetch/pull: Add the --recurse-submodules option
* tr/merge-unborn-clobber (2010-08-22) 1 commit
- Exhibit merge bug that clobbers index&WT
* ab/i18n (2010-10-07) 161 commits
- po/de.po: complete German translation
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: use libcharset.h instead of langinfo.h when available
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
It is getting ridiculously painful to keep re-resolving the conflicts with
other topics in flight, even with the help with rerere.
Needs a bit more minor work to get the basic code structure right.
^ permalink raw reply [relevance 1%]
* What's cooking in git.git (Nov 2010, #03; Wed, 24)
@ 2010-11-25 3:16 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2010-11-25 3:16 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.
Tonight's pushout may be a bit less stable than usual, as I am pushing
this out without waiting for the usual test cycle I ran on the kernel.org
machine, but hey, small breakage here and there will give something for
people to take a look at when they are bored eating roasted bird ;-)
--------------------------------------------------
[New Topics]
* ef/win32-dirent (2010-11-23) 6 commits
- win32: use our own dirent.h
- msvc: opendir: handle paths ending with a slash
- win32: dirent: handle errors
- msvc: opendir: do not start the search
- msvc: opendir: allocate enough memory
- msvc: opendir: fix malloc-failure
* jk/asciidoc-update (2010-11-19) 1 commit
- docs: default to more modern toolset
* jk/maint-reflog-bottom (2010-11-21) 1 commit
- reflogs: clear flags properly in corner case
* jn/fast-import-ondemand-checkpoint (2010-11-22) 1 commit
- fast-import: treat SIGUSR1 as a request to access objects early
* jn/maint-fast-import-object-reuse (2010-11-23) 1 commit
- fast-import: insert new object entries at start of hash bucket
* jn/maint-svn-fe (2010-10-10) 1 commit
- t9010 (svn-fe): Eliminate dependency on svn perl bindings
* jn/svn-fe (2010-11-19) 17 commits
- vcs-svn: Implement Prop-delta handling
- vcs-svn: Sharpen parsing of property lines
- vcs-svn: Split off function for handling of individual properties
- vcs-svn: Make source easier to read on small screens
- vcs-svn: More dump format sanity checks
- vcs-svn: Reject path nodes without Node-action
- vcs-svn: Delay read of per-path properties
- vcs-svn: Combine repo_replace and repo_modify functions
- vcs-svn: Replace = Delete + Add
- vcs-svn: handle_node: Handle deletion case early
- vcs-svn: Use mark to indicate nodes with included text
- vcs-svn: Unclutter handle_node by introducing have_props var
- vcs-svn: Eliminate node_ctx.mark global
- vcs-svn: Eliminate node_ctx.srcRev global
- vcs-svn: Check for errors from open()
- vcs-svn: Allow simple v3 dumps (no deltas yet)
- vcs-svn: Error out for v3 dumps
Some RFC patches, to give them early and wider exposure.
* mz/rebase-abort-reflog-fix (2010-11-21) 1 commit
- rebase --abort: do not update branch ref
* mz/rebase-i-verify (2010-11-22) 1 commit
- rebase: support --verify
* nd/maint-relative (2010-11-20) 1 commit
- get_cwd_relative(): do not misinterpret root path
* tc/format-patch-p (2010-11-23) 1 commit
- format-patch: page output with --stdout
* tc/http-urls-ends-with-slash (2010-11-22) 7 commits
- http-push: add trailing slash at arg-parse time, instead of later on
- http-push: check path length before using it
- http-push: Normalise directory names when pushing to some WebDAV servers
- http-backend: use end_url_with_slash()
- url: add str wrapper for end_url_with_slash()
- shift end_url_with_slash() from http.[ch] to url.[ch]
- t5550-http-fetch: add missing '&&'
--------------------------------------------------
[Graduated to "master"]
* ao/send-email-irt (2010-11-12) 2 commits
(merged to 'next' on 2010-11-15 at 257c77a)
+ git-send-email.perl: make initial In-Reply-To apply only to first email
(merged to 'next' on 2010-11-08 at d103166)
+ t9001: send-email interation with --in-reply-to and --chain-reply-to
* cb/maint-orphan-merge-noclobber (2010-11-14) 1 commit
(merged to 'next' on 2010-11-15 at 046c5e5)
+ do not overwrite untracked during merge from unborn branch
* ef/mingw-daemon (2010-11-04) 16 commits
(merged to 'next' on 2010-11-17 at 4a295c7)
+ daemon: opt-out on features that require posix
+ daemon: make --inetd and --detach incompatible
+ daemon: use socklen_t
+ mingw: use poll-emulation from gnulib
+ mingw: import poll-emulation from gnulib
+ daemon: get remote host address from root-process
+ Improve the mingw getaddrinfo stub to handle more use cases
+ daemon: use full buffered mode for stderr
+ daemon: use run-command api for async serving
+ mingw: add kill emulation
+ mingw: support waitpid with pid > 0 and WNOHANG
+ mingw: use real pid
+ inet_ntop: fix a couple of old-style decls
+ compat: add inet_pton and inet_ntop prototypes
+ mingw: implement syslog
+ mingw: add network-wrappers for daemon
* en/and-cascade-tests (2010-10-31) 25 commits
(merged to 'next' on 2010-11-15 at d51ec77)
+ t4124 (apply --whitespace): use test_might_fail
+ t3404: do not use 'describe' to implement test_cmp_rev
+ t3404 (rebase -i): introduce helper to check position of HEAD
+ t3404 (rebase -i): move comment to description
+ t3404 (rebase -i): unroll test_commit loops
+ t3301 (notes): use test_expect_code for clarity
+ t1400 (update-ref): use test_must_fail
+ t1502 (rev-parse --parseopt): test exit code from "-h"
+ t6022 (renaming merge): chain test commands with &&
+ test-lib: introduce test_line_count to measure files
+ tests: add missing &&, batch 2
+ tests: add missing &&
+ Introduce sane_unset and use it to ensure proper && chaining
+ t7800 (difftool): add missing &&
+ t7601 (merge-pull-config): add missing &&
+ t7001 (mv): add missing &&
+ t6016 (rev-list-graph-simplify-history): add missing &&
+ t5602 (clone-remote-exec): add missing &&
+ t4026 (color): remove unneeded and unchained command
+ t4019 (diff-wserror): add lots of missing &&
+ t4202 (log): Replace '<git-command> || :' with test_might_fail
+ t4002 (diff-basic): use test_might_fail for commands that might fail
+ t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
+ t4017 (diff-retval): replace manual exit code check with test_expect_code
+ test-lib: make test_expect_code a test command
(this branch is used by jn/git-cmd-h-bypass-setup.)
* jk/add-e-doc (2010-11-08) 2 commits
(merged to 'next' on 2010-11-15 at e971401)
+ docs: give more hints about how "add -e" works
(merged to 'next' on 2010-11-05 at 389fee7)
+ docs: give more hints about how "add -e" works
* kb/maint-rebase-autosquash (2010-11-04) 2 commits
(merged to 'next' on 2010-11-15 at 9b8c830)
+ rebase: teach --autosquash to match on sha1 in addition to message
+ rebase: better rearranging of fixup!/squash! lines with --autosquash
* mm/phrase-remote-tracking (2010-11-02) 10 commits
(merged to 'next' on 2010-11-15 at 07d67f4)
+ git-branch.txt: mention --set-upstream as a way to change upstream configuration
+ user-manual: remote-tracking can be checked out, with detached HEAD
+ user-manual.txt: explain better the remote(-tracking) branch terms
+ Change incorrect "remote branch" to "remote tracking branch" in C code
+ Change incorrect uses of "remote branch" meaning "remote-tracking"
+ Change "tracking branch" to "remote-tracking branch"
+ everyday.txt: change "tracking branch" to "remote-tracking branch"
+ Change remote tracking to remote-tracking in non-trivial places
+ Replace "remote tracking" with "remote-tracking"
+ Better "Changed but not updated" message in git-status
* rs/opt-help-text (2010-11-08) 8 commits
(merged to 'next' on 2010-11-15 at 631c222)
+ verify-tag: document --verbose
+ branch: improve --verbose description
+ archive: improve --verbose description
+ Describe various forms of "be quiet" using OPT__QUIET
+ add OPT__FORCE
+ add description parameter to OPT__QUIET
+ add description parameter to OPT__DRY_RUN
+ add description parameter to OPT__VERBOSE
--------------------------------------------------
[Stalled]
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
* tr/config-doc (2010-10-24) 2 commits
. Documentation: complete config list from other manpages
. Documentation: Move variables from config.txt to separate file
This unfortunately heavily conflicts with patches in flight...
--------------------------------------------------
[Cooking]
* gb/gitweb-remote-heads (2010-11-11) 11 commits
(merged to 'next' on 2010-11-24 at 6fb4a6f)
+ git instaweb: enable remote_heads
+ gitweb: group remote heads by remote
+ gitweb: provide a routine to display (sub)sections
+ gitweb: refactor repository URL printing
+ gitweb: remotes view for a single remote
+ gitweb: allow action specialization in page header
+ gitweb: nagivation menu for tags, heads and remotes
+ gitweb: separate heads and remotes lists
+ gitweb: git_get_heads_list accepts an optional list of refs
+ gitweb: introduce remote_heads feature
+ gitweb: use fullname as hash_base in heads link
* gc/http-with-non-ascii-username-url (2010-11-14) 2 commits
(merged to 'next' on 2010-11-24 at 08f317f)
+ Fix username and password extraction from HTTP URLs
+ t5550: test HTTP authentication and userinfo decoding
* jk/maint-decorate-01-bool (2010-11-17) 1 commit
(merged to 'next' on 2010-11-24 at 347f73b)
+ log.decorate: accept 0/1 bool values
(this branch is used by jk/pager-per-command.)
* jk/pager-per-command (2010-11-17) 1 commit
(merged to 'next' on 2010-11-24 at 9ebcffc)
+ allow command-specific pagers in pager.<cmd>
(this branch uses jk/maint-decorate-01-bool.)
* jn/getenv-poison (2010-11-12) 1 commit
. add GETENV_POISON option to simulate unfriendly getenv()
(this branch uses ks/maint-getenv-fix.)
* jn/gitweb-time-hires-comes-with-5.8 (2010-11-09) 1 commit
(merged to 'next' on 2010-11-24 at 6b91b41)
+ gitweb: Time::HiRes is in core for Perl 5.8
* jn/ignore-doc (2010-11-10) 2 commits
(merged to 'next' on 2010-11-24 at c0a9730)
+ Documentation: point to related commands from gitignore
+ Documentation: split gitignore page into sections
* jn/thinner-wrapper (2010-11-06) 7 commits
(merged to 'next' on 2010-11-24 at 3f2227d)
+ Remove pack file handling dependency from wrapper.o
+ pack-objects: mark file-local variable static
+ wrapper: give zlib wrappers their own translation unit
+ strbuf: move strbuf_branchname to sha1_name.c
+ path helpers: move git_mkstemp* to wrapper.c
+ wrapper: move odb_* to environment.c
+ wrapper: move xmmap() to sha1_file.c
* ks/maint-getenv-fix (2010-11-11) 1 commit
(merged to 'next' on 2010-11-24 at fa89826)
+ setup: make sure git_dir path is in a permanent buffer, getenv(3) case
(this branch is used by jn/getenv-poison.)
* nd/extended-sha1-relpath (2010-11-11) 2 commits
- get_sha1: support relative path ":path" syntax
- Make prefix_path() return char* without const
(this branch uses jn/parse-options-extra.)
* nd/maint-fix-add-typo-detection (2010-11-11) 1 commit
(merged to 'next' on 2010-11-24 at 6832306)
+ add: do not rely on dtype being NULL behavior
* jh/gitweb-caching (2010-11-01) 4 commits
- gitweb: Minimal testing of gitweb caching
- gitweb: File based caching layer (from git.kernel.org)
- gitweb: add output buffering and associated functions
- gitweb: Prepare for splitting gitweb
* jc/abbrev-guard (2010-10-28) 1 commit
(merged to 'next' on 2010-11-24 at f26c943)
+ core.abbrevguard: Ensure short object names stay unique a bit longer
* jc/emfile (2010-10-28) 2 commits
(merged to 'next' on 2010-11-17 at dac1bc6)
+ A loose object is not corrupt if it cannot be read due to EMFILE
+ read_sha1_file(): report correct name of packfile with a corrupt object
(this branch is used by sp/emfile.)
* sp/emfile (2010-11-01) 2 commits
(merged to 'next' on 2010-11-24 at f46d2ce)
+ Work around EMFILE when there are too many pack files
+ Use git_open_noatime when accessing pack data
(this branch uses jc/emfile.)
* jl/add-p-reverse-message (2010-10-27) 1 commit
(merged to 'next' on 2010-11-17 at db2ce14)
+ Correct help blurb in checkout -p and friends
* jl/clone-recurse-sm-synonym (2010-11-04) 1 commit
(merged to 'next' on 2010-11-17 at 8c326c2)
+ clone: Add the --recurse-submodules option as alias for --recursive
* jn/cherry-pick-refresh-index (2010-10-31) 1 commit
(merged to 'next' on 2010-11-17 at 75e9103)
+ cherry-pick/revert: transparently refresh index
* jn/parse-options-extra (2010-10-24) 4 commits
- update-index: migrate to parse-options API
- setup: save prefix (original cwd relative to toplevel) in startup_info
- parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
- parse-options: allow git commands to invent new option types
(this branch is used by nd/extended-sha1-relpath.)
Wait for a reroll from Jonathan (2010-11-09).
* md/interix (2010-10-27) 2 commits
(merged to 'next' on 2010-11-17 at 2a8b562)
+ Interix: add configure checks
+ add support for the SUA layer (interix; windows)
* nd/setup (2010-11-11) 47 commits
- git.txt: correct where --work-tree path is relative to
- Revert "Documentation: always respect core.worktree if set"
- t0001: test git init when run via an alias
- Remove all logic from get_git_work_tree()
- setup: rework setup_explicit_git_dir()
- setup: clean up setup_discovered_git_dir()
- t1020-subdirectory: test alias expansion in a subdirectory
- setup: clean up setup_bare_git_dir()
- setup: limit get_git_work_tree()'s to explicit setup case only
- Use git_config_early() instead of git_config() during repo setup
- Add git_config_early()
- rev-parse: prints --git-dir relative to user's cwd
- git-rev-parse.txt: clarify --git-dir
- t1510: setup case #31
- t1510: setup case #30
- t1510: setup case #29
- t1510: setup case #28
- t1510: setup case #27
- t1510: setup case #26
- t1510: setup case #25
- t1510: setup case #24
- t1510: setup case #23
- t1510: setup case #22
- t1510: setup case #21
- t1510: setup case #20
- t1510: setup case #19
- t1510: setup case #18
- t1510: setup case #17
- t1510: setup case #16
- t1510: setup case #15
- t1510: setup case #14
- t1510: setup case #13
- t1510: setup case #12
- t1510: setup case #11
- t1510: setup case #10
- t1510: setup case #9
- t1510: setup case #8
- t1510: setup case #7
- t1510: setup case #6
- t1510: setup case #5
- t1510: setup case #4
- t1510: setup case #3
- t1510: setup case #2
- t1510: setup case #1
- t1510: setup case #0
- Add t1510 and basic rules that run repo setup
- builtins: print setup info if repo is found
I have to queue a handful of fixups still in flight.
* rr/needs-clean-work-tree (2010-10-19) 1 commit
(merged to 'next' on 2010-11-17 at b8aee21)
+ Porcelain scripts: Rewrite cryptic "needs update" error message
Will merge to master soonish.
* sn/diff-doc (2010-11-04) 3 commits
(merged to 'next' on 2010-11-24 at 77190a5)
+ docs: clarify git diff modes of operation
+ diff,difftool: Don't use the {0,2} notation in usage strings
+ CodingGuidelines: Add a section on writing documentation
* kb/maint-status-cquote (2010-11-08) 1 commit
(merged to 'next' on 2010-11-24 at e15b73d)
+ status: Quote paths with spaces in short format
* mg/maint-tag-rfc1991 (2010-11-10) 5 commits
(merged to 'next' on 2010-11-24 at 03864ed)
+ tag: recognize rfc1991 signatures
+ tag: factor out sig detection for tag display
+ tag: factor out sig detection for body edits
+ verify-tag: factor out signature detection
+ t/t7004-tag: test handling of rfc1991 signatures
* cm/diff-check-at-eol (2010-10-10) 1 commit
(merged to 'next' on 2010-11-17 at ad7005a)
+ diff --check: correct line numbers of new blank lines at EOF
* fc/apply-p2-get-header-name (2010-10-21) 2 commits
(merged to 'next' on 2010-11-17 at 05a8e94)
+ test: git-apply -p2 rename/chmod only
+ Fix git-apply with -p greater than 1
* jk/diff-CBM (2010-10-21) 1 commit
(merged to 'next' on 2010-11-05 at 9d1ec14)
+ diff: report bogus input to -C/-M/-B
Will merge to master soonish.
* jn/fast-import-fix (2010-10-20) 4 commits
(merged to 'next' on 2010-11-17 at ef3b791)
+ fast-import: do not clear notes in do_change_note_fanout()
+ t9300 (fast-import): another test for the "replace root" feature
+ fast-import: tighten M 040000 syntax
+ fast-import: filemodify after M 040000 <tree> "" crashes
* jn/git-cmd-h-bypass-setup (2010-10-22) 7 commits
- update-index -h: show usage even with corrupt index
- merge -h: show usage even with corrupt index
- ls-files -h: show usage even with corrupt index
- gc -h: show usage even with broken configuration
- commit/status -h: show usage even with broken configuration
- checkout-index -h: show usage even in an invalid repository
- branch -h: show usage even in an invalid repository
* kb/blame-author-email (2010-10-15) 1 commit
(merged to 'next' on 2010-11-17 at 6fd6a2f)
+ blame: Add option to show author email instead of name
* np/diff-in-corrupt-repository (2010-10-22) 1 commit
(merged to 'next' on 2010-11-17 at b57a6cb)
+ diff: don't presume empty file when corresponding object is missing
* np/pack-broken-boundary (2010-10-22) 1 commit
(merged to 'next' on 2010-11-17 at 69a9f46)
+ make pack-objects a bit more resilient to repo corruption
* yd/dir-rename (2010-10-29) 5 commits
- Allow hiding renames of individual files involved in a directory rename.
- Unified diff output format for bulk moves.
- Add testcases for the --detect-bulk-moves diffcore flag.
- Raw diff output format for bulk moves.
- Introduce bulk-move detection in diffcore.
Yet to be rerolled.
* en/merge-recursive (2010-11-08) 40 commits
(merged to 'next' on 2010-11-17 at 1b6f865)
+ t6022: Use -eq not = to test output of wc -l
(merged to 'next' on 2010-11-05 at 16902eb)
+ merge-recursive:make_room_for_directories - work around dumb compilers
+ merge-recursive: Remove redundant path clearing for D/F conflicts
+ merge-recursive: Make room for directories in D/F conflicts
+ handle_delete_modify(): Check whether D/F conflicts are still present
+ merge_content(): Check whether D/F conflicts are still present
+ conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
+ conflict_rename_delete(): Check whether D/F conflicts are still present
+ merge-recursive: Delay modify/delete conflicts if D/F conflict present
+ merge-recursive: Delay content merging for renames
+ merge-recursive: Delay handling of rename/delete conflicts
+ merge-recursive: Move handling of double rename of one file to other file
+ merge-recursive: Move handling of double rename of one file to two
+ merge-recursive: Avoid doubly merging rename/add conflict contents
+ merge-recursive: Update merge_content() call signature
+ merge-recursive: Update conflict_rename_rename_1to2() call signature
+ merge-recursive: Structure process_df_entry() to handle more cases
+ merge-recursive: Have process_entry() skip D/F or rename entries
+ merge-recursive: New function to assist resolving renames in-core only
+ merge-recursive: New data structures for deferring of D/F conflicts
+ merge-recursive: Move process_entry's content merging into a function
+ merge-recursive: Move delete/modify handling into dedicated function
+ merge-recursive: Move rename/delete handling into dedicated function
+ merge-recursive: Nuke rename/directory conflict detection
+ merge-recursive: Rename conflict_rename_rename*() for clarity
+ merge-recursive: Small code clarification -- variable name and comments
+ t6036: Add testcase for undetected conflict
+ t6036: Add a second testcase similar to the first but with content changes
+ t6036: Test index and worktree state, not just that merge fails
+ t6020: Add a testcase for modify/delete + directory/file conflict
+ t6020: Modernize style a bit
+ t6022: Add tests for rename/rename combined with D/F conflicts
+ t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)
+ t6022: Add tests with both rename source & dest involved in D/F conflicts
+ t6022: Add tests for reversing order of merges when D/F conflicts present
+ t6022: Add test combinations of {content conflict?, D/F conflict remains?}
+ t6032: Add a test checking for excessive output from merge
+ merge-recursive: Restructure showing how to chain more process_* functions
+ t3030: Add a testcase for resolvable rename/add conflict with symlinks
+ Merge branch 'en/rename-d-f' into en/merge-recursive
(this branch uses en/rename-d-f.)
* il/remote-fd-ext (2010-11-17) 4 commits
(merged to 'next' on 2010-11-24 at ef80cf1)
+ remote-fd/ext: finishing touches after code review
(merged to 'next' on 2010-11-05 at 7413413)
+ git-remote-ext
+ git-remote-fd
+ Add bidirectional_transfer_loop()
* ak/apply-non-git-epoch (2010-09-29) 2 commits
(merged to 'next' on 2010-11-17 at a00579c)
+ apply: handle patches with funny filename and colon in timezone
+ apply: Recognize epoch timestamps with : in the timezone
* cb/leading-path-removal (2010-11-15) 6 commits
(merged to 'next' on 2010-11-17 at ec7d709)
+ use persistent memory for rejected paths
(merged to 'next' on 2010-11-05 at 55ea322)
+ do not overwrite files in leading path
+ lstat_cache: optionally return match_len
+ add function check_ok_to_remove()
+ t7607: add leading-path tests
+ t7607: use test-lib functions and check MERGE_HEAD
* jh/notes-merge (2010-11-09) 23 commits
(merged to 'next' on 2010-11-24 at 6218115)
+ Provide 'git merge --abort' as a synonym to 'git reset --merge'
+ cmd_merge(): Parse options before checking MERGE_HEAD
+ Provide 'git notes get-ref' to easily retrieve current notes ref
+ git notes merge: Add testcases for merging notes trees at different fanouts
+ git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
+ git notes merge: --commit should fail if underlying notes ref has moved
+ git notes merge: List conflicting notes in notes merge commit message
+ git notes merge: Manual conflict resolution, part 2/2
+ git notes merge: Manual conflict resolution, part 1/2
+ Documentation: Preliminary docs on 'git notes merge'
+ git notes merge: Add automatic conflict resolvers (ours, theirs, union)
+ git notes merge: Handle real, non-conflicting notes merges
+ builtin/notes.c: Refactor creation of notes commits.
+ git notes merge: Initial implementation handling trivial merges only
+ builtin/notes.c: Split notes ref DWIMmery into a separate function
+ notes.c: Use two newlines (instead of one) when concatenating notes
+ (trivial) t3303: Indent with tabs instead of spaces for consistency
+ notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
+ notes.h/c: Allow combine_notes functions to remove notes
+ notes.c: Reorder functions in preparation for next commit
+ notes.h: Make default_notes_ref() available in notes API
+ (trivial) notes.h: Minor documentation fixes to copy_notes()
+ notes.c: Hexify SHA1 in die() message from init_notes()
* pn/commit-autosquash (2010-11-02) 6 commits
(merged to 'next' on 2010-11-24 at acc9c78)
+ add tests of commit --squash
+ commit: --squash option for use with rebase --autosquash
+ add tests of commit --fixup
+ commit: --fixup option for use with rebase --autosquash
+ pretty.c: teach format_commit_message() to reencode the output
+ commit: helper methods to reduce redundant blocks of code
* jj/icase-directory (2010-10-03) 8 commits
(merged to 'next' on 2010-11-24 at 0da9385)
+ Support case folding in git fast-import when core.ignorecase=true
+ Support case folding for git add when core.ignorecase=true
+ Add case insensitivity support when using git ls-files
+ Add case insensitivity support for directories when using git status
+ Case insensitivity support for .gitignore via core.ignorecase
+ Add string comparison functions that respect the ignore_case variable.
+ Makefile & configure: add a NO_FNMATCH_CASEFOLD flag
+ Makefile & configure: add a NO_FNMATCH flag
* nd/struct-pathspec (2010-09-20) 5 commits
- ce_path_match: drop prefix matching in favor of match_pathspec
- Convert ce_path_match() to use struct pathspec
- tree_entry_interesting: turn to match_pathspec if wildcard is present
- pathspec: add tree_recursive_diff parameter
- pathspec: mark wildcard pathspecs from the beginning
(this branch uses en/object-list-with-pathspec.)
This is related to something I have long been wanting to see happen.
Wait Nguyen for another round (2010-11-11).
* en/object-list-with-pathspec (2010-09-20) 8 commits
- Add testcases showing how pathspecs are handled with rev-list --objects
- Make rev-list --objects work together with pathspecs
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initializing pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is used by nd/struct-pathspec.)
* tc/smart-http-post-redirect (2010-09-25) 1 commit
(merged to 'next' on 2010-11-17 at 6478f7f)
+ smart-http: Don't change POST to GET when following redirect
* en/rename-d-f (2010-09-08) 2 commits
+ merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
+ t3509: Add rename + D/F conflict testcase that recursive strategy fails
(this branch is used by en/merge-recursive.)
* jl/fetch-submodule-recursive (2010-11-11) 3 commits
- Submodules: Add the "fetchRecurseSubmodules" config option
- Add the 'fetch.recurseSubmodules' config setting
- fetch/pull: Add the --recurse-submodules option
* tr/merge-unborn-clobber (2010-08-22) 1 commit
- Exhibit merge bug that clobbers index&WT
* ab/i18n (2010-10-07) 161 commits
- po/de.po: complete German translation
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: use libcharset.h instead of langinfo.h when available
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
It is getting ridiculously painful to keep re-resolving the conflicts with
other topics in flight, even with the help with rerere.
Needs a bit more minor work to get the basic code structure right.
^ permalink raw reply [relevance 1%]
* [PATCH] handle rename of case only, for windows
@ 2011-01-14 13:41 10% Tim Abell
2011-01-14 14:22 0% ` Erik Faye-Lund
0 siblings, 1 reply; 200+ results
From: Tim Abell @ 2011-01-14 13:41 UTC (permalink / raw)
To: git
Hi folks,
I've never contributed to git before so be gentle :-)
Would someone have the time to help me get this patch into mailine git?
I tripped over a failure to rename files on windows when only the case
has changed. I've created a patch which fixes it for me and doesn't seem
to break on linux or windows. I also created a test to demonstrate the
issue (part of this patch). This test passes on linux and fails on
windows before my patch for mv.c is applied, and passes on both windows
and linux for me after my patch is applied.
The problem with changing the case of a file happens because git mv
checks if the destination filename exists before performing a
move/rename, and on windows lstat reports that the destination file
*does* already exist because it ignores case for this check and
semi-erroneously finds the source file.
The way I've attempted to fix it in my patch is by checking if the inode
of the source and destination are the same before deciding to fail with
a "destination exists" error.
When using "git mv" it is possible to work around the error by using
--force.
I've also seen a problem with windows users pulling from remotes where a
case only rename has been performed which is more problematic as you
have to tell every user how to handle the issue. I'm not sure if I've
managed to fix that case or not.
The fault exists in both the current cygwin git and the current msysgit,
so I figured it would be good to get a patch to upstream (you) so that
it could work everywhere.
I found an email from Linus relating to this issue here:
http://marc.info/?l=git&m=120612172706823 so it's a known problem.
Thanks
Tim Abell
---
builtin/mv.c | 33 ++++++++++++++++++++++-----------
t/t7001-mv.sh | 9 +++++++++
2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 93e8995..6bb262e 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -63,6 +63,7 @@ int cmd_mv(int argc, const char **argv, const char
*prefix)
const char **source, **destination, **dest_path;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
+ struct stat src_st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
git_config(git_default_config, NULL);
@@ -165,17 +166,27 @@ int cmd_mv(int argc, const char **argv, const char
*prefix)
} else if (cache_name_pos(src, length) < 0)
bad = "not under version control";
else if (lstat(dst, &st) == 0) {
- bad = "destination exists";
- if (force) {
- /*
- * only files can overwrite each other:
- * check both source and destination
- */
- if (S_ISREG(st.st_mode) ||
S_ISLNK(st.st_mode)) {
- warning("%s; will overwrite!",
bad);
- bad = NULL;
- } else
- bad = "Cannot overwrite";
+ /* If we are on a case insensitive files= system
(windows) http://is.gd/kyxgg
+ * and we are only changing the case of the file
then lstat for the
+ * destination will return != 0 because it sees
the source file.
+ * To prevent this causing failure, lstat is
used to get the inode of the src
+ * and see if it's actually the same file.
+ */
+ lstat(src, &src_st); //get file serial number
(inode) for source
+ #warning("src inode: %s, dst inode: %s",
src_st.st_ino, st.st_ino);
+ if (src_st.st_ino != st.st_ino) {
+ bad = "destination exists";
+ if (force) {
+ /*
+ * only files can overwrite each
other:
+ * check both source and
destination
+ */
+ if (S_ISREG(st.st_mode) ||
S_ISLNK(st.st_mode)) {
+ warning("%s; will
overwrite!", bad);
+ bad = NULL;
+ } else
+ bad = "Cannot
overwrite";
+ }
}
} else if (string_list_has_string(&src_for_dst, dst))
bad = "multiple sources for the same target";
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..95146bf 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,13 @@ test_expect_success SYMLINKS 'git mv should
overwrite file with a symlink' '
rm -f moved symlink
+test_expect_success 'git mv should not fail when only changing case' '
+
+ rm -fr .git &&
+ git init &&
+ >foo.txt &&
+ git add foo.txt &&
+ git mv foo.txt Foo.txt
+'
+
test_done
--
1.5.6.5
^ permalink raw reply related [relevance 10%]
* [PATCH] handle rename of case only, for windows
@ 2011-01-14 13:44 10% Tim Abell
0 siblings, 0 replies; 200+ results
From: Tim Abell @ 2011-01-14 13:44 UTC (permalink / raw)
To: git
Hi folks,
I've never contributed to git before so be gentle :-)
Would someone have the time to help me get this patch into mailine git?
I tripped over a failure to rename files on windows when only the case
has changed. I've created a patch which fixes it for me and doesn't seem
to break on linux or windows. I also created a test to demonstrate the
issue (part of this patch). This test passes on linux and fails on
windows before my patch for mv.c is applied, and passes on both windows
and linux for me after my patch is applied.
The problem with changing the case of a file happens because git mv
checks if the destination filename exists before performing a
move/rename, and on windows lstat reports that the destination file
*does* already exist because it ignores case for this check and
semi-erroneously finds the source file.
The way I've attempted to fix it in my patch is by checking if the inode
of the source and destination are the same before deciding to fail with
a "destination exists" error.
When using "git mv" it is possible to work around the error by using
--force.
I've also seen a problem with windows users pulling from remotes where a
case only rename has been performed which is more problematic as you
have to tell every user how to handle the issue. I'm not sure if I've
managed to fix that case or not.
The fault exists in both the current cygwin git and the current msysgit,
so I figured it would be good to get a patch to upstream (you) so that
it could work everywhere.
I found an email from Linus relating to this issue here:
http://marc.info/?l=git&m=120612172706823 so it's a known problem.
Thanks
Tim Abell
---
builtin/mv.c | 33 ++++++++++++++++++++++-----------
t/t7001-mv.sh | 9 +++++++++
2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 93e8995..6bb262e 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -63,6 +63,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
const char **source, **destination, **dest_path;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
+ struct stat src_st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
git_config(git_default_config, NULL);
@@ -165,17 +166,27 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
} else if (cache_name_pos(src, length) < 0)
bad = "not under version control";
else if (lstat(dst, &st) == 0) {
- bad = "destination exists";
- if (force) {
- /*
- * only files can overwrite each other:
- * check both source and destination
- */
- if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
- warning("%s; will overwrite!", bad);
- bad = NULL;
- } else
- bad = "Cannot overwrite";
+ /* If we are on a case insensitive files= system (windows) http://is.gd/kyxgg
+ * and we are only changing the case of the file then lstat for the
+ * destination will return != 0 because it sees the source file.
+ * To prevent this causing failure, lstat is used to get the inode of the src
+ * and see if it's actually the same file.
+ */
+ lstat(src, &src_st); //get file serial number (inode) for source
+ #warning("src inode: %s, dst inode: %s", src_st.st_ino, st.st_ino);
+ if (src_st.st_ino != st.st_ino) {
+ bad = "destination exists";
+ if (force) {
+ /*
+ * only files can overwrite each other:
+ * check both source and destination
+ */
+ if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
+ warning("%s; will overwrite!", bad);
+ bad = NULL;
+ } else
+ bad = "Cannot overwrite";
+ }
}
} else if (string_list_has_string(&src_for_dst, dst))
bad = "multiple sources for the same target";
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..95146bf 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,13 @@ test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -f moved symlink
+test_expect_success 'git mv should not fail when only changing case' '
+
+ rm -fr .git &&
+ git init &&
+ >foo.txt &&
+ git add foo.txt &&
+ git mv foo.txt Foo.txt
+'
+
test_done
--
1.5.6.5
^ permalink raw reply related [relevance 10%]
* [PATCH] handle rename of case only, for windows (resend)
@ 2011-01-14 13:54 10% Tim Abell
0 siblings, 0 replies; 200+ results
From: Tim Abell @ 2011-01-14 13:54 UTC (permalink / raw)
To: git
Sorry folks, resending because my mail client wrapped the lines in my
patch on my first attempt.
If there's any more problems with the way I've sent it you can grab a
copy from http://is.gd/iWupI8
Tim
--------
Hi folks,
I've never contributed to git before so be gentle :-)
Would someone have the time to help me get this patch into mailine git?
I tripped over a failure to rename files on windows when only the case
has changed. I've created a patch which fixes it for me and doesn't seem
to break on linux or windows. I also created a test to demonstrate the
issue (part of this patch). This test passes on linux and fails on
windows before my patch for mv.c is applied, and passes on both windows
and linux for me after my patch is applied.
The problem with changing the case of a file happens because git mv
checks if the destination filename exists before performing a
move/rename, and on windows lstat reports that the destination file
*does* already exist because it ignores case for this check and
semi-erroneously finds the source file.
The way I've attempted to fix it in my patch is by checking if the inode
of the source and destination are the same before deciding to fail with
a "destination exists" error.
When using "git mv" it is possible to work around the error by using
--force.
I've also seen a problem with windows users pulling from remotes where a
case only rename has been performed which is more problematic as you
have to tell every user how to handle the issue. I'm not sure if I've
managed to fix that case or not.
The fault exists in both the current cygwin git and the current msysgit,
so I figured it would be good to get a patch to upstream (you) so that
it could work everywhere.
I found an email from Linus relating to this issue here:
http://marc.info/?l=git&m=120612172706823 so it's a known problem.
Thanks
Tim Abell
---
builtin/mv.c | 33 ++++++++++++++++++++++-----------
t/t7001-mv.sh | 9 +++++++++
2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 93e8995..6bb262e 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -63,6 +63,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
const char **source, **destination, **dest_path;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
+ struct stat src_st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
git_config(git_default_config, NULL);
@@ -165,17 +166,27 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
} else if (cache_name_pos(src, length) < 0)
bad = "not under version control";
else if (lstat(dst, &st) == 0) {
- bad = "destination exists";
- if (force) {
- /*
- * only files can overwrite each other:
- * check both source and destination
- */
- if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
- warning("%s; will overwrite!", bad);
- bad = NULL;
- } else
- bad = "Cannot overwrite";
+ /* If we are on a case insensitive files= system (windows) http://is.gd/kyxgg
+ * and we are only changing the case of the file then lstat for the
+ * destination will return != 0 because it sees the source file.
+ * To prevent this causing failure, lstat is used to get the inode of the src
+ * and see if it's actually the same file.
+ */
+ lstat(src, &src_st); //get file serial number (inode) for source
+ #warning("src inode: %s, dst inode: %s", src_st.st_ino, st.st_ino);
+ if (src_st.st_ino != st.st_ino) {
+ bad = "destination exists";
+ if (force) {
+ /*
+ * only files can overwrite each other:
+ * check both source and destination
+ */
+ if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
+ warning("%s; will overwrite!", bad);
+ bad = NULL;
+ } else
+ bad = "Cannot overwrite";
+ }
}
} else if (string_list_has_string(&src_for_dst, dst))
bad = "multiple sources for the same target";
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..95146bf 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,13 @@ test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -f moved symlink
+test_expect_success 'git mv should not fail when only changing case' '
+
+ rm -fr .git &&
+ git init &&
+ >foo.txt &&
+ git add foo.txt &&
+ git mv foo.txt Foo.txt
+'
+
test_done
--
1.5.6.5
^ permalink raw reply related [relevance 10%]
* Re: [PATCH] handle rename of case only, for windows
2011-01-14 13:41 10% [PATCH] handle rename of case only, for windows Tim Abell
@ 2011-01-14 14:22 0% ` Erik Faye-Lund
0 siblings, 0 replies; 200+ results
From: Erik Faye-Lund @ 2011-01-14 14:22 UTC (permalink / raw)
To: Tim Abell; +Cc: git, msysGit
On Fri, Jan 14, 2011 at 2:41 PM, Tim Abell <tim@timwise.co.uk> wrote:
> Hi folks,
>
> I've never contributed to git before so be gentle :-)
>
> Would someone have the time to help me get this patch into mailine git?
>
First of all, welcome!
There are some problems with your patch that aren't directly related
to the code:
- It's become white-space damaged, most likely from when you e-mailed
it. Perhaps you could try again with git-send-email?
- There's no real commit-message. This e-mail description isn't really
suited as a commit message as it is, IMO. It might just be a matter of
snipping away some stuff, though.
- The patch lacks a sign-off
- Since this is a Windows-issue, it would be nice if you CC'ed
msysgit@googlegroups.com as well. I've done that for now.
I suggest you read through Documentation/SubmittingPatches to get to
know the process.
> I tripped over a failure to rename files on windows when only the case
> has changed. I've created a patch which fixes it for me and doesn't seem
> to break on linux or windows. I also created a test to demonstrate the
> issue (part of this patch). This test passes on linux and fails on
> windows before my patch for mv.c is applied, and passes on both windows
> and linux for me after my patch is applied.
>
> The problem with changing the case of a file happens because git mv
> checks if the destination filename exists before performing a
> move/rename, and on windows lstat reports that the destination file
> *does* already exist because it ignores case for this check and
> semi-erroneously finds the source file.
>
<snip>
> When using "git mv" it is possible to work around the error by using
> --force.
>
Your reasoning seems to match what we've discussed on the msysGit
mailing list. Good work, and a clear description.
> The way I've attempted to fix it in my patch is by checking if the inode
> of the source and destination are the same before deciding to fail with
> a "destination exists" error.
>
Hmm, not so good. st_ino is always 0 on Windows, so this would make
false positives, no?
> The fault exists in both the current cygwin git and the current msysgit,
> so I figured it would be good to get a patch to upstream (you) so that
> it could work everywhere.
>
It also affects MacOS X, AFAIK. So yes, it'd be good for upstream.
> ---
> builtin/mv.c | 33 ++++++++++++++++++++++-----------
> t/t7001-mv.sh | 9 +++++++++
> 2 files changed, 31 insertions(+), 11 deletions(-)
>
> diff --git a/builtin/mv.c b/builtin/mv.c
> index 93e8995..6bb262e 100644
> --- a/builtin/mv.c
> +++ b/builtin/mv.c
> @@ -63,6 +63,7 @@ int cmd_mv(int argc, const char **argv, const char
> *prefix)
> const char **source, **destination, **dest_path;
> enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
> struct stat st;
> + struct stat src_st;
Couldn't this be moved inside the scope around "cache_name_pos"?
That's the only scope it is valid inside anyway...
And if not, perhaps you could piggy-back on the st-definition, like this:
- struct stat st;
+ struct stat st, src_st;
> struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
>
> git_config(git_default_config, NULL);
> @@ -165,17 +166,27 @@ int cmd_mv(int argc, const char **argv, const char
> *prefix)
> } else if (cache_name_pos(src, length) < 0)
> bad = "not under version control";
> else if (lstat(dst, &st) == 0) {
> - bad = "destination exists";
> - if (force) {
> - /*
> - * only files can overwrite each other:
> - * check both source and destination
> - */
> - if (S_ISREG(st.st_mode) ||
> S_ISLNK(st.st_mode)) {
> - warning("%s; will overwrite!",
> bad);
> - bad = NULL;
> - } else
> - bad = "Cannot overwrite";
> + /* If we are on a case insensitive files= system
> (windows) http://is.gd/kyxgg
Perhaps you could use the full URL (and maybe put it in the commit
message insted)? It'd be nice if we could reach this information even
if is.gd disappears...
> + * and we are only changing the case of the file
> then lstat for the
> + * destination will return != 0 because it sees
> the source file.
> + * To prevent this causing failure, lstat is
> used to get the inode of the src
> + * and see if it's actually the same file.
> + */
> + lstat(src, &src_st); //get file serial number
> (inode) for source
> + #warning("src inode: %s, dst inode: %s",
> src_st.st_ino, st.st_ino);
Uhm, is this debug-leftovers? #warning is a preprocessor-construct,
and it can't understand varaibles in c. Especially not formatted as
strings. Can #warning even do varags? :P
Blah, it's too tiresome to review this white-space broken version, and
I seen now that you have re-posted a non-broken version. Thanks!
^ permalink raw reply [relevance 0%]
* [PATCH] Handle rename of case only, for Windows
@ 2011-01-29 23:45 9% Tim Abell
0 siblings, 0 replies; 200+ results
From: Tim Abell @ 2011-01-29 23:45 UTC (permalink / raw)
To: git; +Cc: Erik Faye-Lund, Nguyen Thai Ngoc Duy, msysGit
>From ddab003ede9f25d93f4e7eea833523a0aa29d16d Mon Sep 17 00:00:00 2001
From: Tim Abell <tim@timwise.co.uk>
Date: Thu, 27 Jan 2011 22:53:31 +0000
Subject: [PATCH] Handle rename of case only, for Windows
Added test to show rename failing in windows.
Added test to show that this patch doesn't break protection against overwriting
an existing file, and another to show that "mv --force" still works.
Altered mv.c to check whether the source and destination file are actually
the same file based on inode number before failing.
If the inode is zero then the data is no use so old behaviour is maintained.
A message from Linus on the subject:
http://kerneltrap.org/mailarchive/git/2008/3/21/1220814
(apparently he never got the energy :-)
Signed-off-by: Tim Abell <tim@timwise.co.uk>
---
Hi folks, this is my second attempt at providing a useful patch for this issue.
Thanks for all the great feedback from my first attempt. I've attempted to address the problems raised.
Hopefully my commit message is more like what is needed this time.
I hadn't realised before that you can split the commit message from this bit with the "---".
>Hmm, not so good. st_ino is always 0 on Windows, so this would make
>false positives, no?
I tested this on windows 7 under cygwin (which is what I have available) and st_ino reports real numbers for me, I also tested that attempting to overwrite another file without --force still fails and added a new test case for this scenario. I have now made sure that if zero is returned then git won't accidentally overwrite other files as I hadn't thought of this before. So this patch shouldn't be regressive even if other versions of windows or other filesystems don't provide valid inode data.
Adding the following line after "lstat(src, &src_st);" shows the inode numbers when calling git mv:
printf("src inode: %lu, dst inode: %lu", (unsigned long) src_st.st_ino, (unsigned long) st.st_ino);
And here is my ouput showing it in action:
$ git mv foo.txt bar.txt
fatal: destination exists, source=foo.txt, destination=bar.txt
src inode: 67064, dst inode: 229369
$ git mv foo.txt Foo.txt
src inode: 67064, dst inode: 67064
>I wonder if we can make lstat_case() that would only return 0 if it
>matches exactly the filename, even on FAT. FindFirstFile/FindNextFile
>should return true file name, I think. If not, we can make
>lstat_case() take two paths (src and dst) and move all inode
>comparison code in there. Much cleaner.
I'm afraid this is a bit beyond me at the moment, but I'm fairly happy with the solution I have. Thanks for the feedback though.
>Couldn't this be moved inside the scope around "cache_name_pos"?
>That's the only scope it is valid inside anyway...
Done. I wasn't sure about this initially as I'm not very experienced with C programming. Thanks for the pointer.
>Perhaps you could use the full URL (and maybe put it in the commit
>message insted)? It'd be nice if we could reach this information even
>if is.gd disappears...
Good point. I've put the full url in the commit message instead.
>Uhm, is this debug-leftovers? #warning is a preprocessor-construct,
>and it can't understand varaibles in c. Especially not formatted as
>strings. Can #warning even do varags? :P
Yes, it was a debug line. Doh! Complete chance that it compiled, I've been doing too much bash scripting recently it seems. I've stripped it out. A better version is available above should anyone want to see the inode numbers.
Thanks all, I welcome any more feedback.
Does this now look like something that anyone on the git project would like to pick up as a contribution?
Yours
Tim Abell
builtin/mv.c | 32 +++++++++++++++++++++-----------
t/t7001-mv.sh | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 11 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index cdbb094..c2f726a 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -165,17 +165,27 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
} else if (cache_name_pos(src, length) < 0)
bad = "not under version control";
else if (lstat(dst, &st) == 0) {
- bad = "destination exists";
- if (force) {
- /*
- * only files can overwrite each other:
- * check both source and destination
- */
- if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
- warning("%s; will overwrite!", bad);
- bad = NULL;
- } else
- bad = "Cannot overwrite";
+ /* If we are on a case insensitive file system (windows) and we are only
+ * changing the case of the file then lstat for the destination will
+ * return != 0 because it sees the source file.
+ * To prevent this causing failure, lstat is used to get the inode of the src
+ * and see if it's actually the same file as dst. If the inode == 0 then
+ * we can't tell whether it is the same file so we fail regardless. */
+ struct stat src_st;
+ lstat(src, &src_st);
+ if (src_st.st_ino == 0 || src_st.st_ino != st.st_ino) {
+ bad = "destination exists";
+ if (force) {
+ /*
+ * only files can overwrite each other:
+ * check both source and destination
+ */
+ if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
+ warning("%s; will overwrite!", bad);
+ bad = NULL;
+ } else
+ bad = "Cannot overwrite";
+ }
}
} else if (string_list_has_string(&src_for_dst, dst))
bad = "multiple sources for the same target";
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 65a35d9..abaecb6 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,39 @@ test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -f moved symlink
+test_expect_success 'git mv should not fail when only changing case' '
+
+ rm -fr .git &&
+ git init &&
+ >foo.txt &&
+ git add foo.txt &&
+ git mv foo.txt Foo.txt
+'
+
+rm *.txt
+
+test_expect_success 'git mv should not overwrite existing file' '
+
+ rm -fr .git &&
+ git init &&
+ >foo.txt &&
+ >bar.txt &&
+ git add foo.txt &&
+ test_must_fail git mv foo.txt bar.txt
+'
+
+rm *.txt
+
+test_expect_success 'git mv -f should overwrite existing file' '
+
+ rm -fr .git &&
+ git init &&
+ >foo.txt &&
+ >bar.txt &&
+ git add foo.txt &&
+ git mv -f foo.txt bar.txt
+'
+
+rm *.txt
+
test_done
--
1.7.3.5.3.g2b35a
^ permalink raw reply related [relevance 9%]
* [ANNOUNCE] Git 1.7.4
@ 2011-01-31 5:05 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2011-01-31 5:05 UTC (permalink / raw)
To: git
The latest feature release Git 1.7.4 is available at the usual
places:
http://www.kernel.org/pub/software/scm/git/
git-1.7.4.tar.{gz,bz2} (source tarball)
git-htmldocs-1.7.4.tar.{gz,bz2} (preformatted docs)
git-manpages-1.7.4.tar.{gz,bz2} (preformatted docs)
The RPM binary packages for a few architectures are found in:
RPMS/$arch/git-*-1.7.4-1.fc13.$arch.rpm (RPM)
Git v1.7.4 Release Notes
========================
Updates since v1.7.3
--------------------
* The documentation Makefile now assumes by default asciidoc 8 and
docbook-xsl >= 1.73. If you have older versions, you can set
ASCIIDOC7 and ASCIIDOC_ROFF, respectively.
* The option parsers of various commands that create new branches (or
rename existing ones to a new name) were too loose and users were
allowed to give a branch a name that begins with a dash by creative
abuse of their command line options, which only led to burning
themselves. The name of a branch cannot begin with a dash now.
* System-wide fallback default attributes can be stored in
/etc/gitattributes; the core.attributesfile configuration variable can
be used to customize the path to this file.
* The thread structure generated by "git send-email" has changed
slightly. Setting the cover letter of the latest series as a reply
to the cover letter of the previous series with --in-reply-to used
to make the new cover letter and all the patches replies to the
cover letter of the previous series; this has been changed to make
the patches in the new series replies to the new cover letter.
* The Bash completion script in contrib/ has been adjusted to be usable with
Bash 4 (options with '=value' didn't complete). It has been also made
usable with zsh.
* Different pagers can be chosen depending on which subcommand is
being run under the pager, using the "pager.<subcommand>" variable.
* The hardcoded tab-width of 8 that is used in whitespace breakage checks is now
configurable via the attributes mechanism.
* Support of case insensitive filesystems (i.e. "core.ignorecase") has
been improved. For example, the gitignore mechanism didn't pay attention
to case insensitivity.
* The <tree>:<path> syntax for naming a blob in a tree, and the :<path>
syntax for naming a blob in the index (e.g. "master:Makefile",
":hello.c") have been extended. You can start <path> with "./" to
implicitly have the (sub)directory you are in prefixed to the
lookup. Similarly, ":../Makefile" from a subdirectory would mean
"the Makefile of the parent directory in the index".
* "git blame" learned the --show-email option to display the e-mail
addresses instead of the names of authors.
* "git commit" learned the --fixup and --squash options to help later invocation
of interactive rebase.
* Command line options to "git cvsimport" whose names are in capital
letters (-A, -M, -R and -S) can now be specified as the default in
the .git/config file by their longer names (cvsimport.authorsFile,
cvsimport.mergeRegex, cvsimport.trackRevisions, cvsimport.ignorePaths).
* "git daemon" can be built in the MinGW environment.
* "git daemon" can take more than one --listen option to listen to
multiple addresses.
* "git describe --exact-match" was optimized not to read commit
objects unnecessarily.
* "git diff" and "git grep" learned what functions and subroutines
in Fortran, Pascal and Perl look like.
* "git fetch" learned the "--recurse-submodules" option.
* "git mergetool" tells vim/gvim to show a three-way diff by default
(use vimdiff2/gvimdiff2 as the tool name for old behavior).
* "git log -G<pattern>" limits the output to commits whose change has
added or deleted lines that match the given pattern.
* "git read-tree" with no argument as a way to empty the index is
deprecated; we might want to remove it in the future. Users can
use the new --empty option to be more explicit instead.
* "git repack -f" does not spend cycles to recompress objects in the
non-delta representation anymore (use -F if you really mean it
e.g. after you changed the core.compression variable setting).
* "git merge --log" used to limit the resulting merge log to 20
entries; this is now customizable by giving e.g. "--log=47".
* "git merge" may work better when all files were moved out of a
directory in one branch while a new file is created in place of that
directory in the other branch.
* "git merge" learned the "--abort" option, synonymous to
"git reset --merge" when a merge is in progress.
* "git notes" learned the "merge" subcommand to merge notes refs.
In addition to the default manual conflict resolution, there are
also several notes merge strategies for automatically resolving
notes merge conflicts.
* "git rebase --autosquash" can use SHA-1 object names to name the
commit which is to be fixed up (e.g. "fixup! e83c5163").
* The default "recursive" merge strategy learned the --rename-threshold
option to influence the rename detection, similar to the -M option
of "git diff". From the "git merge" frontend, the "-X<strategy option>"
interface, e.g. "git merge -Xrename-threshold=50% ...", can be used
to trigger this.
* The "recursive" strategy also learned to ignore various whitespace
changes; the most notable is -Xignore-space-at-eol.
* "git send-email" learned "--to-cmd", similar to "--cc-cmd", to read
the recipient list from a command output.
* "git send-email" learned to read and use "To:" from its input files.
* you can extend "git shell", which is often used on boxes that allow
git-only login over ssh as login shell, with a custom set of
commands.
* The current branch name in "git status" output can be colored differently
from the generic header color by setting the "color.status.branch" variable.
* "git submodule sync" updates metainformation for all submodules,
not just the ones that have been checked out.
* gitweb can use a custom 'highlight' command with its configuration file.
* other gitweb updates.
Also contains various documentation updates.
Fixes since v1.7.3
------------------
All of the fixes in the v1.7.3.X maintenance series are included in this
release, unless otherwise noted.
* "git log --author=me --author=her" did not find commits written by
me or by her; instead it looked for commits written by me and by
her, which is impossible.
* "git push --progress" shows progress indicators now.
* "git rebase -i" showed a confusing error message when given a
branch name that does not exist.
* "git repack" places its temporary packs under $GIT_OBJECT_DIRECTORY/pack
instead of $GIT_OBJECT_DIRECTORY/ to avoid cross directory renames.
* "git submodule update --recursive --other-flags" passes flags down
to its subinvocations.
----------------------------------------------------------------
Changes since v1.7.3 are as follows:
Adam Tkac (1):
Don't pass "--xhtml" to hightlight in gitweb.perl script.
Alan Raison (1):
contrib/hooks/post-receive-email: fix return values from prep_for_email
Alejandro R. Sedeño (1):
Add --force to git-send-email documentation
Aleksi Aalto (1):
status: show branchname with a configurable color
Alexander Sulfrian (2):
daemon: add helper function named_sock_setup
daemon: allow more than one host address given via --listen
Alexandre Erwin Ittner (1):
gitk: Add Brazilian Portuguese (pt-BR) translation
Alexey Shumkin (1):
userdiff: match Pascal class methods
Anders Kaseorg (6):
apply: Recognize epoch timestamps with : in the timezone
describe: Use for_each_rawref
describe: Do not use a flex array in struct commit_name
describe: Store commit_names in a hash table by commit SHA1
describe: Delay looking up commits until searching for an inexact match
Mark gitk script executable
Andreas Gruenbacher (1):
Clarify and extend the "git diff" format documentation
Andreas Köhler (1):
submodule sync: Update "submodule.<name>.url" for empty directories
Andrew Waters (1):
Fix handling of git-p4 on deleted files
Antonio Ospite (3):
t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To'
git-send-email.perl: make initial In-Reply-To apply only to first email
t/t9001-send-email.sh: fix '&&' chain in some tests
Bert Wesarg (1):
Documentation: update-index: -z applies also to --index-info
Björn Steinbrink (1):
Correctly report corrupted objects
Brandon Casey (13):
userdiff.c: add builtin fortran regex patterns
t/t3903-stash: improve testing of git-stash show
builtin/revert.c: don't dereference a NULL pointer
wt-status.c: don't leak directory entries when processing untracked,ignored
git-send-email.perl: ensure $domain is defined before using it
diffcore-pickaxe.c: remove unnecessary curly braces
diffcore-pickaxe.c: a void function shouldn't try to return something
test-lib.sh/test_decode_color(): use octal not hex in awk script
Makefile: add NO_FNMATCH_CASEFOLD to IRIX sections
t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
trace.c: ensure NULL is not passed to printf
t0001,t1510,t3301: use sane_unset which always returns with status 0
t3032: limit sed branch labels to 8 characters
Brian Gernhardt (3):
git-stash: fix flag parsing
t/gitweb-lib: Don't pass constant to decode_utf8
t6022: Use -eq not = to test output of wc -l
Christian Couder (1):
t6050 (replace): fix bogus "fetch branch with replacement" test
Christoph Mallon (1):
diff --check: correct line numbers of new blank lines at EOF
Christopher Wilson (1):
Enable highlight executable path as a configuration option
Clemens Buchacher (15):
add rebase patch id tests
do not search functions for patch ID
t7607: use test-lib functions and check MERGE_HEAD
t7607: add leading-path tests
add function check_ok_to_remove()
lstat_cache: optionally return match_len
do not overwrite files in leading path
do not overwrite untracked during merge from unborn branch
use persistent memory for rejected paths
t7607: use test-lib functions and check MERGE_HEAD
t7607: add leading-path tests
add function check_ok_to_remove()
lstat_cache: optionally return match_len
do not overwrite files in leading path
use persistent memory for rejected paths
Cliff Frey (1):
documentation: git-config minor cleanups
Dan McGee (3):
mergetool-lib: combine vimdiff and gvimdiff run blocks
mergetool-lib: add a three-way diff view for vim/gvim
mergetool-lib: make the three-way diff the default for vim/gvim
Daniel Knittl-Frank (1):
Improvements to `git checkout -h`
David Barr (3):
fast-import: Allow filemodify to set the root
fast-import: insert new object entries at start of hash bucket
fast-import: let importers retrieve blobs
David Kågedal (1):
git-blame.el: Add (require 'format-spec)
Diego Elio Pettenò (1):
imap-send: link against libcrypto for HMAC and others
Elijah Newren (54):
Document pre-condition for tree_entry_interesting
tree-walk: Correct bitrotted comment about tree_entry()
tree_entry_interesting(): Make return value more specific
diff_tree(): Skip skip_uninteresting() when all remaining paths interesting
t3509: Add rename + D/F conflict testcase that recursive strategy fails
merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
t6032: Add a test checking for excessive output from merge
t6022: Add test combinations of {content conflict?, D/F conflict remains?}
t6022: Add tests for reversing order of merges when D/F conflicts present
t6022: Add tests with both rename source & dest involved in D/F conflicts
t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)
t6022: Add tests for rename/rename combined with D/F conflicts
t6020: Modernize style a bit
t6020: Add a testcase for modify/delete + directory/file conflict
t6036: Test index and worktree state, not just that merge fails
t6036: Add a second testcase similar to the first but with content changes
t6036: Add testcase for undetected conflict
merge-recursive: Small code clarification -- variable name and comments
merge-recursive: Rename conflict_rename_rename*() for clarity
merge-recursive: Nuke rename/directory conflict detection
merge-recursive: Move rename/delete handling into dedicated function
merge-recursive: Move delete/modify handling into dedicated function
merge-recursive: Move process_entry's content merging into a function
merge-recursive: New data structures for deferring of D/F conflicts
merge-recursive: New function to assist resolving renames in-core only
merge-recursive: Have process_entry() skip D/F or rename entries
merge-recursive: Structure process_df_entry() to handle more cases
merge-recursive: Update conflict_rename_rename_1to2() call signature
merge-recursive: Update merge_content() call signature
merge-recursive: Avoid doubly merging rename/add conflict contents
merge-recursive: Move handling of double rename of one file to two
merge-recursive: Move handling of double rename of one file to other file
merge-recursive: Delay handling of rename/delete conflicts
merge-recursive: Delay content merging for renames
merge-recursive: Delay modify/delete conflicts if D/F conflict present
conflict_rename_delete(): Check whether D/F conflicts are still present
conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
merge_content(): Check whether D/F conflicts are still present
handle_delete_modify(): Check whether D/F conflicts are still present
merge-recursive: Make room for directories in D/F conflicts
merge-recursive: Remove redundant path clearing for D/F conflicts
t3020 (ls-files-error-unmatch): remove stray '1' from end of file
t4017 (diff-retval): replace manual exit code check with test_expect_code
t100[12] (read-tree-m-2way, read_tree_m_u_2way): add missing &&
t4002 (diff-basic): use test_might_fail for commands that might fail
t4202 (log): Replace '<git-command> || :' with test_might_fail
t4019 (diff-wserror): add lots of missing &&
t4026 (color): remove unneeded and unchained command
t5602 (clone-remote-exec): add missing &&
t6016 (rev-list-graph-simplify-history): add missing &&
t7001 (mv): add missing &&
t7601 (merge-pull-config): add missing &&
t7800 (difftool): add missing &&
Introduce sane_unset and use it to ensure proper && chaining
Eric Sunshine (5):
Side-step sed line-ending "corruption" leading to t6038 failure.
Side-step MSYS-specific path "corruption" leading to t5560 failure.
Fix 'clone' failure at DOS root directory.
Fix Windows-specific macro redefinition warning.
Add MinGW-specific execv() override.
Eric Wong (1):
Documentation/git-svn: discourage "noMetadata"
Erik Faye-Lund (23):
mingw: do not crash on open(NULL, ...)
do not depend on signed integer overflow
inet_ntop: fix a couple of old-style decls
mingw: use real pid
mingw: support waitpid with pid > 0 and WNOHANG
mingw: add kill emulation
daemon: use run-command api for async serving
daemon: use full buffered mode for stderr
daemon: get remote host address from root-process
mingw: import poll-emulation from gnulib
mingw: use poll-emulation from gnulib
daemon: use socklen_t
daemon: make --inetd and --detach incompatible
daemon: opt-out on features that require posix
msvc: opendir: fix malloc-failure
msvc: opendir: allocate enough memory
msvc: opendir: do not start the search
win32: dirent: handle errors
msvc: opendir: handle paths ending with a slash
win32: use our own dirent.h
mingw: do not set errno to 0 on success
help: always suggest common-cmds if prefix of cmd
exec_cmd: remove unused extern
Federico Cuello (1):
Fix git-apply with -p greater than 1
Gabriel Corona (2):
t5550: test HTTP authentication and userinfo decoding
Fix username and password extraction from HTTP URLs
Giuseppe Bilotta (16):
gitweb: use fullname as hash_base in heads link
gitweb: introduce remote_heads feature
gitweb: git_get_heads_list accepts an optional list of refs
gitweb: separate heads and remotes lists
gitweb: nagivation menu for tags, heads and remotes
gitweb: allow action specialization in page header
gitweb: remotes view for a single remote
gitweb: refactor repository URL printing
gitweb: provide a routine to display (sub)sections
gitweb: group remote heads by remote
git instaweb: enable remote_heads
web--browse: coding style
web--browse: split valid_tool list
web--browse: support opera, seamonkey and elinks
web--browse: better support for chromium
CodingGuidelines: mention whitespace preferences for shell scripts
Greg Brockman (4):
Allow creation of arbitrary git-shell commands
Add interactive mode to git-shell for user-friendliness
Add sample commands for git-shell
shell: Display errors from improperly-formatted command lines
Ilari Liusvaara (4):
Add bidirectional_transfer_loop()
git-remote-fd
git-remote-ext
remote-fd/ext: finishing touches after code review
Jakub Narebski (14):
t/gitweb-lib.sh: Use GIT_BUILD_DIR
t/gitweb-lib.sh: Use tabs for indent consistently
gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
gitweb/Makefile: Add 'test' and 'test-installed' targets
gitweb/Makefile: Include gitweb/config.mak
gitweb: Fix test of highlighting support in t9500
gitweb: Fix bug in evaluate_path_info
gitweb: Improve behavior for actionless path_info gitweb URLs
gitweb: Time::HiRes is in core for Perl 5.8
gitweb: selectable configurations that change with each request
gitweb: Fix handling of whitespace in generated links
gitweb: Introduce esc_attr to escape attributes of HTML elements
gitweb: Include links to feeds in HTML header only for '200 OK' response
Jan Krüger (3):
read-tree: deprecate syntax without tree-ish args
repack: add -F flag to let user choose between --no-reuse-delta/object
Documentation: pack.compression: explain how to recompress
Jari Aalto (2):
git-commit.txt: (synopsis): move -i and -o before "--"
git-pull.txt: Mention branch.autosetuprebase
Jeff King (27):
diff: don't use pathname-based diff drivers for symlinks
prefer test -h over test -L in shell scripts
rev-list: handle %x00 NUL in user format
tests: factor out terminal handling from t7006
tests: test terminal output to both stdout and stderr
push: pass --progress down to git-pack-objects
docs: give more hints about how "add -e" works
config: treat non-existent config files as empty
diff: report bogus input to -C/-M/-B
apply: don't segfault on binary files with missing data
docs: clarify git diff modes of operation
docs: give more hints about how "add -e" works
document sigchain api
log.decorate: accept 0/1 bool values
allow command-specific pagers in pager.<cmd>
reflogs: clear flags properly in corner case
docs: default to more modern toolset
default color.status.branch to "same as header"
tests: add some script lint checks
tests: flip executable bit on t9158
handle arbitrary ints in git_config_maybe_bool
t2107: mark passing test as success
ident: die on bogus date format
docs: explain diff.*.binary option
rebase: use explicit "--" with checkout
rebase: give a better error message for bogus branch
tests: sanitize more git environment variables
Jens Lehmann (6):
pull: Remove --tags option from manpage
clone: Add the --recurse-submodules option as alias for --recursive
fetch/pull: Add the --recurse-submodules option
Add the 'fetch.recurseSubmodules' config setting
Submodules: Add the "fetchRecurseSubmodules" config option
git submodule: Remove now obsolete tests before cloning a repo
Jiang Xin (1):
Fix typo in git-gc document.
Jim Meyering (1):
mailmap: fix use of freed memory
Joe Perches (2):
git-send-email.perl: Add --to-cmd
git-send-email.perl: Deduplicate "to:" and "cc:" entries with names
Johan Herland (23):
notes.c: Hexify SHA1 in die() message from init_notes()
(trivial) notes.h: Minor documentation fixes to copy_notes()
notes.h: Make default_notes_ref() available in notes API
notes.c: Reorder functions in preparation for next commit
notes.h/c: Allow combine_notes functions to remove notes
notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
(trivial) t3303: Indent with tabs instead of spaces for consistency
notes.c: Use two newlines (instead of one) when concatenating notes
builtin/notes.c: Split notes ref DWIMmery into a separate function
git notes merge: Initial implementation handling trivial merges only
builtin/notes.c: Refactor creation of notes commits.
git notes merge: Handle real, non-conflicting notes merges
git notes merge: Add automatic conflict resolvers (ours, theirs, union)
Documentation: Preliminary docs on 'git notes merge'
git notes merge: Manual conflict resolution, part 1/2
git notes merge: Manual conflict resolution, part 2/2
git notes merge: List conflicting notes in notes merge commit message
git notes merge: --commit should fail if underlying notes ref has moved
git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
git notes merge: Add testcases for merging notes trees at different fanouts
Provide 'git notes get-ref' to easily retrieve current notes ref
cmd_merge(): Parse options before checking MERGE_HEAD
Provide 'git merge --abort' as a synonym to 'git reset --merge'
Johannes Schindelin (3):
Make sure that git_getpass() never returns NULL
Fix typo in pack-objects' usage
merge-octopus: Work around environment issue on Windows
Johannes Sixt (6):
t7300: add a missing SYMLINKS prerequisite
apply --whitespace=fix: fix tab-in-indent
Make the tab width used for whitespace checks configurable
Avoid duplicate test number t7609
Fix expected values of setup tests on Windows
t/README: hint about using $(pwd) rather than $PWD in tests
Jon Seymour (2):
stash: fix git stash branch regression when branch creation fails
stash: simplify parsing fixes
Jonathan "Duke" Leto (1):
Correct help blurb in checkout -p and friends
Jonathan Nieder (89):
merge-recursive: expose merge options for builtin merge
ll-merge: replace flag argument with options struct
t0004 (unwritable files): simplify error handling
environment.c: remove unused variable
setup: make sure git dir path is in a permanent buffer
init: plug tiny one-time memory leak
xdiff: cast arguments for ctype functions to unsigned char
commit-tree: free commit message before exiting
Documentation: No argument of ALLOC_GROW should have side-effects
Documentation: gitrevisions is in section 7
Documentation: diff can compare blobs
Documentation: expand 'git diff' SEE ALSO section
Documentation: update implicit "--no-index" behavior in "git diff"
t4203 (mailmap): stop hardcoding commit ids and dates
send-pack: avoid redundant "pack-objects died with strange error"
test-lib: allow test code to check the list of declared prerequisites
test_terminal: catch use without TTY prerequisite
test_terminal: ensure redirections work reliably
fast-import: filemodify after M 040000 <tree> "" crashes
fast-import: tighten M 040000 syntax
t9300 (fast-import): another test for the "replace root" feature
fast-import: do not clear notes in do_change_note_fanout()
user-manual: remote-tracking can be checked out, with detached HEAD
Documentation: document show -s
tests: add missing &&
tests: add missing &&, batch 2
test-lib: introduce test_line_count to measure files
t6022 (renaming merge): chain test commands with &&
t1502 (rev-parse --parseopt): test exit code from "-h"
t1400 (update-ref): use test_must_fail
t3301 (notes): use test_expect_code for clarity
t3404 (rebase -i): unroll test_commit loops
t3404 (rebase -i): move comment to description
t3404 (rebase -i): introduce helper to check position of HEAD
t4124 (apply --whitespace): use test_might_fail
apply: handle patches with funny filename and colon in timezone
cherry-pick/revert: transparently refresh index
wrapper: move xmmap() to sha1_file.c
wrapper: move odb_* to environment.c
path helpers: move git_mkstemp* to wrapper.c
strbuf: move strbuf_branchname to sha1_name.c
wrapper: give zlib wrappers their own translation unit
pack-objects: mark file-local variable static
Remove pack file handling dependency from wrapper.o
Documentation: split gitignore page into sections
Documentation: point to related commands from gitignore
Describe various forms of "be quiet" using OPT__QUIET
vcs-svn: Error out for v3 dumps
fast-import: treat SIGUSR1 as a request to access objects early
git-rev-parse.txt: clarify --git-dir
gitweb: document $per_request_config better
fast-import: stricter parsing of integer options
fast-import: clarify documentation of "feature" command
fast-import: Allow cat-blob requests at arbitrary points in stream
add: introduce add.ignoreerrors synonym for add.ignore-errors
Documentation: do not misinterpret pull refspec as bold text
git submodule -b ... of current HEAD fails
Makefile: dependencies for vcs-svn tests
parse-options: clearer reporting of API misuse
parse-options: move NODASH sanity checks to parse_options_check
parse-options: sanity check PARSE_OPT_NOARG flag
parse-options: never suppress arghelp if LITERAL_ARGHELP is set
parse-options: allow git commands to invent new option types
parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
update-index: migrate to parse-options API
treap: make treap_insert return inserted node
vcs-svn: fix intermittent repo_tree corruption
Makefile: transport-helper uses thread-utils.h
t9300: avoid short reads from dd
bash: simple reimplementation of _get_comp_words_by_ref
t9300: use perl "head -c" clone in place of "dd bs=1 count=16000" kluge
t0050: fix printf format strings for portability
t0001: test git init when run via an alias
diff: funcname and word patterns for perl
gitweb: skip logo in atom feed when there is none
gitweb: make logo optional
daemon: support <directory> arguments again
t9010: svnadmin can fail even if available
ll-merge: simplify opts == NULL case
Documentation/fast-import: capitalize beginning of sentence
remote-ext: do not segfault for blank lines
Documentation/fast-import: put explanation of M 040000 <dataref> "" in context
tests: cosmetic improvements to the repo-setup test
tests: compress the setup tests
Documentation: do not treat reset --keep as a special case
Subject: setup: officially support --work-tree without --git-dir
t1510: fix typo in the comment of a test
fast-import: treat filemodify with empty tree as delete
rebase -i: clarify in-editor documentation of "exec"
Joshua Jensen (6):
Add string comparison functions that respect the ignore_case variable.
Case insensitivity support for .gitignore via core.ignorecase
Add case insensitivity support for directories when using git status
Add case insensitivity support when using git ls-files
Support case folding for git add when core.ignorecase=true
Support case folding in git fast-import when core.ignorecase=true
Junio C Hamano (59):
gitdiffcore doc: update pickaxe description
diff: pass the entire diff-options to diffcore_pickaxe()
git log/diff: add -G<regexp> that greps in the patch text
diff/log -G<pattern>: tests
grep: move logic to compile header pattern into a separate helper
log --author: take union of multiple "author" requests
disallow branch names that start with a hyphen
CodingGuidelines: spell Arithmetic Expansion with $(($var))
Git 1.7.3.1
MinGW: avoid collisions between "tags" and "TAGS"
Start 1.7.4 cycle
merge-recursive: Restructure showing how to chain more process_* functions
Martin Langhoff has a new e-mail address
Make test script t9157 executable
CodingGuidelines: reword parameter expansion section
shell portability: no "export VAR=VAL"
t4203: do not let "git shortlog" DWIM based on tty
merge-recursive:make_room_for_directories - work around dumb compilers
Git 1.7.3.2
core.abbrevguard: Ensure short object names stay unique a bit longer
read_sha1_file(): report correct name of packfile with a corrupt object
A loose object is not corrupt if it cannot be read due to EMFILE
t9001: send-email interation with --in-reply-to and --chain-reply-to
test: git-apply -p2 rename/chmod only
t3404: do not use 'describe' to implement test_cmp_rev
t3402: test "rebase -s<strategy> -X<opt>"
Update draft release notes to 1.7.4
Documentation: Fix mark-up of lines with more than one tilde
Git 1.7.0.8
Update draft release notes to 1.7.4
t9300: remove unnecessary use of /dev/stdin
Git 1.7.3.3
t9119: do not compare "Text Last Updated" line from "svn info"
Do not link with -lcrypto under NO_OPENSSL
t9010 fails when no svn is available
get_sha1: teach ":$n:<path>" the same relative path logic
Documentation/git.txt: update list of maintenance releases
fetch_populated_submodules(): document dynamic allocation
thread-utils.h: simplify the inclusion
Prepare for 1.7.3.4
Relnotes: remove items fixed on 'maint'
get_sha1_oneline: fix lifespan rule of temp_commit_buffer variable
Prepare for 1.7.3.4
Git 1.6.4.5
Update draft release notes to 1.7.4
commit: die before asking to edit the log message
set_try_to_free_routine(NULL) means "do nothing special"
am --abort: keep unrelated commits since the last failure and warn
t0021: avoid getting filter killed with SIGPIPE
rebase --skip: correctly wrap-up when skipping the last patch
userdiff/perl: catch BEGIN/END/... and POD as headers
Prepare for 1.7.3.5
Git 1.7.4-rc0
Git 1.7.3.5
Git 1.7.4-rc1
Git 1.7.4-rc2
Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase
Git 1.7.4-rc3
Git 1.7.4
Justin Frankel (2):
merge-recursive --patience
merge-recursive: options to ignore whitespace changes
Kevin Ballard (13):
merge-recursive: option to specify rename threshold
diff: add synonyms for -M, -C, -B
completion: Support the DWIM mode for git checkout
blame: Add option to show author email instead of name
Update test script annotate-tests.sh to handle missing/extra authors
test-lib: extend test_decode_color to handle more color codes
diff: handle lines containing only whitespace and tabs better
submodule: preserve all arguments exactly when recursing
submodule: only preserve flags across recursive status/update invocations
status: Quote paths with spaces in short format
rebase: better rearranging of fixup!/squash! lines with --autosquash
rebase: teach --autosquash to match on sha1 in addition to message
diff: add --detect-copies-harder as a synonym for --find-copies-harder
Kevin P. Fleming (1):
post-receive-email: ensure sent messages are not empty
Kirill Smelkov (8):
gitk: Show notes by default (like git log does)
user-manual: be consistent in illustrations to 'git rebase'
blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
setup: make sure git_dir path is in a permanent buffer, getenv(3) case
t/t8006: Demonstrate blame is broken when cachetextconv is on
fill_textconv(): Don't get/put cache if sha1 is not valid
Linus Torvalds (1):
Fix missing 'does' in man-page for 'git checkout'
Mark Lodato (3):
completion: make compatible with zsh
completion: fix zsh check under bash with 'set -u'
fsck docs: remove outdated and useless diagnostic
Markus Duft (2):
add support for the SUA layer (interix; windows)
Interix: add configure checks
Martin Storsjö (1):
Improve the mingw getaddrinfo stub to handle more use cases
Martin von Zweigbergk (7):
rebase -X: do not clobber strategy
Documentation/git-pull: clarify configuration
rebase: support --verify
rebase --abort: do not update branch ref
rebase: only show stat if configured to true
Use reflog in 'pull --rebase . foo'
completion: add missing configuration variables
Mathias Lafeldt (1):
git-svn: fix processing of decorated commit hashes
Matthieu Moy (12):
update comment and documentation for :/foo syntax
diff: trivial fix for --output file error message
Better "Changed but not updated" message in git-status
Replace "remote tracking" with "remote-tracking"
Change remote tracking to remote-tracking in non-trivial places
everyday.txt: change "tracking branch" to "remote-tracking branch"
Change "tracking branch" to "remote-tracking branch"
Change incorrect uses of "remote branch" meaning "remote-tracking"
Change incorrect "remote branch" to "remote tracking branch" in C code
user-manual.txt: explain better the remote(-tracking) branch terms
git-branch.txt: mention --set-upstream as a way to change upstream configuration
commit: suggest --amend --reset-author to fix commiter identity
Michael J Gruber (26):
git-reset.txt: clarify branch vs. branch head
git-reset.txt: reset does not change files in target
git-reset.txt: reset --soft is not a no-op
git-reset.txt: use "working tree" consistently
git-reset.txt: point to git-checkout
git-reset.txt: make modes description more consistent
remote-helpers: build in platform independent directory
contrib/completion: --no-index option to git diff
user-manual: fix anchor name Finding-comments-With-given-Content
rev-list-options: clarify --parents and --children
t5503: fix typo
git-show-ref.txt: clarify the pattern matching
test: allow running the tests under "prove"
t/t7004-tag: test handling of rfc1991 signatures
verify-tag: factor out signature detection
tag: factor out sig detection for body edits
tag: factor out sig detection for tag display
tag: recognize rfc1991 signatures
cvsimport: partial whitespace cleanup
git-rm.txt: Fix quoting
t800?-blame.sh: retitle uniquely
git-difftool.txt: correct the description of $BASE and describe $MERGED
difftool: provide basename to external tools
t1020-subdirectory: test alias expansion in a subdirectory
cvsimport: handle the parsing of uppercase config options
RelNotes/1.7.4: minor fixes
Mike Pape (3):
mingw: add network-wrappers for daemon
mingw: implement syslog
compat: add inet_pton and inet_ntop prototypes
Nathan W. Panike (1):
Fix a formatting error in git-merge.txt
Nguyễn Thái Ngọc Duy (68):
branch -h: show usage even in an invalid repository
checkout-index -h: show usage even in an invalid repository
commit/status -h: show usage even with broken configuration
gc -h: show usage even with broken configuration
ls-files -h: show usage even with corrupt index
merge -h: show usage even with corrupt index
update-index -h: show usage even with corrupt index
dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkout
add: do not rely on dtype being NULL behavior
clean: avoid quoting twice
clean: remove redundant variable baselen
get_cwd_relative(): do not misinterpret root path
builtins: print setup info if repo is found
Add t1510 and basic rules that run repo setup
t1510: setup case #0
t1510: setup case #1
t1510: setup case #2
t1510: setup case #3
t1510: setup case #4
t1510: setup case #5
t1510: setup case #6
t1510: setup case #7
t1510: setup case #8
t1510: setup case #9
t1510: setup case #10
t1510: setup case #11
t1510: setup case #12
t1510: setup case #13
t1510: setup case #14
t1510: setup case #15
t1510: setup case #16
t1510: setup case #17
t1510: setup case #18
t1510: setup case #19
t1510: setup case #20
t1510: setup case #21
t1510: setup case #22
t1510: setup case #23
t1510: setup case #24
t1510: setup case #25
t1510: setup case #26
t1510: setup case #27
t1510: setup case #28
t1510: setup case #29
t1510: setup case #30
t1510: setup case #31
cache.h: realign and use (1 << x) form for CE_* constants
dir.c: add free_excludes()
unpack-trees: move all skip-worktree checks back to unpack_trees()
entry.c: remove "checkout-index" from error messages
unpack-trees: fix sparse checkout's "unable to match directories"
Revert "excluded_1(): support exclude files in index"
setup: save prefix (original cwd relative to toplevel) in startup_info
Make prefix_path() return char* without const
get_sha1: support relative path ":path" syntax
get_sha1_oneline: make callers prepare the commit list to traverse
get_sha1: support $commit^{/regex} syntax
get_sha1: handle special case $commit^{/}
Add git_config_early()
Use git_config_early() instead of git_config() during repo setup
setup: limit get_git_work_tree()'s to explicit setup case only
setup: clean up setup_bare_git_dir()
setup: clean up setup_discovered_git_dir()
setup: rework setup_explicit_git_dir()
Remove all logic from get_git_work_tree()
Revert "Documentation: always respect core.worktree if set"
git.txt: correct where --work-tree path is relative to
setup_work_tree: adjust relative $GIT_WORK_TREE after moving cwd
Nicolas Pitre (2):
diff: don't presume empty file when corresponding object is missing
make pack-objects a bit more resilient to repo corruption
Pascal Obry (3):
Minor indentation fix.
Remove @smtp_host_parts variable as not used.
New send-email option smtpserveroption.
Pat Notz (8):
strbuf.h: fix comment typo
dir.c: squelch false uninitialized memory warning
commit: helper methods to reduce redundant blocks of code
pretty.c: teach format_commit_message() to reencode the output
commit: --fixup option for use with rebase --autosquash
add tests of commit --fixup
commit: --squash option for use with rebase --autosquash
add tests of commit --squash
Pat Thoyts (13):
MinGW: fix stat() and lstat() implementations for handling symlinks
MinGW: Report errors when failing to launch the html browser.
Skip t1300.70 and 71 on msysGit.
Do not strip CR when grepping HTTP headers.
Skip 'git archive --remote' test on msysGit
git-am: fix detection of absolute paths for windows
git-gui: show command-line errors in a messagebox on Windows
git-gui: enable the Tk console when tracing/debugging on Windows
git-gui: generic version trimming
git-gui: use full dialog width for old name when renaming branch
git-gui: correct assignment of work-tree
git-gui: use wordprocessor tab style to ensure tabs work as expected
git-gui: apply color information from git diff output
Pete Wyckoff (1):
convert filter: supply path to external driver
Peter Krefting (1):
gitk: Update Swedish translation (290t)
Peter van der Does (1):
bash: get --pretty=m<tab> completion to work with bash v4
Petr Onderka (1):
Add global and system-wide gitattributes
Ralf Thielow (1):
commit.c: Remove backward goto in read_craft_line()
Ralf Wildenhues (1):
Fix typos in the documentation
Ramkumar Ramachandra (11):
shell: Rewrite documentation and improve error message
t4014-format-patch: Call test_tick before committing
format-patch: Don't go over merge commits
fmt_merge_msg: Change fmt_merge_msg API to accept shortlog_len
merge: Make '--log' an integer option for number of shortlog entries
merge: Make 'merge.log' an integer or boolean option
t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length
t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length
SubmittingPatches: Document some extra tags used in commit messages
Porcelain scripts: Rewrite cryptic "needs update" error message
t9010 (svn-fe): Eliminate dependency on svn perl bindings
Ramsay Allan Jones (20):
t1503: Fix arithmetic expansion syntax error when using dash
msvc: Fix compilation errors in compat/win32/sys/poll.c
msvc: git-daemon.exe: Fix linker "unresolved externals" error
msvc: Fix build by adding missing INTMAX_MAX define
msvc: Fix macro redefinition warnings
t3600-rm.sh: Don't pass a non-existent prereq to test #15
t9142: Move call to start_httpd into the setup test
lib-git-svn.sh: Avoid setting web server variables unnecessarily
lib-git-svn.sh: Add check for mis-configured web server variables
t9501-*.sh: Fix a test failure on Cygwin
difftool: Fix failure on Cygwin
t3419-*.sh: Fix arithmetic expansion syntax error
lib-git-svn.sh: Move web-server handling code into separate function
t9157-*.sh: Add an svn version check
t6038-*.sh: Pass the -b (--binary) option to sed on cygwin
t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
t4135-*.sh: Skip the "backslash" tests on cygwin
t9157-*.sh: Make the svn version check more precise
svndump.c: Fix a printf format compiler warning
René Scharfe (10):
diff: avoid repeated scanning while looking for funcname
work around buggy S_ISxxx(m) implementations
add description parameter to OPT__VERBOSE
add description parameter to OPT__DRY_RUN
add description parameter to OPT__QUIET
add OPT__FORCE
archive: improve --verbose description
branch: improve --verbose description
verify-tag: document --verbose
close file on error in read_mmfile()
Robin H. Johnson (2):
Fix false positives in t3404 due to SHELL=/bin/false
t9001: Fix test prerequisites
SZEDER Gábor (7):
bisect: improve error message of 'bisect log' while not bisecting
bisect: improve error msg of 'bisect reset' when original HEAD is deleted
bisect: check for mandatory argument of 'bisect replay'
bash: offer refs for 'git bisect start'
bash: not all 'git bisect' subcommands make sense when not bisecting
bash: support more 'git notes' subcommands and their options
bash: support pretty format aliases
Santi Béjar (1):
parse-remote: handle detached HEAD
Schalk, Ken (1):
t3030: Add a testcase for resolvable rename/add conflict with symlinks
Sebastian Schuberth (3):
MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility
MinGW: Add missing file mode bit defines
On Windows, avoid git-gui to call Cygwin's nice utility
Shawn O. Pearce (2):
Use git_open_noatime when accessing pack data
Work around EMFILE when there are too many pack files
Stefan Haller (2):
gitk: Prevent the text pane from becoming editable
gitk: Make text selectable on Mac
Stephen Boyd (4):
send-email: Use To: headers in patch files
send-email: Don't leak To: headers between patches
parse-options: Don't call parse_options_check() so much
parse-options: do not infer PARSE_OPT_NOARG from option type
StephenB (1):
git svn: fix the final example in man page
Steven Walter (2):
git-svn: check_cherry_pick should exclude commits already in our history
git-svn: allow the mergeinfo property to be set
Sven Eckelmann (1):
contrib/ciabot: git-describe commit instead of HEAD
Sylvain Rabot (2):
gitweb: add extensions to highlight feature map
gitweb: remove unnecessary test when closing file descriptor
Tay Ray Chuan (14):
smart-http: Don't change POST to GET when following redirect
t5523-push-upstream: add function to ensure fresh upstream repo
t5523-push-upstream: test progress messages
format-patch: page output with --stdout
t5550-http-fetch: add missing '&&'
t5550-http-fetch: add test for http-fetch
shift end_url_with_slash() from http.[ch] to url.[ch]
url: add str wrapper for end_url_with_slash()
http-backend: use end_url_with_slash()
http-push: Normalise directory names when pushing to some WebDAV servers
http-push: check path length before using it
http-push: add trailing slash at arg-parse time, instead of later on
http-fetch: rework url handling
bash completion: add basic support for git-reflog
Thiago Farina (3):
commit: Add commit_list prefix in two function names.
builtin/branch.c: Use ALLOC_GROW instead of alloc_nr and xrealloc.
builtin/rm.c: Use ALLOC_GROW instead of alloc_nr and xrealloc.
Thomas Rast (12):
send-email: Refuse to send cover-letter template subject
prefix_filename(): safely handle the case where pfx_len=0
merge-file: correctly find files when called in subdir
repack: place temporary packs under .git/objects/pack/
{cvs,svn}import: use the new 'git read-tree --empty'
t0003: properly quote $HOME
gitk: Add the equivalent of diff --color-words
userdiff: fix typo in ruby and python word regexes
Documentation/git-archive: spell --worktree-attributes correctly
Documentation/githooks: post-rewrite-copy-notes never existed
submodule: fix relative url parsing for scp-style origin
t0000: quote TAP snippets in test code
Tomas Carnecky (1):
stash drops the stash even if creating the branch fails because it already exists
Tony Luck (1):
Better advice on using topic branches for kernel development
Torsten Bögershausen (1):
t9143: do not fail when unhandled.log.gz is not created
Uwe Kleine-König (2):
get_author_ident_from_commit(): remove useless quoting
Documentation/git-clone: describe --mirror more verbosely
Vasyl' Vavrychuk (1):
trace.c: mark file-local function static
Wesley J. Landaker (1):
Documentation: Refer to git-commit-tree in git-filter-branch help
Yann Dirson (5):
t/t3415: use && where applicable.
Fix copy-pasted comments related to tree diff handling.
Keep together options controlling the behaviour of diffcore-rename.
Document that rev-list --graph triggers parent rewriting.
diff: use "find" instead of "detect" as prefix for long forms of -M and -C
knittl (1):
bash: Match lightweight tags in prompt
Ævar Arnfjörð Bjarmason (25):
send-email: use catfile() to concatenate files
Makefile: add CC to TRACK_CFLAGS
perl: bump the required Perl version to 5.8 from 5.6.[21]
perl: use "use warnings" instead of -w
send-email: use lexical filehandle for opendir
send-email: use lexical filehandles for $compose
send-email: use lexical filehandles during sending
send-email: get_patch_subject doesn't need a prototype
send-email: file_declares_8bit_cte doesn't need a prototype
send-email: unique_email_list doesn't need a prototype
send-email: cleanup_compose_files doesn't need a prototype
send-email: use \E***\Q instead of \*\*\*
send-email: sanitize_address use $foo, not "$foo"
send-email: sanitize_address use qq["foo"], not "\"foo\""
send-email: use (?:) instead of () if no match variables are needed
send-email: send_message die on $!, not $?
send-email: make_message_id use "require" instead of "use"
send-email: use Perl idioms in while loop
send-email: is_rfc2047_quoted use qr// regexes
send-email: extract_valid_address use qr// regexes
Makefile & configure: add a NO_FNMATCH flag
Makefile & configure: add a NO_FNMATCH_CASEFOLD flag
test-lib: make test_expect_code a test command
t7004-tag.sh: re-arrange git tag comment for clarity
tests: use test_cmp instead of piping to diff(1)
Štěpán Němec (8):
Use angles for placeholders consistently
Fix odd markup in --diff-filter documentation
Use parentheses and `...' where appropriate
Remove stray quotes in --pretty and --format documentation
Put a space between `<' and argument in pack-objects usage string
Fix {update,checkout}-index usage strings
CodingGuidelines: Add a section on writing documentation
diff,difftool: Don't use the {0,2} notation in usage strings
^ permalink raw reply [relevance 1%]
* [PATCH] Allow git mv FileA fILEa when core.ignorecase = true
@ 2011-03-04 21:40 12% Torsten Bögershausen
2011-03-16 13:05 0% ` Erik Faye-Lund
0 siblings, 1 reply; 200+ results
From: Torsten Bögershausen @ 2011-03-04 21:40 UTC (permalink / raw)
To: git; +Cc: tboegi
The typical use case is when a file "FileA" should be renamed into fILEa
and we are on a case insenstive file system (system core.ignorecase = true).
Source and destination are the same file, it can be accessed under both names.
This makes git think that the destination file exists.
Unless used with --forced, git will refuse the "git mv FileA fILEa".
This change will allow "git mv FileA fILEa", when core.ignorecase = true
and source and destination filenames only differ in case and the file length
is identical.
On Linux/Unix/Mac OS X the mv is allowed when the inode of the source and
destination are equal.
On this allows renames of MÄRCHEN into Märchen on Mac OS X.
(As a side effect, a file can be renamed to a name which is already
hard-linked to the same inode)
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
builtin/mv.c | 20 +++++++++++++++-----
t/t7001-mv.sh | 29 +++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 93e8995..e0aad62 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -62,7 +62,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
};
const char **source, **destination, **dest_path;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
- struct stat st;
+ struct stat st, st_dst;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
git_config(git_default_config, NULL);
@@ -164,15 +164,25 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
}
} else if (cache_name_pos(src, length) < 0)
bad = "not under version control";
- else if (lstat(dst, &st) == 0) {
+ else if (lstat(dst, &st_dst) == 0) {
+ int allow_force = force;
bad = "destination exists";
- if (force) {
+ /* Allow when src and dst have the same inode (Mac OS X) */
+ /* Allow when ignore_case and same file length (Windows) */
+ if (((st_dst.st_ino) && (st_dst.st_ino == st.st_ino)) ||
+ ((ignore_case) && !strcasecmp(src, dst) &&
+ (st.st_size == st_dst.st_size))) {
+ allow_force = 1;
+ bad = NULL;
+ }
+ if (allow_force) {
/*
* only files can overwrite each other:
* check both source and destination
*/
- if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
- warning("%s; will overwrite!", bad);
+ if (S_ISREG(st_dst.st_mode) || S_ISLNK(st_dst.st_mode)) {
+ if (bad)
+ warning("%s; will overwrite!", bad);
bad = NULL;
} else
bad = "Cannot overwrite";
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..d0e73ee 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,33 @@ test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -f moved symlink
+touch x
+if ln x y 2>/dev/null; then
+ hardlinks=1
+fi
+rm -f x y
+
+if test "$(git config --bool core.ignorecase)" = true -o "$hardlinks"; then
+ test_expect_success 'git mv FileA fILEa' '
+
+ rm -fr .git * &&
+ git init &&
+ echo FileA > FileA &&
+ git add FileA &&
+ git commit -m add FileA &&
+ {
+ if ! test -f fILEa; then
+ ln FileA fILEa
+ fi
+ } &&
+ git mv FileA fILEa &&
+ git commit -m "mv FileA fILEa" &&
+ rm -f FileA fILEa &&
+ git reset --hard &&
+ test "$(echo *)" = fILEa
+ '
+else
+ say "Neither ignorecase nor hardlinks, skipping git mv FileA fILEa"
+fi
+
test_done
--
1.7.4
^ permalink raw reply related [relevance 12%]
* Re: [PATCH] Allow git mv FileA fILEa when core.ignorecase = true
2011-03-16 13:05 0% ` Erik Faye-Lund
@ 2011-03-16 13:18 0% ` Erik Faye-Lund
2011-03-19 14:28 0% ` Torsten Bögershausen
0 siblings, 1 reply; 200+ results
From: Erik Faye-Lund @ 2011-03-16 13:18 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: git
2011/3/16 Erik Faye-Lund <kusmabite@gmail.com>:
> 2011/3/4 Torsten Bögershausen <tboegi@web.de>:
>> The typical use case is when a file "FileA" should be renamed into fILEa
>> and we are on a case insenstive file system (system core.ignorecase = true).
>> Source and destination are the same file, it can be accessed under both names.
>> This makes git think that the destination file exists.
>> Unless used with --forced, git will refuse the "git mv FileA fILEa".
>> This change will allow "git mv FileA fILEa", when core.ignorecase = true
>> and source and destination filenames only differ in case and the file length
>> is identical.
>> On Linux/Unix/Mac OS X the mv is allowed when the inode of the source and
>> destination are equal.
>> On this allows renames of MÄRCHEN into Märchen on Mac OS X.
>> (As a side effect, a file can be renamed to a name which is already
>> hard-linked to the same inode)
>>
>> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
>> ---
>> builtin/mv.c | 20 +++++++++++++++-----
>> t/t7001-mv.sh | 29 +++++++++++++++++++++++++++++
>> 2 files changed, 44 insertions(+), 5 deletions(-)
>>
>> diff --git a/builtin/mv.c b/builtin/mv.c
>> index 93e8995..e0aad62 100644
>> --- a/builtin/mv.c
>> +++ b/builtin/mv.c
>> @@ -62,7 +62,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
>> };
>> const char **source, **destination, **dest_path;
>> enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
>> - struct stat st;
>> + struct stat st, st_dst;
>> struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
>>
>> git_config(git_default_config, NULL);
>> @@ -164,15 +164,25 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
>> }
>> } else if (cache_name_pos(src, length) < 0)
>> bad = "not under version control";
>> - else if (lstat(dst, &st) == 0) {
>> + else if (lstat(dst, &st_dst) == 0) {
>> + int allow_force = force;
>> bad = "destination exists";
>> - if (force) {
>> + /* Allow when src and dst have the same inode (Mac OS X) */
>> + /* Allow when ignore_case and same file length (Windows) */
>
> Wait, what? Same file length is sufficient to trigger overwriting
> without -f? I find this to be a very dubious heuristic...
>
> Shouldn't you be checking something like nFileIndexLow/High from
> BY_HANDLE_FILE_INFORMATION instead? (ref:
> http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx)
>
> Sure, we'd need some API to check that, but if we assume that this
> code path is rare-ish we could do something like this (note,
> untested):
>
> diff --git a/compat/mingw.c b/compat/mingw.c
> index 6750e67..fee4113 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -299,6 +299,21 @@ void mingw_mark_as_git_dir(const char *dir)
> "dotGitOnly" : "true"));
> }
>
> +int is_same_file(const char *a, const char *b)
> +{
> + BY_HANDLE_FILE_INFORMATION hia, hib;
> + HANDLE ha = OpenFileA(a, NULL, OF_READ),
> + hb = OpenFileA(b, NULL, OF_READ);
> + if (!ha || !hb ||
> + !GetFileInformationByHandle(ha) ||
> + !GetFileInformationByHandle(hb))
> + return 0;
> +
And if couse:
CloseHandle(ha);
CloseHandle(hb);
^ permalink raw reply [relevance 0%]
* Re: [PATCH] Allow git mv FileA fILEa when core.ignorecase = true
2011-03-04 21:40 12% [PATCH] Allow git mv FileA fILEa when core.ignorecase = true Torsten Bögershausen
@ 2011-03-16 13:05 0% ` Erik Faye-Lund
2011-03-16 13:18 0% ` Erik Faye-Lund
0 siblings, 1 reply; 200+ results
From: Erik Faye-Lund @ 2011-03-16 13:05 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: git
2011/3/4 Torsten Bögershausen <tboegi@web.de>:
> The typical use case is when a file "FileA" should be renamed into fILEa
> and we are on a case insenstive file system (system core.ignorecase = true).
> Source and destination are the same file, it can be accessed under both names.
> This makes git think that the destination file exists.
> Unless used with --forced, git will refuse the "git mv FileA fILEa".
> This change will allow "git mv FileA fILEa", when core.ignorecase = true
> and source and destination filenames only differ in case and the file length
> is identical.
> On Linux/Unix/Mac OS X the mv is allowed when the inode of the source and
> destination are equal.
> On this allows renames of MÄRCHEN into Märchen on Mac OS X.
> (As a side effect, a file can be renamed to a name which is already
> hard-linked to the same inode)
>
> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
> ---
> builtin/mv.c | 20 +++++++++++++++-----
> t/t7001-mv.sh | 29 +++++++++++++++++++++++++++++
> 2 files changed, 44 insertions(+), 5 deletions(-)
>
> diff --git a/builtin/mv.c b/builtin/mv.c
> index 93e8995..e0aad62 100644
> --- a/builtin/mv.c
> +++ b/builtin/mv.c
> @@ -62,7 +62,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
> };
> const char **source, **destination, **dest_path;
> enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
> - struct stat st;
> + struct stat st, st_dst;
> struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
>
> git_config(git_default_config, NULL);
> @@ -164,15 +164,25 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
> }
> } else if (cache_name_pos(src, length) < 0)
> bad = "not under version control";
> - else if (lstat(dst, &st) == 0) {
> + else if (lstat(dst, &st_dst) == 0) {
> + int allow_force = force;
> bad = "destination exists";
> - if (force) {
> + /* Allow when src and dst have the same inode (Mac OS X) */
> + /* Allow when ignore_case and same file length (Windows) */
Wait, what? Same file length is sufficient to trigger overwriting
without -f? I find this to be a very dubious heuristic...
Shouldn't you be checking something like nFileIndexLow/High from
BY_HANDLE_FILE_INFORMATION instead? (ref:
http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx)
Sure, we'd need some API to check that, but if we assume that this
code path is rare-ish we could do something like this (note,
untested):
diff --git a/compat/mingw.c b/compat/mingw.c
index 6750e67..fee4113 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -299,6 +299,21 @@ void mingw_mark_as_git_dir(const char *dir)
"dotGitOnly" : "true"));
}
+int is_same_file(const char *a, const char *b)
+{
+ BY_HANDLE_FILE_INFORMATION hia, hib;
+ HANDLE ha = OpenFileA(a, NULL, OF_READ),
+ hb = OpenFileA(b, NULL, OF_READ);
+ if (!ha || !hb ||
+ !GetFileInformationByHandle(ha) ||
+ !GetFileInformationByHandle(hb))
+ return 0;
+
+ return hia.dwVolumeSerialNumber == hib.dwVolumeSerialNumber &&
+ hia.nFileSizeLow == hib.nFileSizeLow &&
+ hia.nFileSizeHigh == hib.nFileSizeHigh;
+}
+
#undef mkdir
int mingw_mkdir(const char *path, int mode)
{
diff --git a/compat/mingw.h b/compat/mingw.h
index 9c00e75..43c0b5f 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -297,6 +297,9 @@ void mingw_open_html(const char *path);
void mingw_mark_as_git_dir(const char *dir);
#define mark_as_git_dir mingw_mark_as_git_dir
+int mingw_is_same_file(const char *a, const char *b);
+#define is_same_file mingw_is_same_file
+
/*
* helpers
*/
diff --git a/git-compat-util.h b/git-compat-util.h
index 2ca2fad..b95b9e2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -558,6 +558,17 @@ int remove_or_warn(unsigned int mode, const char *path);
#define mark_as_git_dir(x) /* noop */
#endif
+#ifndef is_same_file
+static inline int mingw_is_same_file(const char *a, const char *b)
+{
+ struct stat sta, stb;
+ if (lstat(a, &sta) ||
+ lstat(b, &stb))
+ return 0;
+ return sta.st_dev == stb.st_deb && sta.st_ino == stb.st_ino;
+}
+#endif
+
#ifndef get_home_directory
#define get_home_directory() getenv("HOME")
#endif
^ permalink raw reply related [relevance 0%]
* [PATCH v2] Allow git mv FileA fILEa on case ignore file systems
@ 2011-03-19 14:28 11% Torsten Bögershausen
0 siblings, 0 replies; 200+ results
From: Torsten Bögershausen @ 2011-03-19 14:28 UTC (permalink / raw)
To: kusmabite, git; +Cc: tboegi
The typical use case is when a file "FileA" should be renamed into fILEa
and we are on a case insenstive file system (system core.ignorecase = true).
Source and destination are the same file, it can be accessed under both names.
This makes git think that the destination file exists.
Unless used with --forced, git will refuse the "git mv FileA fILEa".
This change will allow "git mv FileA fILEa" under the following condition:
On Linux/Unix/Mac OS X the move is allowed when the inode of the source and
destination are equal (and they are on the same device).
This allows renames of MÄRCHEN into Märchen on Mac OS X.
(As a side effect, a file can be renamed to a name which is already
hard-linked to the same inode).
On Windows, the function win_is_same_file() from compat/win32/same-file.c
is used.
It calls GetFileInformationByHandle() to check if both files are
"the same".
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
Makefile | 8 +++++---
builtin/mv.c | 2 +-
compat/win32/same-file.c | 26 ++++++++++++++++++++++++++
git-compat-util.h | 15 +++++++++++++++
t/t7001-mv.sh | 29 +++++++++++++++++++++++++++++
5 files changed, 76 insertions(+), 4 deletions(-)
create mode 100644 compat/win32/same-file.c
diff --git a/Makefile b/Makefile
index 5c2b797..55b9a05 100644
--- a/Makefile
+++ b/Makefile
@@ -924,7 +924,7 @@ ifeq ($(uname_O),Cygwin)
# Try commenting this out if you suspect MMAP is more efficient
NO_MMAP = YesPlease
X = .exe
- COMPAT_OBJS += compat/cygwin.o
+ COMPAT_OBJS += compat/cygwin.o compat/win32/same-file.o
UNRELIABLE_FSTAT = UnfortunatelyYes
endif
ifeq ($(uname_S),FreeBSD)
@@ -1104,7 +1104,8 @@ ifeq ($(uname_S),Windows)
BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
COMPAT_OBJS = compat/msvc.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
- compat/win32/sys/poll.o compat/win32/dirent.o
+ compat/win32/sys/poll.o compat/win32/dirent.o \
+ compat/win32/same-file.o
COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib
@@ -1177,7 +1178,8 @@ ifneq (,$(findstring MINGW,$(uname_S)))
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
- compat/win32/sys/poll.o compat/win32/dirent.o
+ compat/win32/sys/poll.o compat/win32/dirent.o \
+ compat/win32/same-file.o
EXTLIBS += -lws2_32
PTHREAD_LIBS =
X = .exe
diff --git a/builtin/mv.c b/builtin/mv.c
index 93e8995..96792bd 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -166,7 +166,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
bad = "not under version control";
else if (lstat(dst, &st) == 0) {
bad = "destination exists";
- if (force) {
+ if (force || is_same_file(src, dst)) {
/*
* only files can overwrite each other:
* check both source and destination
diff --git a/compat/win32/same-file.c b/compat/win32/same-file.c
new file mode 100644
index 0000000..bb1a791
--- /dev/null
+++ b/compat/win32/same-file.c
@@ -0,0 +1,26 @@
+#include "../../git-compat-util.h"
+#include "../win32.h"
+
+int win_is_same_file(const char *a, const char *b)
+{
+ BY_HANDLE_FILE_INFORMATION hia, hib;
+ HANDLE h;
+
+ h = CreateFile(a, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+ if (INVALID_HANDLE_VALUE == h)
+ return 0;
+ if (!(GetFileInformationByHandle(h,&hia)))
+ return 0;
+ CloseHandle(h);
+
+ h = CreateFile(b, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+ if (INVALID_HANDLE_VALUE == h)
+ return 0;
+ if (!(GetFileInformationByHandle(h,&hib)))
+ return 0;
+ CloseHandle(h);
+
+ return hia.dwVolumeSerialNumber == hib.dwVolumeSerialNumber &&
+ hia.nFileSizeLow == hib.nFileSizeLow &&
+ hia.nFileSizeHigh == hib.nFileSizeHigh;
+}
diff --git a/git-compat-util.h b/git-compat-util.h
index 49b50ee..df95458 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -152,6 +152,21 @@
#include "compat/msvc.h"
#endif
+#if defined (WIN32) || defined(__CYGWIN__)
+/* MinGW or MSVC or cygwin */
+int win_is_same_file(const char *a, const char *b);
+#define is_same_file(a,b) win_is_same_file((a),(b))
+#else
+static inline int is_same_file(const char *a, const char *b)
+{
+ struct stat sta, stb;
+ if (lstat(a, &sta) ||
+ lstat(b, &stb))
+ return 0;
+ return sta.st_ino && sta.st_dev == stb.st_dev && sta.st_ino == stb.st_ino;
+}
+#endif
+
#ifndef NO_LIBGEN_H
#include <libgen.h>
#else
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..d0e73ee 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,33 @@ test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -f moved symlink
+touch x
+if ln x y 2>/dev/null; then
+ hardlinks=1
+fi
+rm -f x y
+
+if test "$(git config --bool core.ignorecase)" = true -o "$hardlinks"; then
+ test_expect_success 'git mv FileA fILEa' '
+
+ rm -fr .git * &&
+ git init &&
+ echo FileA > FileA &&
+ git add FileA &&
+ git commit -m add FileA &&
+ {
+ if ! test -f fILEa; then
+ ln FileA fILEa
+ fi
+ } &&
+ git mv FileA fILEa &&
+ git commit -m "mv FileA fILEa" &&
+ rm -f FileA fILEa &&
+ git reset --hard &&
+ test "$(echo *)" = fILEa
+ '
+else
+ say "Neither ignorecase nor hardlinks, skipping git mv FileA fILEa"
+fi
+
test_done
--
1.7.4
^ permalink raw reply related [relevance 11%]
* Re: [PATCH] Allow git mv FileA fILEa when core.ignorecase = true
2011-03-16 13:18 0% ` Erik Faye-Lund
@ 2011-03-19 14:28 0% ` Torsten Bögershausen
0 siblings, 0 replies; 200+ results
From: Torsten Bögershausen @ 2011-03-19 14:28 UTC (permalink / raw)
To: kusmabite, git; +Cc: Torsten Bögershausen
On 16.03.11 14:18, Erik Faye-Lund wrote:
> 2011/3/16 Erik Faye-Lund <kusmabite@gmail.com>:
>> 2011/3/4 Torsten Bögershausen <tboegi@web.de>:
>>> The typical use case is when a file "FileA" should be renamed into fILEa
>>> and we are on a case insenstive file system (system core.ignorecase = true).
>>> Source and destination are the same file, it can be accessed under both names.
>>> This makes git think that the destination file exists.
>>> Unless used with --forced, git will refuse the "git mv FileA fILEa".
>>> This change will allow "git mv FileA fILEa", when core.ignorecase = true
>>> and source and destination filenames only differ in case and the file length
>>> is identical.
>>> On Linux/Unix/Mac OS X the mv is allowed when the inode of the source and
>>> destination are equal.
>>> On this allows renames of MÄRCHEN into Märchen on Mac OS X.
>>> (As a side effect, a file can be renamed to a name which is already
>>> hard-linked to the same inode)
>>>
>>> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
>>> ---
>>> builtin/mv.c | 20 +++++++++++++++-----
>>> t/t7001-mv.sh | 29 +++++++++++++++++++++++++++++
>>> 2 files changed, 44 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/builtin/mv.c b/builtin/mv.c
>>> index 93e8995..e0aad62 100644
>>> --- a/builtin/mv.c
>>> +++ b/builtin/mv.c
>>> @@ -62,7 +62,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
>>> };
>>> const char **source, **destination, **dest_path;
>>> enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
>>> - struct stat st;
>>> + struct stat st, st_dst;
>>> struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
>>>
>>> git_config(git_default_config, NULL);
>>> @@ -164,15 +164,25 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
>>> }
>>> } else if (cache_name_pos(src, length) < 0)
>>> bad = "not under version control";
>>> - else if (lstat(dst, &st) == 0) {
>>> + else if (lstat(dst, &st_dst) == 0) {
>>> + int allow_force = force;
>>> bad = "destination exists";
>>> - if (force) {
>>> + /* Allow when src and dst have the same inode (Mac OS X) */
>>> + /* Allow when ignore_case and same file length (Windows) */
>>
>> Wait, what? Same file length is sufficient to trigger overwriting
>> without -f? I find this to be a very dubious heuristic...
>>
>> Shouldn't you be checking something like nFileIndexLow/High from
>> BY_HANDLE_FILE_INFORMATION instead? (ref:
>> http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx)
>>
>> Sure, we'd need some API to check that, but if we assume that this
>> code path is rare-ish we could do something like this (note,
>> untested):
>>
>> diff --git a/compat/mingw.c b/compat/mingw.c
>> index 6750e67..fee4113 100644
>> --- a/compat/mingw.c
>> +++ b/compat/mingw.c
>> @@ -299,6 +299,21 @@ void mingw_mark_as_git_dir(const char *dir)
>> "dotGitOnly" : "true"));
>> }
>>
>> +int is_same_file(const char *a, const char *b)
>> +{
>> + BY_HANDLE_FILE_INFORMATION hia, hib;
>> + HANDLE ha = OpenFileA(a, NULL, OF_READ),
>> + hb = OpenFileA(b, NULL, OF_READ);
>> + if (!ha || !hb ||
>> + !GetFileInformationByHandle(ha) ||
>> + !GetFileInformationByHandle(hb))
>> + return 0;
>> +
>
> And if couse:
> CloseHandle(ha);
> CloseHandle(hb);
Good point. I will send a new patch, including your suggestion,
but 50% different ;-)
/Torsten
^ permalink raw reply [relevance 0%]
* [PATCH] Allow git mv FILENAME Filename when core.ignorecase = true
@ 2011-04-10 5:50 9% Torsten Bögershausen
0 siblings, 0 replies; 200+ results
From: Torsten Bögershausen @ 2011-04-10 5:50 UTC (permalink / raw)
To: git; +Cc: tboegi
Motivation:
The typical use case is when a file named "FILENAME" should be
renamed into "Filename" and we are on a case ignoring file system
(core.ignorecase = true).
Using "mv FILENAME Filename" outside git succeeds,
(on Windows and MAC OS X, under Linux the mv command rejects
"mv: `Filename' and `FILENAME' are the same file").
"git mv FILENAME Filename" is refused, "fatal: destination exists",
unless "git mv --forced FILENAME Filename" is used.
The underlying file system makes git think that the
destination "Filename" exists.
The following discussion assumes, that we are on a
"case ignoring" file system, and core.ignorecase = true.
This change allows "git mv FILENAME Filename".
Using non ASCII works as well, like "git mv MÄRCHEN Märchen".
The ambition is that "git mv FILENAME Filename" changes both
the git index and the filename in the working tree,
in the same way how "git mv Filename NewFile" works.
Note: Under Linux+vfat The rename() function does not the rename
in the working directory.
Implementation details:
A possible approach to allow the "git mv FILENAME Filename"
is to compare both file names using strcasecmp().
This works for filenames where all characters are ASCII,
It will fail for "git mv MÄRCHEN Märchen".
Git has now idea about the encoding of filenames
(like UTF-8, ISO-8859-1 or any other).
Neither has strcasecmp() an idea how to handle non ASCII characters.
With this patch git lets the underlying file system decide
if 2 file names refer to the same file.
Remember that the file system does this already, by returning the
same values for lstat("FILENAME") and lstat("Filename").
By comparing all members in "struct stat" we can be sure that
both filenames point out the same file.
This is done in the function "equivalent_filenames()".
As lstat() on Windows (mingw.c or cygwin.c) sets st_ino to 0,
(and st_dev and other fields in struct stat)
we need other checks when running under Windows.
Therefore a different implementation of equivalent_filenames() is used
under Windows.
It uses GetFileInformationByHandle() to get and compare
dwVolumeSerialNumber, nFileIndexLow and nFileIndexHigh.
It uses even lstat(), since Windows reports the same nFileIndexLow/High for
a file and a softlink (under cygwin) pointing to it.
To summarize:
equivalent_filenames() is OS specific and checks under Windows:
dwVolumeSerialNumber, nFileIndexLow/High, st_mode, st_size,
st_atime and st_mtime.
All other OS check
st_mode, st_dev, st_ino, st_uid, st_gid, st_size, st_atime, st_mtime.
As a bonus (or regression), a file name can be renamed to a file name
which is already hard-linked to the same inode.
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
builtin/mv.c | 10 +++++++-
compat/cygwin.c | 44 ++++++++++++++++++++++++++++++++++++++++
compat/cygwin.h | 3 ++
compat/mingw.c | 33 ++++++++++++++++++++++++++++++
compat/mingw.h | 3 ++
git-compat-util.h | 17 +++++++++++++++
t/t7001-mv.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
t/test-lib.sh | 4 +++
8 files changed, 169 insertions(+), 2 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 40f33ca..7be7d8a 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -165,14 +165,20 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
} else if (cache_name_pos(src, length) < 0)
bad = _("not under version control");
else if (lstat(dst, &st) == 0) {
+ int allow_force = force;
bad = _("destination exists");
- if (force) {
+ if (!force && ignore_case && equivalent_filenames(src, dst)) {
+ allow_force = 1;
+ bad = NULL;
+ }
+ if (allow_force) {
/*
* only files can overwrite each other:
* check both source and destination
*/
if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
- warning(_("%s; will overwrite!"), bad);
+ if (bad)
+ warning(_("%s; will overwrite!"), bad);
bad = NULL;
} else
bad = _("Cannot overwrite");
diff --git a/compat/cygwin.c b/compat/cygwin.c
index b4a51b9..4fdd94a 100644
--- a/compat/cygwin.c
+++ b/compat/cygwin.c
@@ -1,6 +1,7 @@
#define WIN32_LEAN_AND_MEAN
#include "../git-compat-util.h"
#include "win32.h"
+#include <io.h>
#include "../cache.h" /* to read configuration */
static inline void filetime_to_timespec(const FILETIME *ft, struct timespec *ts)
@@ -85,6 +86,49 @@ static int cygwin_stat(const char *path, struct stat *buf)
return do_stat(path, buf, stat);
}
+int cygwin_equivalent_filenames(const char *a, const char *b)
+{
+ int fd;
+ BY_HANDLE_FILE_INFORMATION hia, hib;
+ HANDLE h;
+ struct stat st_a, st_b;
+
+ if (lstat(a, &st_a) || lstat(b, &st_b))
+ return 0;
+
+ fd = open(a, O_RDONLY);
+ if (-1 == fd)
+ return 0;
+
+ h = (HANDLE)get_osfhandle(fd);
+ if (INVALID_HANDLE_VALUE == h)
+ return 0;
+
+ if (!(GetFileInformationByHandle(h,&hia)))
+ return 0;
+ CloseHandle(h);
+ close(fd);
+
+ fd = open(b, O_RDONLY);
+ if (-1 == fd)
+ return 0;
+
+ h = (HANDLE)get_osfhandle(fd);
+ if (INVALID_HANDLE_VALUE == h)
+ return 0;
+ if (!(GetFileInformationByHandle(h,&hib)))
+ return 0;
+ CloseHandle(h);
+ close(fd);
+
+ return st_a.st_mode == st_b.st_mode &&
+ st_a.st_size == st_b.st_size &&
+ st_a.st_atime == st_b.st_atime &&
+ st_a.st_mtime == st_b.st_mtime &&
+ hia.dwVolumeSerialNumber == hib.dwVolumeSerialNumber &&
+ hia.nFileIndexLow == hib.nFileIndexLow &&
+ hia.nFileIndexHigh == hib.nFileIndexHigh;
+}
/*
* At start up, we are trying to determine whether Win32 API or cygwin stat
diff --git a/compat/cygwin.h b/compat/cygwin.h
index a3229f5..04cc17e 100644
--- a/compat/cygwin.h
+++ b/compat/cygwin.h
@@ -7,3 +7,6 @@ extern stat_fn_t cygwin_lstat_fn;
#define stat(path, buf) (*cygwin_stat_fn)(path, buf)
#define lstat(path, buf) (*cygwin_lstat_fn)(path, buf)
+
+int cygwin_equivalent_filenames(const char *a, const char *b);
+#define equivalent_filenames cygwin_equivalent_filenames
diff --git a/compat/mingw.c b/compat/mingw.c
index 878b1de..56be81a 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -474,6 +474,39 @@ int mingw_fstat(int fd, struct stat *buf)
return -1;
}
+int mingw_equivalent_filenames(const char *a, const char *b)
+{
+ BY_HANDLE_FILE_INFORMATION hia, hib;
+ HANDLE h;
+ struct stat st_a, st_b;
+
+ if (lstat(a, &st_a) || lstat(b, &st_b))
+ return 0;
+
+ h = CreateFile(a, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+ if (INVALID_HANDLE_VALUE == h)
+ return 0;
+
+ if (!(GetFileInformationByHandle(h,&hia)))
+ return 0;
+ CloseHandle(h);
+
+ h = CreateFile(b, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+ if (INVALID_HANDLE_VALUE == h)
+ return 0;
+ if (!(GetFileInformationByHandle(h,&hib)))
+ return 0;
+ CloseHandle(h);
+
+ return st_a.st_mode == st_b.st_mode &&
+ st_a.st_size == st_b.st_size &&
+ st_a.st_atime == st_b.st_atime &&
+ st_a.st_mtime == st_b.st_mtime &&
+ hia.dwVolumeSerialNumber == hib.dwVolumeSerialNumber &&
+ hia.nFileIndexLow == hib.nFileIndexLow &&
+ hia.nFileIndexHigh == hib.nFileIndexHigh;
+}
+
static inline void time_t_to_filetime(time_t t, FILETIME *ft)
{
long long winTime = t * 10000000LL + 116444736000000000LL;
diff --git a/compat/mingw.h b/compat/mingw.h
index 62eccd3..3445104 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -303,6 +303,9 @@ int winansi_fprintf(FILE *stream, const char *format, ...) __attribute__((format
void mingw_open_html(const char *path);
#define open_html mingw_open_html
+int mingw_equivalent_filenames(const char *a, const char *b);
+#define equivalent_filenames mingw_equivalent_filenames
+
/*
* helpers
*/
diff --git a/git-compat-util.h b/git-compat-util.h
index 40498b3..d66cffe 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -567,4 +567,21 @@ int rmdir_or_warn(const char *path);
*/
int remove_or_warn(unsigned int mode, const char *path);
+#ifndef equivalent_filenames
+static inline int equivalent_filenames(const char *a, const char *b) {
+ struct stat st_a, st_b;
+ if (lstat(a, &st_a) || lstat(b, &st_b))
+ return 0;
+
+ return st_a.st_mode == st_b.st_mode &&
+ st_a.st_dev == st_b.st_dev &&
+ st_a.st_ino == st_b.st_ino &&
+ st_a.st_uid == st_b.st_uid &&
+ st_a.st_gid == st_b.st_gid &&
+ st_a.st_size == st_b.st_size &&
+ st_a.st_atime == st_b.st_atime &&
+ st_a.st_mtime == st_b.st_mtime;
+}
+#endif
+
#endif
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..0c4b96a 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,61 @@ test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -f moved symlink
+unset encoding
+ae_upper_asc=AE
+ae_lower_asc=ae
+ae_upper_utf8=$(printf '\303\206')
+ae_lower_utf8=$(printf '\303\246')
+
+for enc in utf8 asc ; do
+ eval ae_lower=\$ae_lower_$enc
+ eval ae_upper=\$ae_upper_$enc
+ if (>./$ae_lower && echo broken > ./$ae_upper && test x"$(cat $ae_lower)" = xbroken ) 2>/dev/null ; then
+ if err=$(mv $ae_lower $ae_upper 2>&1); then
+ unset err
+ encoding=$enc
+ break
+ fi
+ else
+ err="case sensitive file system"
+ fi
+done
+
+if test -n "$encoding"; then
+ test_expect_success "git mv AE ae $encoding" '
+ rm -fr .git * &&
+ git init &&
+ echo $encoding > $ae_upper &&
+ git add $ae_upper &&
+ git commit -m "add AE" &&
+ git mv $ae_upper $ae_lower &&
+ git commit -m "mv AE ae" &&
+ rm -f $ae_upper $ae_lower &&
+ git reset --hard &&
+ test "$(echo *)" = $ae_lower
+ '
+else
+ say "Skipping 'git mv AE ae' $err ($enc)"
+fi
+
+test_expect_success HARDLINKS 'git mv FILE File HARDLINKED' '
+ rm -fr .git * &&
+ git init &&
+ git config core.ignorecase true &&
+ echo FILE > FILE &&
+ git add FILE &&
+ git commit -m add FILE &&
+ {
+ if ! test -f File; then
+ ln FILE File
+ fi
+ } &&
+ git mv FILE File &&
+ git commit -m "mv FILE File" &&
+ rm -f FILE File &&
+ git reset --hard &&
+ test "$(echo *)" = File
+'
+
+
test_done
diff --git a/t/test-lib.sh b/t/test-lib.sh
index abc47f3..8c71583 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1080,6 +1080,10 @@ fi
# test whether the filesystem supports symbolic links
ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
rm -f y
+# test whether the filesystem supports hard links
+>x
+ln x y 2>/dev/null && test -f y 2>/dev/null && test_set_prereq HARDLINKS
+rm -f x y
# When the tests are run as root, permission tests will report that
# things are writable when they shouldn't be.
--
1.7.4.3
^ permalink raw reply related [relevance 9%]
* XDL_FAST_HASH breaks git on OS X 10.7.3
@ 2012-04-29 20:52 1% Brian Gernhardt
0 siblings, 0 replies; 200+ results
From: Brian Gernhardt @ 2012-04-29 20:52 UTC (permalink / raw)
To: Git List, Thomas Rast
I don't mean for the subject to be excessive, but it does cause 242 test files to fail and t9001-send-email.sh to hang by asking "Which 8bit encoding should I declare [UTF-8]?" Clearing XDL_FAST_HASH in my config.mak does fix the issue.
~~ Brian Gernhardt
Test Summary Report
-------------------
t9700-perl-git.sh (Wstat: 256 Tests: 44 Failed: 14)
Failed tests: 1, 4-5, 8, 10, 13-16, 28-29, 38, 43-44
Non-zero exit status: 1
t9502-gitweb-standalone-parse-output.sh (Wstat: 256 Tests: 16 Failed: 7)
Failed tests: 1-5, 7, 9
Non-zero exit status: 1
t9501-gitweb-standalone-http-status.sh (Wstat: 256 Tests: 12 Failed: 2)
Failed tests: 1, 8
Non-zero exit status: 1
t9401-git-cvsserver-crlf.sh (Wstat: 256 Tests: 17 Failed: 7)
Failed tests: 7-8, 10-11, 15-17
Non-zero exit status: 1
t9400-git-cvsserver-server.sh (Wstat: 256 Tests: 40 Failed: 3)
Failed tests: 30-31, 40
Non-zero exit status: 1
t9350-fast-export.sh (Wstat: 256 Tests: 28 Failed: 15)
Failed tests: 1-5, 10, 12-18, 20-21
Non-zero exit status: 1
t9139-git-svn-non-utf8-commitencoding.sh (Wstat: 256 Tests: 6 Failed: 1)
Failed test: 4
Non-zero exit status: 1
t9200-git-cvsexportcommit.sh (Wstat: 256 Tests: 14 Failed: 11)
Failed tests: 1-2, 4-8, 10-11, 13-14
Non-zero exit status: 1
t9500-gitweb-standalone-no-errors.sh (Wstat: 256 Tests: 117 Failed: 10)
Failed tests: 35-37, 51, 54, 69, 84-85, 100, 109
Non-zero exit status: 1
t9137-git-svn-dcommit-clobber-series.sh (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 4
Non-zero exit status: 1
t9125-git-svn-multi-glob-branch-names.sh (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t9124-git-svn-dcommit-auto-props.sh (Wstat: 256 Tests: 7 Failed: 3)
Failed tests: 3, 5-6
Non-zero exit status: 1
t9118-git-svn-funky-branch-names.sh (Wstat: 256 Tests: 5 Failed: 2)
Failed tests: 3-4
Non-zero exit status: 1
t9114-git-svn-dcommit-merge.sh (Wstat: 256 Tests: 6 Failed: 4)
Failed tests: 2-3, 5-6
Non-zero exit status: 1
t9116-git-svn-log.sh (Wstat: 256 Tests: 17 Failed: 14)
Failed tests: 1-5, 7-13, 16-17
Non-zero exit status: 1
t9105-git-svn-commit-diff.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t9106-git-svn-commit-diff-clobber.sh (Wstat: 256 Tests: 10 Failed: 8)
Failed tests: 1, 3-6, 8-10
Non-zero exit status: 1
t8007-cat-file-textconv.sh (Wstat: 256 Tests: 10 Failed: 5)
Failed tests: 1, 4-7
Non-zero exit status: 1
t8006-blame-textconv.sh (Wstat: 256 Tests: 16 Failed: 10)
Failed tests: 1-2, 4-6, 9, 12-14, 16
Non-zero exit status: 1
t8005-blame-i18n.sh (Wstat: 256 Tests: 5 Failed: 5)
Failed tests: 1-5
Non-zero exit status: 1
t8003-blame-corner-cases.sh (Wstat: 256 Tests: 19 Failed: 3)
Failed tests: 1, 12-13
Non-zero exit status: 1
t8002-blame.sh (Wstat: 256 Tests: 21 Failed: 7)
Failed tests: 5, 10, 14, 16, 18, 20-21
Non-zero exit status: 1
t8001-annotate.sh (Wstat: 256 Tests: 21 Failed: 6)
Failed tests: 5, 10, 14, 16, 18, 20
Non-zero exit status: 1
t7810-grep.sh (Wstat: 256 Tests: 108 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t9101-git-svn-props.sh (Wstat: 256 Tests: 26 Failed: 13)
Failed tests: 5, 8-18, 25
Non-zero exit status: 1
t7611-merge-abort.sh (Wstat: 256 Tests: 26 Failed: 9)
Failed tests: 9-13, 15-16, 24, 26
Non-zero exit status: 1
t7811-grep-open.sh (Wstat: 256 Tests: 10 Failed: 4)
Failed tests: 2, 5, 8, 10
Non-zero exit status: 1
t7701-repack-unpack-unreachable.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t7800-difftool.sh (Wstat: 256 Tests: 25 Failed: 25)
Failed tests: 1-25
Non-zero exit status: 1
t7610-mergetool.sh (Wstat: 256 Tests: 14 Failed: 14)
Failed tests: 1-14
Non-zero exit status: 1
t7609-merge-co-error-msgs.sh (Wstat: 256 Tests: 6 Failed: 5)
Failed tests: 1-5
Non-zero exit status: 1
t7607-merge-overwrite.sh (Wstat: 256 Tests: 17 Failed: 12)
Failed tests: 1-10, 13-14
Non-zero exit status: 1
t7608-merge-messages.sh (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t7509-commit.sh (Wstat: 256 Tests: 12 Failed: 12)
Failed tests: 1-12
Non-zero exit status: 1
t7507-commit-verbose.sh (Wstat: 256 Tests: 7 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t9100-git-svn-basic.sh (Wstat: 256 Tests: 25 Failed: 2)
Failed tests: 14, 16
Non-zero exit status: 1
t7506-status-submodule.sh (Wstat: 256 Tests: 28 Failed: 4)
Failed tests: 1, 21, 27-28
Non-zero exit status: 1
t7501-commit.sh (Wstat: 256 Tests: 45 Failed: 5)
Failed tests: 20-21, 26-27, 39
Non-zero exit status: 1
t7500-commit.sh (Wstat: 256 Tests: 32 Failed: 19)
Failed tests: 1, 8-14, 16, 21, 23-31
Non-zero exit status: 1
t7502-commit.sh (Wstat: 256 Tests: 45 Failed: 37)
Failed tests: 2, 4-8, 11-19, 22, 24, 26-45
Non-zero exit status: 1
t7408-submodule-reference.sh (Wstat: 256 Tests: 10 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t7405-submodule-merge.sh (Wstat: 256 Tests: 11 Failed: 7)
Failed tests: 2-8
Non-zero exit status: 1
t7407-submodule-foreach.sh (Wstat: 256 Tests: 15 Failed: 10)
Failed tests: 3, 5-13
Non-zero exit status: 1
t7403-submodule-sync.sh (Wstat: 256 Tests: 6 Failed: 5)
Failed tests: 1, 3-6
Non-zero exit status: 1
t7402-submodule-rebase.sh (Wstat: 256 Tests: 5 Failed: 3)
Failed tests: 2-4
Non-zero exit status: 1
t7300-clean.sh (Wstat: 256 Tests: 30 Failed: 18)
Failed tests: 1-6, 11-20, 23-24
Non-zero exit status: 1
t7201-co.sh (Wstat: 256 Tests: 35 Failed: 7)
Failed tests: 29-35
Non-zero exit status: 1
t7406-submodule-update.sh (Wstat: 256 Tests: 33 Failed: 23)
Failed tests: 1-5, 7-14, 20-25, 29-31, 33
Non-zero exit status: 1
t7105-reset-patch.sh (Wstat: 256 Tests: 8 Failed: 8)
Failed tests: 1-8
Non-zero exit status: 1
t7110-reset-merge.sh (Wstat: 256 Tests: 21 Failed: 21)
Failed tests: 1-21
Non-zero exit status: 1
t7101-reset.sh (Wstat: 256 Tests: 10 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t7060-wtstatus.sh (Wstat: 256 Tests: 10 Failed: 9)
Failed tests: 1-4, 6-10
Non-zero exit status: 1
t7006-pager.sh (Wstat: 256 Tests: 75 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t7004-tag.sh (Wstat: 256 Tests: 121 Failed: 10)
Failed tests: 104-109, 111-112, 115, 121
Non-zero exit status: 1
t7001-mv.sh (Wstat: 256 Tests: 29 Failed: 6)
Failed tests: 1, 3, 6, 12, 14, 18
Non-zero exit status: 1
t7003-filter-branch.sh (Wstat: 256 Tests: 33 Failed: 10)
Failed tests: 1, 3, 5-6, 12-13, 16, 31-33
Non-zero exit status: 1
t6050-replace.sh (Wstat: 256 Tests: 16 Failed: 11)
Failed tests: 2-4, 7-14
Non-zero exit status: 1
t6120-describe.sh (Wstat: 256 Tests: 36 Failed: 31)
Failed tests: 1-13, 15-24, 26-27, 29-30, 32, 34-36
Non-zero exit status: 1
t6042-merge-rename-corner-cases.sh (Wstat: 256 Tests: 26 Failed: 19)
Failed tests: 1-3, 5, 7, 9, 12-21, 23, 25-26
Non-zero exit status: 1
t6037-merge-ours-theirs.sh (Wstat: 256 Tests: 5 Failed: 4)
Failed tests: 1-3, 5
Non-zero exit status: 1
t6036-recursive-corner-cases.sh (Wstat: 256 Tests: 22 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t6034-merge-rename-nocruft.sh (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t6032-merge-large-rename.sh (Wstat: 256 Tests: 10 Failed: 5)
Failed tests: 2, 4, 7, 9-10
Non-zero exit status: 1
t6031-merge-recursive.sh (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 5
Non-zero exit status: 1
t6028-merge-up-to-date.sh (Wstat: 256 Tests: 6 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t6026-merge-attr.sh (Wstat: 256 Tests: 8 Failed: 7)
Failed tests: 1-7
Non-zero exit status: 1
t6029-merge-subtree.sh (Wstat: 256 Tests: 8 Failed: 8)
Failed tests: 1-8
Non-zero exit status: 1
t6027-merge-binary.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t6025-merge-symlinks.sh (Wstat: 256 Tests: 7 Failed: 3)
Failed tests: 1, 4, 6
Non-zero exit status: 1
t6024-recursive-merge.sh (Wstat: 256 Tests: 6 Failed: 5)
Failed tests: 2-6
Non-zero exit status: 1
t6023-merge-file.sh (Wstat: 256 Tests: 18 Failed: 11)
Failed tests: 1-5, 8, 10, 12, 16-18
Non-zero exit status: 1
t6030-bisect-porcelain.sh (Wstat: 256 Tests: 53 Failed: 7)
Failed tests: 35-38, 40-42
Non-zero exit status: 1
t6022-merge-rename.sh (Wstat: 256 Tests: 45 Failed: 45)
Failed tests: 1-45
Non-zero exit status: 1
t6018-rev-list-glob.sh (Wstat: 256 Tests: 36 Failed: 29)
Failed tests: 1-6, 9-12, 14-18, 20-27, 29-34
Non-zero exit status: 1
t6020-merge-df.sh (Wstat: 256 Tests: 6 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t6015-rev-list-show-all-parents.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t6013-rev-list-reverse-parents.sh (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t6012-rev-list-simplify.sh (Wstat: 256 Tests: 9 Failed: 9)
Failed tests: 1-9
Non-zero exit status: 1
t6009-rev-list-parent.sh (Wstat: 256 Tests: 13 Failed: 12)
Failed tests: 1-10, 12-13
Non-zero exit status: 1
t6007-rev-list-cherry-pick-file.sh (Wstat: 256 Tests: 17 Failed: 16)
Failed tests: 1-3, 5-17
Non-zero exit status: 1
t6006-rev-list-format.sh (Wstat: 256 Tests: 35 Failed: 2)
Failed tests: 1, 14
Non-zero exit status: 1
t6001-rev-list-graft.sh (Wstat: 256 Tests: 13 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t6004-rev-list-path-optim.sh (Wstat: 256 Tests: 7 Failed: 6)
Failed tests: 1, 3-7
Non-zero exit status: 1
t5900-repo-selection.sh (Wstat: 256 Tests: 8 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t5800-remote-helpers.sh (Wstat: 256 Tests: 14 Failed: 13)
Failed tests: 1-13
Non-zero exit status: 1
t5710-info-alternate.sh (Wstat: 256 Tests: 11 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t5708-clone-config.sh (Wstat: 256 Tests: 4 Failed: 1)
Failed test: 4
Non-zero exit status: 1
t5707-clone-detached.sh (Wstat: 256 Tests: 13 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t5704-bundle.sh (Wstat: 256 Tests: 7 Failed: 3)
Failed tests: 1-2, 7
Non-zero exit status: 1
t5570-git-daemon.sh (Wstat: 256 Tests: 16 Failed: 2)
Failed tests: 1, 4
TODO passed: 5
Non-zero exit status: 1
t5701-clone-local.sh (Wstat: 256 Tests: 17 Failed: 1)
Failed test: 14
Non-zero exit status: 1
t5700-clone-reference.sh (Wstat: 256 Tests: 23 Failed: 10)
Failed tests: 1-2, 5, 10, 12-13, 15, 17-18, 22
Non-zero exit status: 1
t5561-http-backend.sh (Wstat: 256 Tests: 14 Failed: 13)
Failed tests: 1, 3-14
Non-zero exit status: 1
t5560-http-backend-noserver.sh (Wstat: 256 Tests: 14 Failed: 13)
Failed tests: 1, 3-14
Non-zero exit status: 1
t5551-http-fetch.sh (Wstat: 256 Tests: 7 Failed: 3)
Failed tests: 1, 4-5
Non-zero exit status: 1
t5550-http-fetch.sh (Wstat: 256 Tests: 19 Failed: 3)
Failed tests: 1, 13-14
Non-zero exit status: 1
t5532-fetch-proxy.sh (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t5541-http-push.sh (Wstat: 256 Tests: 21 Failed: 8)
Failed tests: 10-16, 19
Non-zero exit status: 1
t5540-http-push.sh (Wstat: 256 Tests: 17 Failed: 4)
Failed tests: 13-16
Non-zero exit status: 1
t5530-upload-pack-error.sh (Wstat: 256 Tests: 10 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t5527-fetch-odd-refs.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t5526-fetch-submodules.sh (Wstat: 256 Tests: 25 Failed: 25)
Failed tests: 1-25
Non-zero exit status: 1
t5524-pull-msg.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t5523-push-upstream.sh (Wstat: 256 Tests: 17 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t5519-push-alternates.sh (Wstat: 256 Tests: 8 Failed: 1)
Failed test: 8
Non-zero exit status: 1
t5515-fetch-merge-logic.sh (Wstat: 256 Tests: 17 Failed: 17)
Failed tests: 1-17
Non-zero exit status: 1
t5520-pull.sh (Wstat: 256 Tests: 21 Failed: 10)
Failed tests: 6-14, 21
Non-zero exit status: 1
t5504-fetch-receive-strict.sh (Wstat: 256 Tests: 9 Failed: 9)
Failed tests: 1-9
Non-zero exit status: 1
t5510-fetch.sh (Wstat: 256 Tests: 40 Failed: 15)
Failed tests: 2-4, 14-15, 17-19, 31-33, 35-36, 39-40
Non-zero exit status: 1
t5001-archive-attr.sh (Wstat: 256 Tests: 21 Failed: 6)
Failed tests: 1, 14-15, 17-18, 21
Non-zero exit status: 1
t5404-tracking-branches.sh (Wstat: 256 Tests: 7 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t4300-merge-tree.sh (Wstat: 256 Tests: 14 Failed: 14)
Failed tests: 1-14
Non-zero exit status: 1
t5506-remote-groups.sh (Wstat: 256 Tests: 8 Failed: 7)
Failed tests: 2-8
Non-zero exit status: 1
t4253-am-keep-cr-dos.sh (Wstat: 256 Tests: 7 Failed: 7)
Failed tests: 1-7
Non-zero exit status: 1
t4208-log-magic-pathspec.sh (Wstat: 256 Tests: 5 Failed: 2)
Failed tests: 1, 5
Non-zero exit status: 1
t4206-log-follow-harder-copies.sh (Wstat: 256 Tests: 5 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t4202-log.sh (Wstat: 256 Tests: 32 Failed: 3)
Failed tests: 26-27, 32
Non-zero exit status: 1
t4203-mailmap.sh (Wstat: 256 Tests: 12 Failed: 3)
Failed tests: 10-12
Non-zero exit status: 1
t4209-log-pickaxe.sh (Wstat: 256 Tests: 18 Failed: 7)
Failed tests: 1, 7-12
Non-zero exit status: 1
t4200-rerere.sh (Wstat: 256 Tests: 25 Failed: 17)
Failed tests: 6-9, 11, 13-24
Non-zero exit status: 1
t4152-am-subjects.sh (Wstat: 256 Tests: 13 Failed: 4)
Failed tests: 2, 5-7
Non-zero exit status: 1
t4150-am.sh (Wstat: 256 Tests: 36 Failed: 31)
Failed tests: 2-6, 8-24, 27-35
Non-zero exit status: 1
t4130-apply-criss-cross-rename.sh (Wstat: 256 Tests: 7 Failed: 5)
Failed tests: 1, 3-4, 6-7
Non-zero exit status: 1
t4128-apply-root.sh (Wstat: 256 Tests: 7 Failed: 6)
Failed tests: 1, 3-7
Non-zero exit status: 1
t4125-apply-ws-fuzz.sh (Wstat: 256 Tests: 4 Failed: 4)
Failed tests: 1-4
Non-zero exit status: 1
t4122-apply-symlink-inside.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 2-3
Non-zero exit status: 1
t4123-apply-shrink.sh (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t4115-apply-symlink.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t4124-apply-ws-rule.sh (Wstat: 256 Tests: 74 Failed: 54)
Failed tests: 1-3, 5-55
Non-zero exit status: 1
t4114-apply-typechange.sh (Wstat: 256 Tests: 11 Failed: 7)
Failed tests: 1-5, 10-11
Non-zero exit status: 1
t4106-apply-stdin.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t4103-apply-binary.sh (Wstat: 256 Tests: 20 Failed: 12)
Failed tests: 1-3, 8-9, 14-20
Non-zero exit status: 1
t4051-diff-function-context.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 2-3
Non-zero exit status: 1
t4050-diff-histogram.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t4048-diff-combined-binary.sh (Wstat: 256 Tests: 14 Failed: 9)
Failed tests: 5-8, 10-14
Non-zero exit status: 1
t4047-diff-dirstat.sh (Wstat: 256 Tests: 40 Failed: 37)
Failed tests: 1-2, 4-37, 40
Non-zero exit status: 1
t4045-diff-relative.sh (Wstat: 256 Tests: 10 Failed: 6)
Failed tests: 1-4, 6-7
Non-zero exit status: 1
t4044-diff-index-unique-abbrev.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t4042-diff-textconv-caching.sh (Wstat: 256 Tests: 6 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t4038-diff-combined.sh (Wstat: 256 Tests: 4 Failed: 3)
Failed tests: 1, 3-4
Non-zero exit status: 1
t4037-diff-r-t-dirs.sh (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t4033-diff-patience.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t4030-diff-textconv.sh (Wstat: 256 Tests: 11 Failed: 1)
Failed test: 11
Non-zero exit status: 1
t4027-diff-submodule.sh (Wstat: 256 Tests: 22 Failed: 20)
Failed tests: 1-18, 20, 22
Non-zero exit status: 1
t4034-diff-words.sh (Wstat: 256 Tests: 36 Failed: 27)
Failed tests: 3-8, 10-11, 13-15, 17-18, 21-34
Non-zero exit status: 1
t4028-format-patch-mime-headers.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t4025-hunk-header.sh (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t4024-diff-optimize-common.sh (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t4023-diff-rename-typechange.sh (Wstat: 256 Tests: 4 Failed: 4)
Failed tests: 1-4
Non-zero exit status: 1
t4022-diff-rewrite.sh (Wstat: 256 Tests: 6 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t4020-diff-external.sh (Wstat: 256 Tests: 16 Failed: 13)
Failed tests: 1-12, 16
Non-zero exit status: 1
t4019-diff-wserror.sh (Wstat: 256 Tests: 21 Failed: 1)
Failed test: 20
Non-zero exit status: 1
t4018-diff-funcname.sh (Wstat: 256 Tests: 41 Failed: 39)
Failed tests: 1-29, 31-38, 40-41
Non-zero exit status: 1
t4017-diff-retval.sh (Wstat: 256 Tests: 24 Failed: 4)
Failed tests: 20-21, 23-24
Non-zero exit status: 1
t4016-diff-quote.sh (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 5
Non-zero exit status: 1
t4015-diff-whitespace.sh (Wstat: 256 Tests: 56 Failed: 27)
Failed tests: 1, 4, 12-16, 19-30, 35-37, 47-48, 52, 54
56
Non-zero exit status: 1
t4011-diff-symlink.sh (Wstat: 256 Tests: 8 Failed: 4)
Failed tests: 1, 3-5
Non-zero exit status: 1
t4014-format-patch.sh (Wstat: 256 Tests: 73 Failed: 12)
Failed tests: 62-73
Non-zero exit status: 1
t4004-diff-rename-symlink.sh (Wstat: 256 Tests: 4 Failed: 1)
Failed test: 4
Non-zero exit status: 1
t4003-diff-rename-1.sh (Wstat: 256 Tests: 7 Failed: 3)
Failed tests: 3, 5, 7
Non-zero exit status: 1
t4001-diff-rename.sh (Wstat: 256 Tests: 8 Failed: 4)
Failed tests: 4-7
Non-zero exit status: 1
t4000-diff-format.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 2-3
Non-zero exit status: 1
t3904-stash-patch.sh (Wstat: 256 Tests: 6 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t3902-quoted.sh (Wstat: 256 Tests: 13 Failed: 5)
Failed tests: 1, 4-5, 10-11
Non-zero exit status: 1
t3900-i18n-commit.sh (Wstat: 256 Tests: 30 Failed: 2)
Failed tests: 5, 29
Non-zero exit status: 1
t3800-mktag.sh (Wstat: 256 Tests: 26 Failed: 17)
Failed tests: 1, 11-26
Non-zero exit status: 1
t3702-add-edit.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t3903-stash.sh (Wstat: 256 Tests: 45 Failed: 14)
Failed tests: 12, 18-20, 22-30, 45
Non-zero exit status: 1
t3600-rm.sh (Wstat: 256 Tests: 36 Failed: 3)
Failed tests: 18-19, 28
Non-zero exit status: 1
t3510-cherry-pick-sequence.sh (Wstat: 256 Tests: 39 Failed: 35)
Failed tests: 1-5, 8-19, 21-35, 37-39
Non-zero exit status: 1
t3508-cherry-pick-many-commits.sh (Wstat: 256 Tests: 10 Failed: 10)
Failed tests: 1-10
Non-zero exit status: 1
t3509-cherry-pick-merge-df.sh (Wstat: 256 Tests: 9 Failed: 6)
Failed tests: 4-9
Non-zero exit status: 1
t3506-cherry-pick-ff.sh (Wstat: 256 Tests: 10 Failed: 4)
Failed tests: 1-3, 10
Non-zero exit status: 1
t3505-cherry-pick-empty.sh (Wstat: 256 Tests: 5 Failed: 3)
Failed tests: 1-2, 4
Non-zero exit status: 1
t3504-cherry-pick-rerere.sh (Wstat: 256 Tests: 6 Failed: 4)
Failed tests: 2-5
Non-zero exit status: 1
t3701-add-interactive.sh (Wstat: 256 Tests: 35 Failed: 15)
Failed tests: 2, 4-5, 7, 9-10, 16, 18, 21-25, 29, 31
Non-zero exit status: 1
t3500-cherry.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t3503-cherry-pick-root.sh (Wstat: 256 Tests: 6 Failed: 5)
Failed tests: 1-2, 4-6
Non-zero exit status: 1
t3418-rebase-continue.sh (Wstat: 256 Tests: 6 Failed: 1)
Failed test: 6
Non-zero exit status: 1
t3417-rebase-whitespace-fix.sh (Wstat: 256 Tests: 4 Failed: 3)
Failed tests: 2-4
Non-zero exit status: 1
t3413-rebase-hook.sh (Wstat: 256 Tests: 15 Failed: 13)
Failed tests: 1-3, 5-10, 12-15
Non-zero exit status: 1
t3409-rebase-preserve-merges.sh (Wstat: 256 Tests: 5 Failed: 5)
Failed tests: 1-5
Non-zero exit status: 1
t3408-rebase-multi-line.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t3410-rebase-preserve-dropped-merges.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 2-3
Non-zero exit status: 1
t3405-rebase-malformed.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t3402-rebase-merge.sh (Wstat: 256 Tests: 10 Failed: 8)
Failed tests: 2-4, 6-10
Non-zero exit status: 1
t3403-rebase-skip.sh (Wstat: 256 Tests: 10 Failed: 8)
Failed tests: 1-2, 4-8, 10
Non-zero exit status: 1
t3311-notes-merge-fanout.sh (Wstat: 256 Tests: 24 Failed: 24)
Failed tests: 1-24
Non-zero exit status: 1
t3310-notes-merge-manual-resolve.sh (Wstat: 256 Tests: 18 Failed: 4)
Failed tests: 5, 11, 13, 15
Non-zero exit status: 1
t3400-rebase.sh (Wstat: 256 Tests: 26 Failed: 16)
Failed tests: 1, 5-8, 12-16, 18-23
Non-zero exit status: 1
t3300-funny-names.sh (Wstat: 256 Tests: 27 Failed: 5)
Failed tests: 20, 22, 24, 26-27
Non-zero exit status: 1
t3210-pack-refs.sh (Wstat: 256 Tests: 13 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t3203-branch-output.sh (Wstat: 256 Tests: 12 Failed: 11)
Failed tests: 1-10, 12
Non-zero exit status: 1
t3200-branch.sh (Wstat: 256 Tests: 77 Failed: 6)
Failed tests: 1, 6, 39, 42, 70, 72
Non-zero exit status: 1
t3060-ls-files-with-tree.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t3031-merge-criscross.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t3030-merge-recursive.sh (Wstat: 256 Tests: 31 Failed: 27)
Failed tests: 1-26, 30
Non-zero exit status: 1
t3032-merge-recursive-options.sh (Wstat: 256 Tests: 11 Failed: 11)
Failed tests: 1-11
Non-zero exit status: 1
t3003-ls-files-exclude.sh (Wstat: 256 Tests: 7 Failed: 3)
Failed tests: 1, 3, 6
Non-zero exit status: 1
t2202-add-addremove.sh (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t2203-add-intent.sh (Wstat: 256 Tests: 7 Failed: 2)
Failed tests: 5-6
Non-zero exit status: 1
t2200-add-update.sh (Wstat: 256 Tests: 16 Failed: 3)
Failed tests: 1, 3, 5
Non-zero exit status: 1
t2105-update-index-gitfile.sh (Wstat: 256 Tests: 4 Failed: 2)
Failed tests: 1, 3
Non-zero exit status: 1
t2101-update-index-reupdate.sh (Wstat: 256 Tests: 7 Failed: 1)
Failed test: 4
Non-zero exit status: 1
t2050-git-dir-relative.sh (Wstat: 256 Tests: 4 Failed: 3)
Failed tests: 2-4
Non-zero exit status: 1
t2030-unresolve-info.sh (Wstat: 256 Tests: 8 Failed: 8)
Failed tests: 1-8
Non-zero exit status: 1
t2023-checkout-m.sh (Wstat: 256 Tests: 4 Failed: 4)
Failed tests: 1-4
Non-zero exit status: 1
t2022-checkout-paths.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t2020-checkout-detach.sh (Wstat: 256 Tests: 19 Failed: 9)
Failed tests: 1-7, 13-14
Non-zero exit status: 1
t2019-checkout-ambiguous-ref.sh (Wstat: 256 Tests: 9 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t2018-checkout-branch.sh (Wstat: 256 Tests: 18 Failed: 15)
Failed tests: 1, 3-7, 9-10, 12-18
Non-zero exit status: 1
t3404-rebase-interactive.sh (Wstat: 256 Tests: 51 Failed: 22)
Failed tests: 1, 11, 25-26, 30, 33-41, 43-49, 51
Non-zero exit status: 1
t2017-checkout-orphan.sh (Wstat: 256 Tests: 12 Failed: 6)
Failed tests: 1-3, 7-9
Non-zero exit status: 1
t2015-checkout-unborn.sh (Wstat: 256 Tests: 5 Failed: 2)
Failed tests: 1, 4
Non-zero exit status: 1
t2016-checkout-patch.sh (Wstat: 256 Tests: 14 Failed: 14)
Failed tests: 1-14
Non-zero exit status: 1
t2014-switch.sh (Wstat: 256 Tests: 4 Failed: 2)
Failed tests: 1, 3
Non-zero exit status: 1
t2013-checkout-submodule.sh (Wstat: 256 Tests: 6 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t2011-checkout-invalid-head.sh (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t2012-checkout-last.sh (Wstat: 256 Tests: 18 Failed: 10)
Failed tests: 1, 3-5, 7-8, 15-18
Non-zero exit status: 1
t2010-checkout-ambiguous.sh (Wstat: 256 Tests: 8 Failed: 5)
Failed tests: 1, 3, 6-8
Non-zero exit status: 1
t2009-checkout-statinfo.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t2008-checkout-subdir.sh (Wstat: 256 Tests: 8 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t2007-checkout-symlink.sh (Wstat: 256 Tests: 4 Failed: 2)
Failed tests: 1, 4
Non-zero exit status: 1
t1508-at-combinations.sh (Wstat: 256 Tests: 11 Failed: 9)
Failed tests: 1-9
Non-zero exit status: 1
t1412-reflog-loop.sh (Wstat: 256 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 1
t1506-rev-parse-diagnosis.sh (Wstat: 256 Tests: 17 Failed: 4)
Failed tests: 1-2, 11-12
Non-zero exit status: 1
t1411-reflog-show.sh (Wstat: 256 Tests: 10 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t1410-reflog.sh (Wstat: 256 Tests: 12 Failed: 12)
Failed tests: 1-12
Non-zero exit status: 1
t1501-worktree.sh (Wstat: 256 Tests: 31 Failed: 3)
Failed tests: 23, 26, 28
Non-zero exit status: 1
t1400-update-ref.sh (Wstat: 256 Tests: 41 Failed: 2)
Failed tests: 37-38
Non-zero exit status: 1
t1401-symbolic-ref.sh (Wstat: 256 Tests: 4 Failed: 1)
Failed test: 4
Non-zero exit status: 1
t1021-rerere-in-workdir.sh (Wstat: 256 Tests: 3 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t1004-read-tree-m-u-wf.sh (Wstat: 256 Tests: 17 Failed: 9)
Failed tests: 9-17
Non-zero exit status: 1
t1200-tutorial.sh (Wstat: 256 Tests: 27 Failed: 17)
Failed tests: 3-4, 6-8, 12-13, 15-24
Non-zero exit status: 1
t1005-read-tree-reset.sh (Wstat: 256 Tests: 6 Failed: 6)
Failed tests: 1-6
Non-zero exit status: 1
t0026-eol-config.sh (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t1002-read-tree-m-u-2way.sh (Wstat: 256 Tests: 22 Failed: 6)
Failed tests: 3-4, 6, 13-14, 18
Non-zero exit status: 1
t0025-crlf-auto.sh (Wstat: 256 Tests: 11 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t1001-read-tree-m-2way.sh (Wstat: 256 Tests: 28 Failed: 4)
Failed tests: 3-4, 13-14
Non-zero exit status: 1
t0020-crlf.sh (Wstat: 256 Tests: 34 Failed: 12)
Failed tests: 1, 10-17, 21, 25-26
Non-zero exit status: 1
t0022-crlf-rename.sh (Wstat: 256 Tests: 2 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 1
t0000-basic.sh (Wstat: 256 Tests: 48 Failed: 1)
Failed test: 43
Non-zero exit status: 1
t7008-grep-binary.sh (Wstat: 0 Tests: 20 Failed: 0)
TODO passed: 12
t0050-filesystem.sh (Wstat: 0 Tests: 10 Failed: 0)
TODO passed: 6
Files=579, Tests=8561, 893 wallclock secs ( 6.48 usr 2.29 sys + 349.46 cusr 473.32 csys = 831.55 CPU)
Result: FAIL
^ permalink raw reply [relevance 1%]
* [PATCH] Spelling fixes.
@ 2013-02-23 14:31 4% Ville Skyttä
0 siblings, 0 replies; 200+ results
From: Ville Skyttä @ 2013-02-23 14:31 UTC (permalink / raw)
To: git
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
---
Documentation/RelNotes/1.7.5.4.txt | 2 +-
Documentation/RelNotes/1.7.8.txt | 2 +-
Documentation/RelNotes/1.8.2.txt | 2 +-
Documentation/git-credential.txt | 2 +-
Documentation/git-remote-ext.txt | 2 +-
Documentation/git-svn.txt | 4 ++--
Documentation/revisions.txt | 2 +-
Documentation/technical/api-argv-array.txt | 2 +-
Documentation/technical/api-credentials.txt | 2 +-
Documentation/technical/api-ref-iteration.txt | 2 +-
builtin/apply.c | 6 +++---
commit.c | 2 +-
commit.h | 2 +-
contrib/mw-to-git/git-remote-mediawiki.perl | 6 +++---
contrib/mw-to-git/t/README | 6 +++---
contrib/mw-to-git/t/install-wiki/LocalSettings.php | 2 +-
contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 10 +++++-----
contrib/mw-to-git/t/test-gitmw-lib.sh | 2 +-
contrib/subtree/t/t7900-subtree.sh | 2 +-
diff.c | 2 +-
git-add--interactive.perl | 2 +-
git-cvsserver.perl | 4 ++--
git-gui/lib/blame.tcl | 2 +-
git-gui/lib/index.tcl | 2 +-
git-gui/lib/spellcheck.tcl | 4 ++--
git-quiltimport.sh | 2 +-
gitweb/INSTALL | 2 +-
gitweb/gitweb.perl | 6 +++---
kwset.c | 4 ++--
perl/Git.pm | 2 +-
perl/Git/I18N.pm | 2 +-
perl/private-Error.pm | 2 +-
po/README | 6 +++---
po/pt_PT.po | 2 +-
po/zh_CN.po | 2 +-
sequencer.c | 2 +-
t/t0022-crlf-rename.sh | 2 +-
t/t3701-add-interactive.sh | 2 +-
t/t4014-format-patch.sh | 6 +++---
t/t4124-apply-ws-rule.sh | 2 +-
t/t6030-bisect-porcelain.sh | 2 +-
t/t7001-mv.sh | 8 ++++----
t/t7004-tag.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 2 +-
t/t9001-send-email.sh | 2 +-
transport.h | 2 +-
xdiff/xdiffi.c | 2 +-
xdiff/xhistogram.c | 2 +-
49 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/Documentation/RelNotes/1.7.5.4.txt b/Documentation/RelNotes/1.7.5.4.txt
index cf3f455..7796df3 100644
--- a/Documentation/RelNotes/1.7.5.4.txt
+++ b/Documentation/RelNotes/1.7.5.4.txt
@@ -5,7 +5,7 @@ Fixes since v1.7.5.3
--------------------
* The single-key mode of "git add -p" was easily fooled into thinking
- that it was told to add everthing ('a') when up-arrow was pressed by
+ that it was told to add everything ('a') when up-arrow was pressed by
mistake.
* Setting a git command that uses custom configuration via "-c var=val"
diff --git a/Documentation/RelNotes/1.7.8.txt b/Documentation/RelNotes/1.7.8.txt
index b4d90bb..7012329 100644
--- a/Documentation/RelNotes/1.7.8.txt
+++ b/Documentation/RelNotes/1.7.8.txt
@@ -9,7 +9,7 @@ Updates since v1.7.7
* Updates to bash completion scripts.
* The build procedure has been taught to take advantage of computed
- dependency automatically when the complier supports it.
+ dependency automatically when the compiler supports it.
* The date parser now accepts timezone designators that lack minutes
part and also has a colon between "hh:mm".
diff --git a/Documentation/RelNotes/1.8.2.txt b/Documentation/RelNotes/1.8.2.txt
index a287f24..4e63644 100644
--- a/Documentation/RelNotes/1.8.2.txt
+++ b/Documentation/RelNotes/1.8.2.txt
@@ -17,7 +17,7 @@ preference configuration variable "push.default" to change this.
"git push $there tag v1.2.3" used to allow replacing a tag v1.2.3
that already exists in the repository $there, if the rewritten tag
-you are pushing points at a commit that is a decendant of a commit
+you are pushing points at a commit that is a descendant of a commit
that the old tag v1.2.3 points at. This was found to be error prone
and starting with this release, any attempt to update an existing
ref under refs/tags/ hierarchy will fail, without "--force".
diff --git a/Documentation/git-credential.txt b/Documentation/git-credential.txt
index 472f00f..7da0f13 100644
--- a/Documentation/git-credential.txt
+++ b/Documentation/git-credential.txt
@@ -56,7 +56,7 @@ For example, if we want a password for
`https://example.com/foo.git`, we might generate the following
credential description (don't forget the blank line at the end; it
tells `git credential` that the application finished feeding all the
-infomation it has):
+information it has):
protocol=https
host=example.com
diff --git a/Documentation/git-remote-ext.txt b/Documentation/git-remote-ext.txt
index 58b7fac..8cfc748 100644
--- a/Documentation/git-remote-ext.txt
+++ b/Documentation/git-remote-ext.txt
@@ -86,7 +86,7 @@ begins with `ext::`. Examples:
edit .ssh/config.
"ext::socat -t3600 - ABSTRACT-CONNECT:/git-server %G/somerepo"::
- Represents repository with path /somerepo accessable over
+ Represents repository with path /somerepo accessible over
git protocol at abstract namespace address /git-server.
"ext::git-server-alias foo %G/repo"::
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 1b8b649..7706d41 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -245,7 +245,7 @@ first have already been pushed into SVN.
patch), "all" (accept all patches), or "quit".
+
'git svn dcommit' returns immediately if answer if "no" or "quit", without
- commiting anything to SVN.
+ committing anything to SVN.
'branch'::
Create a branch in the SVN repository.
@@ -856,7 +856,7 @@ HANDLING OF SVN BRANCHES
------------------------
If 'git svn' is configured to fetch branches (and --follow-branches
is in effect), it sometimes creates multiple Git branches for one
-SVN branch, where the addtional branches have names of the form
+SVN branch, where the additional branches have names of the form
'branchname@nnn' (with nnn an SVN revision number). These additional
branches are created if 'git svn' cannot find a parent commit for the
first commit in an SVN branch, to connect the branch to the history of
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 678d175..39a855a 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -55,7 +55,7 @@ when you run `git cherry-pick`.
+
Note that any of the 'refs/*' cases above may come either from
the '$GIT_DIR/refs' directory or from the '$GIT_DIR/packed-refs' file.
-While the ref name encoding is unspecified, UTF-8 is prefered as
+While the ref name encoding is unspecified, UTF-8 is preferred as
some output processing may assume ref names in UTF-8.
'<refname>@\{<date>\}', e.g. 'master@\{yesterday\}', 'HEAD@\{5 minutes ago\}'::
diff --git a/Documentation/technical/api-argv-array.txt b/Documentation/technical/api-argv-array.txt
index a959517..a6b7d83 100644
--- a/Documentation/technical/api-argv-array.txt
+++ b/Documentation/technical/api-argv-array.txt
@@ -55,7 +55,7 @@ Functions
initial, empty state.
`argv_array_detach`::
- Detach the argv array from the `struct argv_array`, transfering
+ Detach the argv array from the `struct argv_array`, transferring
ownership of the allocated array and strings.
`argv_array_free_detached`::
diff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt
index 516fda7..c1b42a4 100644
--- a/Documentation/technical/api-credentials.txt
+++ b/Documentation/technical/api-credentials.txt
@@ -160,7 +160,7 @@ int foo_login(struct foo_connection *f)
break;
default:
/*
- * Some other error occured. We don't know if the
+ * Some other error occurred. We don't know if the
* credential is good or bad, so report nothing to the
* credential subsystem.
*/
diff --git a/Documentation/technical/api-ref-iteration.txt b/Documentation/technical/api-ref-iteration.txt
index dbbea95..aa1c50f 100644
--- a/Documentation/technical/api-ref-iteration.txt
+++ b/Documentation/technical/api-ref-iteration.txt
@@ -35,7 +35,7 @@ Iteration functions
* `head_ref_submodule()`, `for_each_ref_submodule()`,
`for_each_ref_in_submodule()`, `for_each_tag_ref_submodule()`,
`for_each_branch_ref_submodule()`, `for_each_remote_ref_submodule()`
- do the same as the functions descibed above but for a specified
+ do the same as the functions described above but for a specified
submodule.
* `for_each_rawref()` can be used to learn about broken ref and symref.
diff --git a/builtin/apply.c b/builtin/apply.c
index 06f5320..f6a3c97 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1921,7 +1921,7 @@ static int parse_binary(char *buffer, unsigned long size, struct patch *patch)
}
/*
- * Read the patch text in "buffer" taht extends for "size" bytes; stop
+ * Read the patch text in "buffer" that extends for "size" bytes; stop
* reading after seeing a single patch (i.e. changes to a single file).
* Create fragments (i.e. patch hunks) and hang them to the given patch.
* Return the number of bytes consumed, so that the caller can call us
@@ -3025,7 +3025,7 @@ static struct patch *in_fn_table(const char *name)
*
* The latter is needed to deal with a case where two paths A and B
* are swapped by first renaming A to B and then renaming B to A;
- * moving A to B should not be prevented due to presense of B as we
+ * moving A to B should not be prevented due to presence of B as we
* will remove it in a later patch.
*/
#define PATH_TO_BE_DELETED ((struct patch *) -2)
@@ -3509,7 +3509,7 @@ static int check_patch(struct patch *patch)
*
* A patch to swap-rename between A and B would first rename A
* to B and then rename B to A. While applying the first one,
- * the presense of B should not stop A from getting renamed to
+ * the presence of B should not stop A from getting renamed to
* B; ask to_be_deleted() about the later rename. Removal of
* B and rename from A to B is handled the same way by asking
* was_deleted().
diff --git a/commit.c b/commit.c
index e8eb0ae..1a41757 100644
--- a/commit.c
+++ b/commit.c
@@ -834,7 +834,7 @@ struct commit_list *get_merge_bases(struct commit *one, struct commit *two,
}
/*
- * Is "commit" a decendant of one of the elements on the "with_commit" list?
+ * Is "commit" a descendant of one of the elements on the "with_commit" list?
*/
int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
{
diff --git a/commit.h b/commit.h
index 4138bb4..252c7f8 100644
--- a/commit.h
+++ b/commit.h
@@ -164,7 +164,7 @@ extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *r
extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
-/* largest postive number a signed 32-bit integer can contain */
+/* largest positive number a signed 32-bit integer can contain */
#define INFINITE_DEPTH 0x7fffffff
extern int register_shallow(const unsigned char *sha1);
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 094129d..779c379 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -28,7 +28,7 @@ use warnings;
use constant SLASH_REPLACEMENT => "%2F";
# It's not always possible to delete pages (may require some
-# priviledges). Deleted pages are replaced with this content.
+# privileges). Deleted pages are replaced with this content.
use constant DELETED_CONTENT => "[[Category:Deleted]]\n";
# It's not possible to create empty pages. New empty files in Git are
@@ -841,7 +841,7 @@ sub mw_import_ref {
if ($fetch_from == 1 && $n == 0) {
print STDERR "You appear to have cloned an empty MediaWiki.\n";
# Something has to be done remote-helper side. If nothing is done, an error is
- # thrown saying that HEAD is refering to unknown object 0000000000000000000
+ # thrown saying that HEAD is referring to unknown object 0000000000000000000
# and the clone fails.
}
}
@@ -986,7 +986,7 @@ sub mw_upload_file {
print STDERR "Check the configuration of file uploads in your mediawiki.\n";
return $newrevid;
}
- # Deleting and uploading a file requires a priviledged user
+ # Deleting and uploading a file requires a privileged user
if ($file_deleted) {
mw_connect_maybe();
my $query = {
diff --git a/contrib/mw-to-git/t/README b/contrib/mw-to-git/t/README
index 96e9739..03f6ee5 100644
--- a/contrib/mw-to-git/t/README
+++ b/contrib/mw-to-git/t/README
@@ -25,7 +25,7 @@ Principles and Technical Choices
The test environment makes it easy to install and manipulate one or
several MediaWiki instances. To allow developers to run the testsuite
-easily, the environment does not require root priviledge (except to
+easily, the environment does not require root privilege (except to
install the required packages if needed). It starts a webserver
instance on the user's account (using lighttpd greatly helps for
that), and does not need a separate database daemon (thanks to the use
@@ -81,7 +81,7 @@ parameters, please refer to the `test-gitmw-lib.sh` and
** `test_check_wiki_precond`:
Check if the tests must be skipped or not. Please use this function
-at the beggining of each new test file.
+at the beginning of each new test file.
** `wiki_getpage`:
Fetch a given page from the wiki and puts its content in the
@@ -113,7 +113,7 @@ Tests if a given page exists on the wiki.
** `wiki_reset`:
Reset the wiki, i.e. flush the database. Use this function at the
-begining of each new test, except if the test re-uses the same wiki
+beginning of each new test, except if the test re-uses the same wiki
(and history) as the previous test.
How to write a new test
diff --git a/contrib/mw-to-git/t/install-wiki/LocalSettings.php b/contrib/mw-to-git/t/install-wiki/LocalSettings.php
index 29f1251..745e47e 100644
--- a/contrib/mw-to-git/t/install-wiki/LocalSettings.php
+++ b/contrib/mw-to-git/t/install-wiki/LocalSettings.php
@@ -88,7 +88,7 @@ $wgShellLocale = "en_US.utf8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
-## be publically accessible from the web.
+## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/Names.php
diff --git a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
index b6405ce..e764ddc 100755
--- a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
+++ b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
@@ -139,7 +139,7 @@ test_expect_success 'character $ in file name (git -> mw) ' '
'
-test_expect_failure 'capital at the begining of file names' '
+test_expect_failure 'capital at the beginning of file names' '
wiki_reset &&
git clone mediawiki::'"$WIKI_URL"' mw_dir_10 &&
(
@@ -156,7 +156,7 @@ test_expect_failure 'capital at the begining of file names' '
'
-test_expect_failure 'special character at the begining of file name from mw to git' '
+test_expect_failure 'special character at the beginning of file name from mw to git' '
wiki_reset &&
git clone mediawiki::'"$WIKI_URL"' mw_dir_11 &&
wiki_editpage {char_1 "expect to be renamed {char_1" false &&
@@ -207,7 +207,7 @@ test_expect_success 'test of correct formating for file name from mw to git' '
'
-test_expect_failure 'test of correct formating for file name begining with special character' '
+test_expect_failure 'test of correct formating for file name beginning with special character' '
wiki_reset &&
git clone mediawiki::'"$WIKI_URL"' mw_dir_13 &&
(
@@ -215,7 +215,7 @@ test_expect_failure 'test of correct formating for file name begining with speci
echo "my new file {char_1" >\{char_1.mw &&
echo "my new file [char_2" >\[char_2.mw &&
git add . &&
- git commit -am "commiting some exotic file name..." &&
+ git commit -am "committing some exotic file name..." &&
git push &&
git pull
) &&
@@ -234,7 +234,7 @@ test_expect_success 'test of correct formating for file name from git to mw' '
echo "my new file char{_1" >Char\{_1.mw &&
echo "my new file char[_2" >Char\[_2.mw &&
git add . &&
- git commit -m "commiting some exotic file name..." &&
+ git commit -m "committing some exotic file name..." &&
git push
) &&
wiki_getallpage ref_page_14 &&
diff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh
index 3b2cfac..dbaf47d 100755
--- a/contrib/mw-to-git/t/test-gitmw-lib.sh
+++ b/contrib/mw-to-git/t/test-gitmw-lib.sh
@@ -95,7 +95,7 @@ test_diff_directories () {
# Check that <dir> contains exactly <N> files
test_contains_N_files () {
if test `ls -- "$1" | wc -l` -ne "$2"; then
- echo "directory $1 sould contain $2 files"
+ echo "directory $1 should contain $2 files"
echo "it contains these files:"
ls "$1"
false
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 80d3399..4729521 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -419,7 +419,7 @@ test_expect_success 'add main-sub5' '
test_expect_success 'split for main-sub5 without --onto' '
# also test that we still can split out an entirely new subtree
# if the parent of the first commit in the tree is not empty,
- # then the new subtree has accidently been attached to something
+ # then the new subtree has accidentally been attached to something
git subtree split --prefix subdir2 --branch mainsub5 &&
check_equal ''"$(git log --pretty=format:%P -1 mainsub5)"'' ""
'
diff --git a/diff.c b/diff.c
index 156fec4..71ac502 100644
--- a/diff.c
+++ b/diff.c
@@ -1553,7 +1553,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
* Binary files are displayed with "Bin XXX -> YYY bytes"
* instead of the change count and graph. This part is treated
* similarly to the graph part, except that it is not
- * "scaled". If total width is too small to accomodate the
+ * "scaled". If total width is too small to accommodate the
* guaranteed minimum width of the filename part and the
* separators and this message, this message will "overflow"
* making the line longer than the maximum width.
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 710764a..d2c4ce6 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1247,7 +1247,7 @@ sub summarize_hunk {
# Print a one-line summary of each hunk in the array ref in
-# the first argument, starting wih the index in the 2nd.
+# the first argument, starting with the index in the 2nd.
sub display_hunks {
my ($hunks, $i) = @_;
my $ctr = 0;
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 3679074..b50a970 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2911,7 +2911,7 @@ sub filenamesplit
}
# Cleanup various junk in filename (try to canonicalize it), and
-# add prependdir to accomodate running CVS client from a
+# add prependdir to accommodate running CVS client from a
# subdirectory (so the output is relative to top directory of the project).
sub filecleanup
{
@@ -4583,7 +4583,7 @@ sub getmeta
# the numerical value of the corresponding byte plus
# 100.
# - "plus 100" avoids "0"s, and also reduces the
- # likelyhood of a collision in the case that someone someday
+ # likelihood of a collision in the case that someone someday
# writes an import tool that tries to preserve original
# CVS revision numbers, and the original CVS data had done
# lots of branches off of branches and other strangeness to
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 324f774..b1d15f4 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -5,7 +5,7 @@ class blame {
image create photo ::blame::img_back_arrow -data {R0lGODlhGAAYAIUAAPwCBEzKXFTSZIz+nGzmhGzqfGTidIT+nEzGXHTqhGzmfGzifFzadETCVES+VARWDFzWbHzyjAReDGTadFTOZDSyRDyyTCymPARaFGTedFzSbDy2TCyqRCyqPARaDAyCHES6VDy6VCyiPAR6HCSeNByWLARyFARiDARqFGTifARiFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAYABgAAAajQIBwSCwaj8ikcsk0BppJwRPqHEypQwHBis0WDAdEFyBIKBaMAKLBdjQeSkFBYTBAIvgEoS6JmhUTEwIUDQ4VFhcMGEhyCgoZExoUaxsWHB0THkgfAXUGAhoBDSAVFR0XBnCbDRmgog0hpSIiDJpJIyEQhBUcJCIlwA22SSYVogknEg8eD82qSigdDSknY0IqJQXPYxIl1dZCGNvWw+Dm510GQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7}
-# Persistant data (survives loads)
+# Persistent data (survives loads)
#
field history {}; # viewer history: {commit path}
field header ; # array commit,key -> header field
diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
index 8efbbdd..74a81a7 100644
--- a/git-gui/lib/index.tcl
+++ b/git-gui/lib/index.tcl
@@ -414,7 +414,7 @@ proc revert_helper {txt paths} {
# such distinction is needed in some languages. Previously, the
# code used "Revert changes in" for both, but that can't work
# in languages where 'in' must be combined with word from
- # rest of string (in diffrent way for both cases of course).
+ # rest of string (in different way for both cases of course).
#
# FIXME: Unfortunately, even that isn't enough in some languages
# as they have quite complex plural-form rules. Unfortunately,
diff --git a/git-gui/lib/spellcheck.tcl b/git-gui/lib/spellcheck.tcl
index e612030..538d61c 100644
--- a/git-gui/lib/spellcheck.tcl
+++ b/git-gui/lib/spellcheck.tcl
@@ -14,7 +14,7 @@ field w_menu ; # context menu for the widget
field s_menuidx 0 ; # last index of insertion into $w_menu
field s_i {} ; # timer registration for _run callbacks
-field s_clear 0 ; # did we erase mispelled tags yet?
+field s_clear 0 ; # did we erase misspelled tags yet?
field s_seen [list] ; # lines last seen from $w_text in _run
field s_checked [list] ; # lines already checked
field s_pending [list] ; # [$line $data] sent to ispell/aspell
@@ -259,7 +259,7 @@ method _run {} {
if {$n == $cur_line
&& ![regexp {^\W$} [$w_text get $cur_pos insert]]} {
- # If the current word is mispelled remove the tag
+ # If the current word is misspelled remove the tag
# but force a spellcheck later.
#
set tags [$w_text tag names $cur_pos]
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 9a6ba2b..8e17525 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -59,7 +59,7 @@ tmp_patch="$tmp_dir/patch"
tmp_info="$tmp_dir/info"
-# Find the intial commit
+# Find the initial commit
commit=$(git rev-parse HEAD)
mkdir $tmp_dir || exit 2
diff --git a/gitweb/INSTALL b/gitweb/INSTALL
index 6d45406..08f3dda 100644
--- a/gitweb/INSTALL
+++ b/gitweb/INSTALL
@@ -244,7 +244,7 @@ for gitweb (in gitweb/README), and gitweb.conf(5) manpage.
through the GITWEB_CONFIG_SYSTEM environment variable.
Note that if per-instance configuration file exists, then system-wide
- configuration is _not used at all_. This is quite untypical and suprising
+ configuration is _not used at all_. This is quite untypical and surprising
behavior. On the other hand changing current behavior would break backwards
compatibility and can lead to unexpected changes in gitweb behavior.
Therefore gitweb also looks for common system-wide configuration file,
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 1309196..80950c0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -683,7 +683,7 @@ sub evaluate_gitweb_config {
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++";
- # Protect agains duplications of file names, to not read config twice.
+ # Protect against duplications of file names, to not read config twice.
# Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
# there possibility of duplication of filename there doesn't matter.
$GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON);
@@ -1136,7 +1136,7 @@ sub handle_errors_html {
# to avoid infinite loop where error occurs in die_error,
# change handler to default handler, disabling handle_errors_html
- set_message("Error occured when inside die_error:\n$msg");
+ set_message("Error occurred when inside die_error:\n$msg");
# you cannot jump out of die_error when called as error handler;
# the subroutine set via CGI::Carp::set_message is called _after_
@@ -7485,7 +7485,7 @@ sub git_object {
system(git_cmd(), "cat-file", '-e', $hash_base) == 0
or die_error(404, "Base object does not exist");
- # here errors should not hapen
+ # here errors should not happen
open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name
or die_error(500, "Open git-ls-tree failed");
my $line = <$fd>;
diff --git a/kwset.c b/kwset.c
index 51b2ab6..5800999 100644
--- a/kwset.c
+++ b/kwset.c
@@ -26,7 +26,7 @@
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-/* The algorithm implemented by these routines bears a startling resemblence
+/* The algorithm implemented by these routines bears a startling resemblance
to one discovered by Beate Commentz-Walter, although it is not identical.
See "A String Matching Algorithm Fast on the Average," Technical Report,
IBM-Germany, Scientific Center Heidelberg, Tiergartenstrasse 15, D-6900
@@ -435,7 +435,7 @@ kwsprep (kwset_t kws)
/* Update the delta table for the descendents of this node. */
treedelta(curr->links, curr->depth, delta);
- /* Compute the failure function for the decendents of this node. */
+ /* Compute the failure function for the descendants of this node. */
treefails(curr->links, curr->fail, kwset->trie);
/* Update the shifts at each node in the current node's chain
diff --git a/perl/Git.pm b/perl/Git.pm
index a56d1e7..2adec53 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1029,7 +1029,7 @@ my (%TEMP_FILEMAP, %TEMP_FILES);
=item temp_acquire ( NAME )
-Attempts to retreive the temporary file mapped to the string C<NAME>. If an
+Attempts to retrieve the temporary file mapped to the string C<NAME>. If an
associated temp file has not been created this session or was closed, it is
created, cached, and set for autoflush and binmode.
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 40dd897..f889fd6 100644
--- a/perl/Git/I18N.pm
+++ b/perl/Git/I18N.pm
@@ -68,7 +68,7 @@ Git::I18N - Perl interface to Git's Gettext localizations
print __("Welcome to Git!\n");
- printf __("The following error occured: %s\n"), $error;
+ printf __("The following error occurred: %s\n"), $error;
=head1 DESCRIPTION
diff --git a/perl/private-Error.pm b/perl/private-Error.pm
index 11e9cd9..9a0c567 100644
--- a/perl/private-Error.pm
+++ b/perl/private-Error.pm
@@ -769,7 +769,7 @@ is a numeric value. These values are what will be returned by the
overload methods.
If the text value ends with C<at file line 1> as $@ strings do, then
-this infomation will be used to set the C<-file> and C<-line> arguments
+this information will be used to set the C<-file> and C<-line> arguments
of the error object.
This class is used internally if an eval'd block die's with an error
diff --git a/po/README b/po/README
index c1520e8..d8c9111 100644
--- a/po/README
+++ b/po/README
@@ -232,7 +232,7 @@ Shell:
# To interpolate variables:
details="oh noes"
- eval_gettext "An error occured: \$details"; echo
+ eval_gettext "An error occurred: \$details"; echo
In addition we have wrappers for messages that end with a trailing
newline. I.e. you could write the above as:
@@ -242,7 +242,7 @@ Shell:
# To interpolate variables:
details="oh noes"
- eval_gettextln "An error occured: \$details"
+ eval_gettextln "An error occurred: \$details"
More documentation about the interface is available in the GNU info
page: `info '(gettext)sh'`. Looking at git-am.sh (the first shell
@@ -257,7 +257,7 @@ Perl:
use Git::I18N;
print __("Welcome to Git!\n");
- printf __("The following error occured: %s\n"), $error;
+ printf __("The following error occurred: %s\n"), $error;
Run `perldoc perl/Git/I18N.pm` for more info.
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 517ec29..d8f5abd 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -1,7 +1,7 @@
# Portuguese translations for Git package.
# Copyright (C) 2012 Marco Sousa <marcomsousa AT gmail.com>
# This file is distributed under the same license as the Git package.
-# Contributers:
+# Contributors:
# - Marco Sousa <marcomsousa AT gmail.com>
#
msgid ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 6379876..f7e3270 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -2,7 +2,7 @@
# Git 软件包的简体中文翻译.
# Copyright (C) 2012,2013 Jiang Xin <worldhello.net AT gmail.com>
# This file is distributed under the same license as the Git package.
-# Contributers:
+# Contributors:
# - Jiang Xin <worldhello.net AT gmail.com>
# - Riku <lu.riku AT gmail.com>
# - Zhuang Ya <zhuangya AT me.com>
diff --git a/sequencer.c b/sequencer.c
index aef5e8a..bad5077 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -133,7 +133,7 @@ static void print_advice(int show_hint, struct replay_opts *opts)
if (msg) {
fprintf(stderr, "%s\n", msg);
/*
- * A conflict has occured but the porcelain
+ * A conflict has occurred but the porcelain
* (typically rebase --interactive) wants to take care
* of the commit itself so remove CHERRY_PICK_HEAD
*/
diff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh
index 7af3fbc..f702302 100755
--- a/t/t0022-crlf-rename.sh
+++ b/t/t0022-crlf-rename.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='ignore CR in CRLF sequence while computing similiarity'
+test_description='ignore CR in CRLF sequence while computing similarity'
. ./test-lib.sh
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 098a6ae..9fab25c 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -319,7 +319,7 @@ test_expect_success PERL 'split hunk "add -p (edit)"' '
# times to get out.
#
# 2. Correct version applies the (not)edited version, and asks
- # about the next hunk, against wich we say q and program
+ # about the next hunk, against which we say q and program
# exits.
for a in s e q n q q
do
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 7fa3647..e91e66c 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -742,21 +742,21 @@ test_expect_success 'format-patch --signature --cover-letter' '
test 2 = $(grep "my sig" output | wc -l)
'
-test_expect_success 'format.signature="" supresses signatures' '
+test_expect_success 'format.signature="" suppresses signatures' '
git config format.signature "" &&
git format-patch --stdout -1 >output &&
check_patch output &&
! grep "^-- \$" output
'
-test_expect_success 'format-patch --no-signature supresses signatures' '
+test_expect_success 'format-patch --no-signature suppresses signatures' '
git config --unset-all format.signature &&
git format-patch --stdout --no-signature -1 >output &&
check_patch output &&
! grep "^-- \$" output
'
-test_expect_success 'format-patch --signature="" supresses signatures' '
+test_expect_success 'format-patch --signature="" suppresses signatures' '
git format-patch --stdout --signature="" -1 >output &&
check_patch output &&
! grep "^-- \$" output
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index 6f6ee88..581a801 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -47,7 +47,7 @@ test_fix () {
# find touched lines
$DIFF file target | sed -n -e "s/^> //p" >fixed
- # the changed lines are all expeced to change
+ # the changed lines are all expected to change
fixed_cnt=$(wc -l <fixed)
case "$1" in
'') expect_cnt=$fixed_cnt ;;
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index 3e0e15f..8bf99e1 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -190,7 +190,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
# $HASH1 is good, $HASH4 is bad, we skip $HASH3
# but $HASH2 is bad,
# so we should find $HASH2 as the first bad commit
-test_expect_success 'bisect skip: successfull result' '
+test_expect_success 'bisect skip: successful result' '
git bisect reset &&
git bisect start $HASH4 $HASH1 &&
git bisect skip &&
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..3a51878 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -16,7 +16,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'cd .. && git commit -m move-out -a'
test_expect_success \
@@ -30,7 +30,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'cd .. && git commit -m move-in -a'
test_expect_success \
@@ -82,7 +82,7 @@ test_expect_success \
'git mv path0 path2'
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'git commit -m dir-move -a'
test_expect_success \
@@ -101,7 +101,7 @@ test_expect_success \
'git mv path2 path1'
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'git commit -m dir-move -a'
test_expect_success \
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index f5a79b1..4fb28dc 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -75,7 +75,7 @@ test_expect_success \
# todo: git tag -l now returns always zero, when fixed, change this test
test_expect_success \
- 'listing tags using a non-matching pattern should suceed' \
+ 'listing tags using a non-matching pattern should succeed' \
'git tag -l xxx'
test_expect_success \
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 5e19598..37cc095 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -316,7 +316,7 @@ test_expect_success 'merge c1 with c2 (squash)' '
test_debug 'git log --graph --decorate --oneline --all'
-test_expect_success 'unsuccesful merge of c1 with c2 (squash, ff-only)' '
+test_expect_success 'unsuccessful merge of c1 with c2 (squash, ff-only)' '
git reset --hard c1 &&
test_must_fail git merge --squash --ff-only c2
'
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index b44b293..25dac79 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -109,7 +109,7 @@ test_expect_success 'setup conflicted merge' '
'
# First do the merge with resolve and recursive then verify that
-# recusive is choosen.
+# recusive is chosen.
test_expect_success 'merge picks up the best result' '
git config --unset-all pull.twohead &&
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 97d6f4c..feaee8b 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -101,7 +101,7 @@ test_expect_success $PREREQ \
test_expect_success $PREREQ 'Send patches with --envelope-sender' '
clean_fake_sendmail &&
- git send-email --envelope-sender="Patch Contributer <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
+ git send-email --envelope-sender="Patch Contributor <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
'
test_expect_success $PREREQ 'setup expect' '
diff --git a/transport.h b/transport.h
index a3450e9..e7beb81 100644
--- a/transport.h
+++ b/transport.h
@@ -74,7 +74,7 @@ struct transport {
const char *executable, int fd[2]);
/** get_refs_list(), fetch(), and push_refs() can keep
- * resources (such as a connection) reserved for futher
+ * resources (such as a connection) reserved for further
* use. disconnect() releases these resources.
**/
int (*disconnect)(struct transport *connection);
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index 1b7012a..b2eb6db 100644
--- a/xdiff/xdiffi.c
+++ b/xdiff/xdiffi.c
@@ -490,7 +490,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
/*
* Try to move back the possibly merged group of changes, to match
- * the recorded postion in the other file.
+ * the recorded position in the other file.
*/
while (ixref < ix) {
rchg[--ixs] = 1;
diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c
index bf99787..73210cb 100644
--- a/xdiff/xhistogram.c
+++ b/xdiff/xhistogram.c
@@ -55,7 +55,7 @@ struct histindex {
struct record {
unsigned int ptr, cnt;
struct record *next;
- } **records, /* an ocurrence */
+ } **records, /* an occurrence */
**line_map; /* map of line to record chain */
chastore_t rcha;
unsigned int *next_ptrs;
--
1.7.11.7
^ permalink raw reply related [relevance 4%]
* [PATCH/RFC 0/3] Teach mv to move submodules
@ 2013-04-03 19:54 4% Jens Lehmann
2013-04-03 19:56 10% ` [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees Jens Lehmann
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Jens Lehmann @ 2013-04-03 19:54 UTC (permalink / raw)
To: Git Mailing List
Cc: Junio C Hamano, Phil Hord, Heiko Voigt, W. Trevor King,
Peter Collingbourne
This is the last topic I intend to finish before preparing the recursive
submodule update. The other prerequisites for that next step are Heiko's
"allow more sources for config values" and "fetch moved submodules
on-demand" topics, which are necessary to populate submodules that were
not present in the currently checked out commit and to have all commits
of moved or currently not present submodules fetched for later checkout
respectively. But these are other threads ...
Let's enable users to move submodules (just as easy as they can already
remove them with current Git with "git rm") by using a plain "git mv".
While using "git submodule update" on a moved submodule cloned by a
coworker will still leave the submodule's work tree lying around at the
old path, that will be fixed by the recursive submodule update (and is
not different from what Git currently does with removed submodules).
Replacing a directory containing files tracked by Git or vice versa is
still not possible, another issue to be fixed by the recursive submodule
update. I tried to CC all parties which showed interest in this topic,
hopefully I didn't forget anyone.
Jens Lehmann (3):
Teach mv to move submodules together with their work trees
Teach mv to move submodules using a gitfile
Teach mv to update the path entry in .gitmodules for moved submodules
builtin/mv.c | 126 ++++++++++++++++++++++++++++++++++------------------------
submodule.c | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
submodule.h | 3 ++
t/t7001-mv.sh | 94 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 297 insertions(+), 52 deletions(-)
--
1.8.2.377.g1bdb7d0
^ permalink raw reply [relevance 4%]
* [PATCH/RFC 2/3] Teach mv to move submodules using a gitfile
2013-04-03 19:54 4% [PATCH/RFC 0/3] Teach mv to move submodules Jens Lehmann
2013-04-03 19:56 10% ` [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees Jens Lehmann
@ 2013-04-03 19:56 9% ` Jens Lehmann
2013-04-03 19:57 9% ` [PATCH/RFC 3/3] Teach mv to update the path entry in .gitmodules for moved submodules Jens Lehmann
2 siblings, 1 reply; 200+ results
From: Jens Lehmann @ 2013-04-03 19:56 UTC (permalink / raw)
To: Git Mailing List
Cc: Junio C Hamano, Phil Hord, Heiko Voigt, W. Trevor King,
Peter Collingbourne
When moving a submodule which uses a gitfile to point to the git directory
stored in .git/modules/<name> of the superproject two changes must be made
to make the submodule work: the .git file and the core.worktree setting
must be adjusted to point from work tree to git directory and back.
Achieve that by remembering which submodule uses a gitfile by storing the
result of read_gitfile() of each submodule. If that is not NULL the new
function connect_work_tree_and_git_dir() is called after renaming the
submodule's work tree which updates the two settings to the new values.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
builtin/mv.c | 19 ++++++++++++++----
submodule.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
submodule.h | 1 +
t/t7001-mv.sh | 19 ++++++++++++++++++
4 files changed, 99 insertions(+), 4 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 361028d..609bbb8 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -9,6 +9,7 @@
#include "cache-tree.h"
#include "string-list.h"
#include "parse-options.h"
+#include "submodule.h"
static const char * const builtin_mv_usage[] = {
N_("git mv [options] <source>... <destination>"),
@@ -65,7 +66,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
OPT_BOOLEAN('k', NULL, &ignore_errors, N_("skip move/rename errors")),
OPT_END(),
};
- const char **source, **destination, **dest_path;
+ const char **source, **destination, **dest_path, **submodule_gitfile;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
@@ -84,6 +85,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source = copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
dest_path = copy_pathspec(prefix, argv + argc, 1, 0);
+ submodule_gitfile = xcalloc(argc, sizeof(char *));
if (dest_path[0][0] == '\0')
/* special case: "." was normalized to "" */
@@ -119,8 +121,14 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
else if (src_is_dir) {
int first = cache_name_pos(src, length);
if (first >= 0) {
+ struct strbuf submodule_dotgit = STRBUF_INIT;
if (!S_ISGITLINK(active_cache[first]->ce_mode))
die (_("Huh? Directory %s is in index and no submodule?"), src);
+ strbuf_addf(&submodule_dotgit, "%s/.git", src);
+ submodule_gitfile[i] = read_gitfile(submodule_dotgit.buf);
+ if (submodule_gitfile[i])
+ submodule_gitfile[i] = xstrdup(submodule_gitfile[i]);
+ strbuf_release(&submodule_dotgit);
} else {
const char *src_w_slash = add_slash(src);
int last, len_w_slash = length + 1;
@@ -215,9 +223,12 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
int pos;
if (show_only || verbose)
printf(_("Renaming %s to %s\n"), src, dst);
- if (!show_only && mode != INDEX &&
- rename(src, dst) < 0 && !ignore_errors)
- die_errno (_("renaming '%s' failed"), src);
+ if (!show_only && mode != INDEX) {
+ if (rename(src, dst) < 0 && !ignore_errors)
+ die_errno (_("renaming '%s' failed"), src);
+ if (submodule_gitfile[i])
+ connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
+ }
if (mode == WORKING_DIRECTORY)
continue;
diff --git a/submodule.c b/submodule.c
index 975bc87..eba9b42 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1001,3 +1001,67 @@ int merge_submodule(unsigned char result[20], const char *path,
free(merges.objects);
return 0;
}
+
+/* Update gitfile and core.worktree setting to connect work tree and git dir */
+void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir)
+{
+ struct strbuf core_worktree_setting = STRBUF_INIT;
+ struct strbuf configfile_name = STRBUF_INIT;
+ struct strbuf gitfile_content = STRBUF_INIT;
+ struct strbuf gitfile_name = STRBUF_INIT;
+ const char *real_work_tree = real_path(work_tree);
+ const char *pathspec[] = { real_work_tree, git_dir, NULL };
+ const char *max_prefix = common_prefix(pathspec);
+ FILE *fp;
+
+ if (max_prefix) { /* skip common prefix */
+ size_t max_prefix_len = strlen(max_prefix);
+ real_work_tree += max_prefix_len;
+ git_dir += max_prefix_len;
+ }
+
+ /*
+ * Update gitfile
+ */
+ strbuf_addstr(&gitfile_content, "gitdir: ");
+ if (real_work_tree[0]) {
+ const char *s = real_work_tree;
+ do {
+ strbuf_addstr(&gitfile_content, "../");
+ s++;
+ } while ((s = strchr(s, '/')));
+ }
+ strbuf_addstr(&gitfile_content, git_dir);
+ strbuf_addch(&gitfile_content, '\n');
+
+ strbuf_addf(&gitfile_name, "%s/.git", work_tree);
+ fp = fopen(gitfile_name.buf, "w");
+ if (!fp)
+ die(_("Could not create git link %s"), gitfile_name.buf);
+ fprintf(fp, gitfile_content.buf);
+ fclose(fp);
+
+ strbuf_release(&gitfile_content);
+ strbuf_release(&gitfile_name);
+
+ /*
+ * Update core.worktree setting
+ */
+ if (git_dir[0]) {
+ const char *s = git_dir;
+ do {
+ strbuf_addstr(&core_worktree_setting, "../");
+ s++;
+ } while ((s = strchr(s, '/')));
+ }
+ strbuf_addstr(&core_worktree_setting, real_work_tree);
+
+ strbuf_addf(&configfile_name, "%s/config", git_dir);
+ if (git_config_set_in_file(configfile_name.buf, "core.worktree",
+ core_worktree_setting.buf))
+ die(_("Could not set core.worktree in %s"),
+ configfile_name.buf);
+
+ strbuf_release(&core_worktree_setting);
+ strbuf_release(&configfile_name);
+}
diff --git a/submodule.h b/submodule.h
index 3dc1b3f..0c27c53 100644
--- a/submodule.h
+++ b/submodule.h
@@ -35,5 +35,6 @@ int merge_submodule(unsigned char result[20], const char *path, const unsigned c
int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name,
struct string_list *needs_pushing);
int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name);
+void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir);
#endif
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 4c57f61..d824464 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -289,4 +289,23 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
git diff-files --quiet
'
+test_expect_success 'git mv moves a submodule with gitfile' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ (
+ cd mod &&
+ git mv ../sub/ .
+ ) &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
test_done
--
1.8.2.377.g1bdb7d0
^ permalink raw reply related [relevance 9%]
* [PATCH/RFC 3/3] Teach mv to update the path entry in .gitmodules for moved submodules
2013-04-03 19:54 4% [PATCH/RFC 0/3] Teach mv to move submodules Jens Lehmann
2013-04-03 19:56 10% ` [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees Jens Lehmann
2013-04-03 19:56 9% ` [PATCH/RFC 2/3] Teach mv to move submodules using a gitfile Jens Lehmann
@ 2013-04-03 19:57 9% ` Jens Lehmann
2 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-04-03 19:57 UTC (permalink / raw)
To: Git Mailing List
Cc: Junio C Hamano, Phil Hord, Heiko Voigt, W. Trevor King,
Peter Collingbourne
Currently using "git mv" on a submodule moves the submodule's work tree in
that of the superproject. But the submodule's path setting in .gitmodules
is left untouched, which is now inconsistent with the work tree and makes
git commands that rely on the proper path -> name mapping (like status and
diff) behave strangely.
Let "git mv" help here by not only moving the submodule's work tree but
also updating the "submodule.<submodule name>.path" setting from the
.gitmodules file and stage both. This doesn't happen when no .gitmodules
file is found and only issues a warning when it doesn't have a section for
this submodule. This is because the user might just use plain gitlinks
without the .gitmodules file or has already updated the path setting by
hand before issuing the "git mv" command (in which case the warning
reminds him that mv would have done that for him). Only when .gitmodules
is found and contains merge conflicts the mv command will fail and tell
the user to resolve the conflict before trying again.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
builtin/mv.c | 8 +++++++-
submodule.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
submodule.h | 2 ++
t/t7001-mv.sh | 41 +++++++++++++++++++++++++++++++++++++++
4 files changed, 112 insertions(+), 1 deletion(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 609bbb8..36e5605 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -57,7 +57,7 @@ static struct lock_file lock_file;
int cmd_mv(int argc, const char **argv, const char *prefix)
{
- int i, newfd;
+ int i, newfd, gitmodules_modified = 0;
int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
struct option builtin_mv_options[] = {
OPT__VERBOSE(&verbose, N_("be verbose")),
@@ -71,6 +71,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
struct stat st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
+ gitmodules_config();
git_config(git_default_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_mv_options,
@@ -228,6 +229,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
die_errno (_("renaming '%s' failed"), src);
if (submodule_gitfile[i])
connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
+ if (!update_path_in_gitmodules(src, dst))
+ gitmodules_modified = 1;
}
if (mode == WORKING_DIRECTORY)
@@ -239,6 +242,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
rename_cache_entry_at(pos, dst);
}
+ if (gitmodules_modified)
+ stage_updated_gitmodules();
+
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
diff --git a/submodule.c b/submodule.c
index eba9b42..fb742b4 100644
--- a/submodule.c
+++ b/submodule.c
@@ -10,6 +10,7 @@
#include "string-list.h"
#include "sha1-array.h"
#include "argv-array.h"
+#include "blob.h"
static struct string_list config_name_for_path;
static struct string_list config_fetch_recurse_submodules_for_name;
@@ -30,6 +31,67 @@ static struct sha1_array ref_tips_after_fetch;
*/
static int gitmodules_is_unmerged;
+/*
+ * Try to update the "path" entry in the "submodule.<name>" section of the
+ * .gitmodules file.
+ */
+int update_path_in_gitmodules(const char *oldpath, const char *newpath)
+{
+ struct strbuf entry = STRBUF_INIT;
+ struct string_list_item *path_option;
+
+ if (!file_exists(".gitmodules")) /* Do nothing whithout .gitmodules */
+ return -1;
+
+ if (gitmodules_is_unmerged)
+ die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
+
+ path_option = unsorted_string_list_lookup(&config_name_for_path, oldpath);
+ if (!path_option) {
+ warning(_("Could not find section in .gitmodules where path=%s"), oldpath);
+ return -1;
+ }
+ strbuf_addstr(&entry, "submodule.");
+ strbuf_addstr(&entry, path_option->util);
+ strbuf_addstr(&entry, ".path");
+ if (git_config_set_in_file(".gitmodules", entry.buf, newpath) < 0) {
+ /* Maybe the user already did that, don't error out here */
+ warning(_("Could not update .gitmodules entry %s"), entry.buf);
+ return -1;
+ }
+ strbuf_release(&entry);
+ return 0;
+}
+
+void stage_updated_gitmodules(void)
+{
+ struct strbuf buf = STRBUF_INIT;
+ struct stat st;
+ int pos;
+ struct cache_entry *ce;
+ int namelen = strlen(".gitmodules");
+
+ pos = cache_name_pos(".gitmodules", strlen(".gitmodules"));
+ if (pos < 0) {
+ warning(_("could not find .gitmodules in index"));
+ return;
+ }
+ ce = active_cache[pos];
+ ce->ce_flags = namelen;
+ if (strbuf_read_file(&buf, ".gitmodules", 0) < 0)
+ die(_("reading updated .gitmodules failed"));
+ if (lstat(".gitmodules", &st) < 0)
+ die_errno(_("unable to stat updated .gitmodules"));
+ fill_stat_cache_info(ce, &st);
+ ce->ce_mode = ce_mode_from_stat(ce, st.st_mode);
+ if (remove_file_from_cache(".gitmodules") < 0)
+ die(_("unable to remove .gitmodules from index"));
+ if (write_sha1_file(buf.buf, buf.len, blob_type, ce->sha1))
+ die(_("adding updated .gitmodules failed"));
+ if (add_cache_entry(ce, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE))
+ die(_("staging updated .gitmodules failed"));
+}
+
static int add_submodule_odb(const char *path)
{
struct strbuf objects_directory = STRBUF_INIT;
diff --git a/submodule.h b/submodule.h
index 0c27c53..39c0321 100644
--- a/submodule.h
+++ b/submodule.h
@@ -11,6 +11,8 @@ enum {
RECURSE_SUBMODULES_ON = 2
};
+int update_path_in_gitmodules(const char *oldpath, const char *newpath);
+void stage_updated_gitmodules(void);
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
const char *path);
int submodule_config(const char *var, const char *value, void *cb);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index d824464..c144d21 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -304,6 +304,47 @@ test_expect_success 'git mv moves a submodule with gitfile' '
cd mod/sub &&
git status
) &&
+ echo mod/sub >expected &&
+ git config -f .gitmodules submodule.sub.path >actual &&
+ test_cmp expected actual &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv does not complain when no .gitmodules file is found' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git rm .gitmodules &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ git mv sub mod/sub 2>actual.err &&
+ ! test -s actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv issues a warning when section is not found in .gitmodules' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git config -f .gitmodules --remove-section submodule.sub &&
+ git add .gitmodules &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
+ git mv sub mod/sub 2>actual.err &&
+ test_i18ncmp expect.err actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
git update-index --refresh &&
git diff-files --quiet
'
--
1.8.2.377.g1bdb7d0
^ permalink raw reply related [relevance 9%]
* [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees
2013-04-03 19:54 4% [PATCH/RFC 0/3] Teach mv to move submodules Jens Lehmann
@ 2013-04-03 19:56 10% ` Jens Lehmann
2013-04-03 19:56 9% ` [PATCH/RFC 2/3] Teach mv to move submodules using a gitfile Jens Lehmann
2013-04-03 19:57 9% ` [PATCH/RFC 3/3] Teach mv to update the path entry in .gitmodules for moved submodules Jens Lehmann
2 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-04-03 19:56 UTC (permalink / raw)
To: Git Mailing List
Cc: Junio C Hamano, Phil Hord, Heiko Voigt, W. Trevor King,
Peter Collingbourne
Currently the attempt to use "git mv" on a submodule errors out with:
fatal: source directory is empty, source=<src>, destination=<dest>
The reason is that mv searches for the submodule with a trailing slash in
the index, which it doesn't find (because it is stored without a trailing
slash). As it doesn't find any index entries inside the submodule it
claims the directory would be empty even though it isn't.
Fix that by searching for the name without a trailing slash and continue
if it is a submodule. Then rename() will move the submodule work tree just
like it moves a file.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
builtin/mv.c | 99 +++++++++++++++++++++++++++++++----------------------------
t/t7001-mv.sh | 34 ++++++++++++++++++++
2 files changed, 86 insertions(+), 47 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 034fec9..361028d 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -117,55 +117,60 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
&& lstat(dst, &st) == 0)
bad = _("cannot move directory over file");
else if (src_is_dir) {
- const char *src_w_slash = add_slash(src);
- int len_w_slash = length + 1;
- int first, last;
-
- modes[i] = WORKING_DIRECTORY;
-
- first = cache_name_pos(src_w_slash, len_w_slash);
- if (first >= 0)
- die (_("Huh? %.*s is in index?"),
- len_w_slash, src_w_slash);
-
- first = -1 - first;
- for (last = first; last < active_nr; last++) {
- const char *path = active_cache[last]->name;
- if (strncmp(path, src_w_slash, len_w_slash))
- break;
- }
- free((char *)src_w_slash);
-
- if (last - first < 1)
- bad = _("source directory is empty");
- else {
- int j, dst_len;
-
- if (last - first > 0) {
- source = xrealloc(source,
- (argc + last - first)
- * sizeof(char *));
- destination = xrealloc(destination,
- (argc + last - first)
- * sizeof(char *));
- modes = xrealloc(modes,
- (argc + last - first)
- * sizeof(enum update_mode));
+ int first = cache_name_pos(src, length);
+ if (first >= 0) {
+ if (!S_ISGITLINK(active_cache[first]->ce_mode))
+ die (_("Huh? Directory %s is in index and no submodule?"), src);
+ } else {
+ const char *src_w_slash = add_slash(src);
+ int last, len_w_slash = length + 1;
+
+ modes[i] = WORKING_DIRECTORY;
+
+ first = cache_name_pos(src_w_slash, len_w_slash);
+ if (first >= 0)
+ die (_("Huh? %.*s is in index?"),
+ len_w_slash, src_w_slash);
+
+ first = -1 - first;
+ for (last = first; last < active_nr; last++) {
+ const char *path = active_cache[last]->name;
+ if (strncmp(path, src_w_slash, len_w_slash))
+ break;
}
-
- dst = add_slash(dst);
- dst_len = strlen(dst);
-
- for (j = 0; j < last - first; j++) {
- const char *path =
- active_cache[first + j]->name;
- source[argc + j] = path;
- destination[argc + j] =
- prefix_path(dst, dst_len,
- path + length + 1);
- modes[argc + j] = INDEX;
+ free((char *)src_w_slash);
+
+ if (last - first < 1)
+ bad = _("source directory is empty");
+ else {
+ int j, dst_len;
+
+ if (last - first > 0) {
+ source = xrealloc(source,
+ (argc + last - first)
+ * sizeof(char *));
+ destination = xrealloc(destination,
+ (argc + last - first)
+ * sizeof(char *));
+ modes = xrealloc(modes,
+ (argc + last - first)
+ * sizeof(enum update_mode));
+ }
+
+ dst = add_slash(dst);
+ dst_len = strlen(dst);
+
+ for (j = 0; j < last - first; j++) {
+ const char *path =
+ active_cache[first + j]->name;
+ source[argc + j] = path;
+ destination[argc + j] =
+ prefix_path(dst, dst_len,
+ path + length + 1);
+ modes[argc + j] = INDEX;
+ }
+ argc += last - first;
}
- argc += last - first;
}
} else if (cache_name_pos(src, length) < 0)
bad = _("not under version control");
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..4c57f61 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -255,4 +255,38 @@ test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
rm -f moved symlink
+test_expect_success 'setup submodule' '
+ git commit -m initial &&
+ git reset --hard &&
+ git submodule add ./. sub &&
+ echo content >file &&
+ git add file &&
+ git commit -m "added sub and file"
+'
+
+test_expect_success 'git mv cannot move a submodule in a file' '
+ test_must_fail git mv sub file
+'
+
+test_expect_success 'git mv moves a submodule with a .git directory and no .gitmodules' '
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ git rm .gitmodules &&
+ (
+ cd sub &&
+ rm -f .git &&
+ cp -a ../.git/modules/sub .git &&
+ GIT_WORK_TREE=. git config --unset core.worktree
+ ) &&
+ mkdir mod &&
+ git mv sub mod/sub &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
test_done
--
1.8.2.377.g1bdb7d0
^ permalink raw reply related [relevance 10%]
* [PATCH v2 2/3] Teach mv to move submodules using a gitfile
@ 2013-04-10 21:06 9% ` Jens Lehmann
0 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-04-10 21:06 UTC (permalink / raw)
To: Junio C Hamano
Cc: Git Mailing List, Phil Hord, Heiko Voigt, W. Trevor King,
Peter Collingbourne
When moving a submodule which uses a gitfile to point to the git directory
stored in .git/modules/<name> of the superproject two changes must be made
to make the submodule work: the .git file and the core.worktree setting
must be adjusted to point from work tree to git directory and back.
Achieve that by remembering which submodule uses a gitfile by storing the
result of read_gitfile() of each submodule. If that is not NULL the new
function connect_work_tree_and_git_dir() is called after renaming the
submodule's work tree which updates the two settings to the new values.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Am 10.04.2013 18:59, schrieb Jens Lehmann:
> Am 10.04.2013 01:08, schrieb Junio C Hamano:
>> Jens Lehmann <Jens.Lehmann@web.de> writes:
>>
>>> diff --git a/submodule.c b/submodule.c
>>> index 975bc87..eba9b42 100644
>>> --- a/submodule.c
>>> +++ b/submodule.c
>>> @@ -1001,3 +1001,67 @@ int merge_submodule(unsigned char result[20], const char *path,
>>> ...
>>> + if (!fp)
>>> + die(_("Could not create git link %s"), gitfile_name.buf);
>>> + fprintf(fp, gitfile_content.buf);
>>
>> Perhaps.
>>
>> fprintf(fp, "%s", gitfile_content.buf);
>
> Sure. Will fix in v2.
Here we go.
builtin/mv.c | 19 ++++++++++++++----
submodule.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
submodule.h | 1 +
t/t7001-mv.sh | 19 ++++++++++++++++++
4 files changed, 99 insertions(+), 4 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 361028d..609bbb8 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -9,6 +9,7 @@
#include "cache-tree.h"
#include "string-list.h"
#include "parse-options.h"
+#include "submodule.h"
static const char * const builtin_mv_usage[] = {
N_("git mv [options] <source>... <destination>"),
@@ -65,7 +66,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
OPT_BOOLEAN('k', NULL, &ignore_errors, N_("skip move/rename errors")),
OPT_END(),
};
- const char **source, **destination, **dest_path;
+ const char **source, **destination, **dest_path, **submodule_gitfile;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
@@ -84,6 +85,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source = copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
dest_path = copy_pathspec(prefix, argv + argc, 1, 0);
+ submodule_gitfile = xcalloc(argc, sizeof(char *));
if (dest_path[0][0] == '\0')
/* special case: "." was normalized to "" */
@@ -119,8 +121,14 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
else if (src_is_dir) {
int first = cache_name_pos(src, length);
if (first >= 0) {
+ struct strbuf submodule_dotgit = STRBUF_INIT;
if (!S_ISGITLINK(active_cache[first]->ce_mode))
die (_("Huh? Directory %s is in index and no submodule?"), src);
+ strbuf_addf(&submodule_dotgit, "%s/.git", src);
+ submodule_gitfile[i] = read_gitfile(submodule_dotgit.buf);
+ if (submodule_gitfile[i])
+ submodule_gitfile[i] = xstrdup(submodule_gitfile[i]);
+ strbuf_release(&submodule_dotgit);
} else {
const char *src_w_slash = add_slash(src);
int last, len_w_slash = length + 1;
@@ -215,9 +223,12 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
int pos;
if (show_only || verbose)
printf(_("Renaming %s to %s\n"), src, dst);
- if (!show_only && mode != INDEX &&
- rename(src, dst) < 0 && !ignore_errors)
- die_errno (_("renaming '%s' failed"), src);
+ if (!show_only && mode != INDEX) {
+ if (rename(src, dst) < 0 && !ignore_errors)
+ die_errno (_("renaming '%s' failed"), src);
+ if (submodule_gitfile[i])
+ connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
+ }
if (mode == WORKING_DIRECTORY)
continue;
diff --git a/submodule.c b/submodule.c
index 975bc87..9a3eb85 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1001,3 +1001,67 @@ int merge_submodule(unsigned char result[20], const char *path,
free(merges.objects);
return 0;
}
+
+/* Update gitfile and core.worktree setting to connect work tree and git dir */
+void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir)
+{
+ struct strbuf core_worktree_setting = STRBUF_INIT;
+ struct strbuf configfile_name = STRBUF_INIT;
+ struct strbuf gitfile_content = STRBUF_INIT;
+ struct strbuf gitfile_name = STRBUF_INIT;
+ const char *real_work_tree = real_path(work_tree);
+ const char *pathspec[] = { real_work_tree, git_dir, NULL };
+ const char *max_prefix = common_prefix(pathspec);
+ FILE *fp;
+
+ if (max_prefix) { /* skip common prefix */
+ size_t max_prefix_len = strlen(max_prefix);
+ real_work_tree += max_prefix_len;
+ git_dir += max_prefix_len;
+ }
+
+ /*
+ * Update gitfile
+ */
+ strbuf_addstr(&gitfile_content, "gitdir: ");
+ if (real_work_tree[0]) {
+ const char *s = real_work_tree;
+ do {
+ strbuf_addstr(&gitfile_content, "../");
+ s++;
+ } while ((s = strchr(s, '/')));
+ }
+ strbuf_addstr(&gitfile_content, git_dir);
+ strbuf_addch(&gitfile_content, '\n');
+
+ strbuf_addf(&gitfile_name, "%s/.git", work_tree);
+ fp = fopen(gitfile_name.buf, "w");
+ if (!fp)
+ die(_("Could not create git link %s"), gitfile_name.buf);
+ fprintf(fp, "%s", gitfile_content.buf);
+ fclose(fp);
+
+ strbuf_release(&gitfile_content);
+ strbuf_release(&gitfile_name);
+
+ /*
+ * Update core.worktree setting
+ */
+ if (git_dir[0]) {
+ const char *s = git_dir;
+ do {
+ strbuf_addstr(&core_worktree_setting, "../");
+ s++;
+ } while ((s = strchr(s, '/')));
+ }
+ strbuf_addstr(&core_worktree_setting, real_work_tree);
+
+ strbuf_addf(&configfile_name, "%s/config", git_dir);
+ if (git_config_set_in_file(configfile_name.buf, "core.worktree",
+ core_worktree_setting.buf))
+ die(_("Could not set core.worktree in %s"),
+ configfile_name.buf);
+
+ strbuf_release(&core_worktree_setting);
+ strbuf_release(&configfile_name);
+}
diff --git a/submodule.h b/submodule.h
index 3dc1b3f..0c27c53 100644
--- a/submodule.h
+++ b/submodule.h
@@ -35,5 +35,6 @@ int merge_submodule(unsigned char result[20], const char *path, const unsigned c
int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name,
struct string_list *needs_pushing);
int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name);
+void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir);
#endif
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 4c57f61..d824464 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -289,4 +289,23 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
git diff-files --quiet
'
+test_expect_success 'git mv moves a submodule with gitfile' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ (
+ cd mod &&
+ git mv ../sub/ .
+ ) &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
test_done
--
1.8.2.1.345.gb37ac0e
^ permalink raw reply related [relevance 9%]
* [PATCH 00/11] Increase test coverage on Windows by removing SYMLINKS from many tests
@ 2013-06-01 9:34 4% Johannes Sixt
2013-06-01 9:34 4% ` [PATCH 05/11] tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases) Johannes Sixt
2013-06-07 20:53 4% ` [PATCH v2 00/10] Increase test coverage on Windows by removing SYMLINKS from many tests Johannes Sixt
0 siblings, 2 replies; 200+ results
From: Johannes Sixt @ 2013-06-01 9:34 UTC (permalink / raw)
To: git
Many tests that involve symbolic links actually check only whether our
algorithms are correct by investigating the contents of the object
database and the index. Only some of them check the filesystem.
This series introduces a function test_ln_s_add that inserts a symbolic
link in the index even if the filesystem does not support symbolic links.
By using this function, many more tests can be run when the filesystem
does not have symblic links, aka Windows.
The patches touch a number of test files that do not follow the modern
style. But I modernized only the two test files where the subsequent
change to use test_ln_s_add would otherwise be rather inconvenient or
obscure.
Johannes Sixt (11):
test-chmtime: Fix exit code on Windows
t2100: modernize style and unroll a loop of test cases
t3010: modernize style
tests: introduce test_ln_s and test_ln_s_add
tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial
cases)
t0000: use test_ln_s_add to remove SYMLINKS prerequisite
t2100: use test_ln_s_add to remove SYMLINKS prerequisite
t3030: use test_ln_s_add to remove SYMLINKS prerequisite
t3100: use test_ln_s_add to remove SYMLINKS prerequisite
t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
t6035: use test_ln_s_add to remove SYMLINKS prerequisite
t/README | 17 +++++
t/t0000-basic.sh | 39 +++---------
t/t1004-read-tree-m-u-wf.sh | 7 +--
t/t2001-checkout-cache-clash.sh | 7 +--
t/t2003-checkout-cache-mkdir.sh | 8 +--
t/t2004-checkout-cache-temp.sh | 5 +-
t/t2007-checkout-symlink.sh | 12 ++--
t/t2021-checkout-overwrite.sh | 12 ++--
t/t2100-update-cache-badpath.sh | 71 +++++++++++----------
t/t2200-add-update.sh | 5 +-
t/t3000-ls-files-others.sh | 7 +--
t/t3010-ls-files-killed-modified.sh | 112 +++++++++++++++------------------
t/t3030-merge-recursive.sh | 62 ++++++++----------
t/t3100-ls-tree-restrict.sh | 42 +++++--------
t/t3509-cherry-pick-merge-df.sh | 12 ++--
t/t3700-add.sh | 15 ++---
t/t3903-stash.sh | 39 ++++++++----
t/t4008-diff-break-rewrite.sh | 12 ++--
t/t4011-diff-symlink.sh | 23 ++++---
t/t4023-diff-rename-typechange.sh | 28 ++++-----
t/t4030-diff-textconv.sh | 8 +--
t/t4114-apply-typechange.sh | 29 +++++----
t/t4115-apply-symlink.sh | 10 ++-
t/t4122-apply-symlink-inside.sh | 8 +--
t/t6035-merge-dir-to-symlink.sh | 73 +++++++++++++--------
t/t7001-mv.sh | 18 +++---
t/t7607-merge-overwrite.sh | 5 +-
t/t8006-blame-textconv.sh | 14 ++---
t/t8007-cat-file-textconv.sh | 10 ++-
t/t9350-fast-export.sh | 5 +-
t/t9500-gitweb-standalone-no-errors.sh | 15 ++---
t/test-lib-functions.sh | 30 +++++++++
test-chmtime.c | 8 +--
33 files changed, 391 insertions(+), 377 deletions(-)
--
1.8.3.rc1.32.g8b61cbb
^ permalink raw reply [relevance 4%]
* [PATCH 05/11] tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
2013-06-01 9:34 4% [PATCH 00/11] Increase test coverage on Windows by removing SYMLINKS from many tests Johannes Sixt
@ 2013-06-01 9:34 4% ` Johannes Sixt
2013-06-07 20:53 4% ` [PATCH v2 00/10] Increase test coverage on Windows by removing SYMLINKS from many tests Johannes Sixt
1 sibling, 0 replies; 200+ results
From: Johannes Sixt @ 2013-06-01 9:34 UTC (permalink / raw)
To: git
There are many instances where the treatment of symbolic links in the
object model and the algorithms are tested, but where it is not
necessary to actually have a symbolic link in the worktree. Make
adjustments to the tests and remove the SYMLINKS prerequisite when
appropriate in trivial cases, where "trivial" means:
- merely a replacement of 'ln -s a b' to test_ln_s or of
'ln -s a b && git add b' to test_ln_s_add is needed;
- a test for symbolic link on the file system can be split off (and
remains protected by SYMLINKS);
- existing code is equivalent to test_ln_s[_add].
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
The changes in t9500-gitweb-* were not tested on a system that does not
have SYMLINKS.
t/t1004-read-tree-m-u-wf.sh | 7 +++---
t/t2001-checkout-cache-clash.sh | 7 +++---
t/t2003-checkout-cache-mkdir.sh | 8 +++----
t/t2004-checkout-cache-temp.sh | 5 ++---
t/t2007-checkout-symlink.sh | 12 +++++------
t/t2021-checkout-overwrite.sh | 12 +++++++----
t/t2200-add-update.sh | 5 ++---
t/t3000-ls-files-others.sh | 7 +-----
t/t3010-ls-files-killed-modified.sh | 19 ++++-------------
t/t3700-add.sh | 15 ++++++-------
t/t3903-stash.sh | 39 ++++++++++++++++++++++++----------
t/t4008-diff-break-rewrite.sh | 12 +++++------
t/t4011-diff-symlink.sh | 23 +++++++++++---------
t/t4030-diff-textconv.sh | 8 +++----
t/t4115-apply-symlink.sh | 10 ++++-----
t/t4122-apply-symlink-inside.sh | 8 +++----
t/t7001-mv.sh | 18 ++++++++++------
t/t7607-merge-overwrite.sh | 5 ++---
t/t8006-blame-textconv.sh | 14 +++++-------
t/t8007-cat-file-textconv.sh | 10 ++++-----
t/t9350-fast-export.sh | 5 ++---
t/t9500-gitweb-standalone-no-errors.sh | 15 +++++--------
22 files changed, 126 insertions(+), 138 deletions(-)
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index b3ae7d5..3e72aff 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -158,7 +158,7 @@ test_expect_success '3-way not overwriting local changes (their side)' '
'
-test_expect_success SYMLINKS 'funny symlink in work tree' '
+test_expect_success 'funny symlink in work tree' '
git reset --hard &&
git checkout -b sym-b side-b &&
@@ -170,15 +170,14 @@ test_expect_success SYMLINKS 'funny symlink in work tree' '
rm -fr a &&
git checkout -b sym-a side-a &&
mkdir -p a &&
- ln -s ../b a/b &&
- git add a/b &&
+ test_ln_s_add ../b a/b &&
git commit -m "we add a/b" &&
read_tree_u_must_succeed -m -u sym-a sym-a sym-b
'
-test_expect_success SYMLINKS,SANITY 'funny symlink in work tree, un-unlink-able' '
+test_expect_success SANITY 'funny symlink in work tree, un-unlink-able' '
rm -fr a b &&
git reset --hard &&
diff --git a/t/t2001-checkout-cache-clash.sh b/t/t2001-checkout-cache-clash.sh
index 98aa73e..1fc8e63 100755
--- a/t/t2001-checkout-cache-clash.sh
+++ b/t/t2001-checkout-cache-clash.sh
@@ -59,10 +59,9 @@ test_expect_success \
'git read-tree -m $tree1 && git checkout-index -f -a'
test_debug 'show_files $tree1'
-test_expect_success SYMLINKS \
- 'git update-index --add a symlink.' \
- 'ln -s path0 path1 &&
- git update-index --add path1'
+test_expect_success \
+ 'add a symlink' \
+ 'test_ln_s_add path0 path1'
test_expect_success \
'writing tree out with git write-tree' \
'tree3=$(git write-tree)'
diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
index ff163cf..bd17ba2 100755
--- a/t/t2003-checkout-cache-mkdir.sh
+++ b/t/t2003-checkout-cache-mkdir.sh
@@ -19,10 +19,10 @@ test_expect_success 'setup' '
git update-index --add path0 path1/file1
'
-test_expect_success SYMLINKS 'have symlink in place where dir is expected.' '
+test_expect_success 'have symlink in place where dir is expected.' '
rm -fr path0 path1 &&
mkdir path2 &&
- ln -s path2 path1 &&
+ test_ln_s path2 path1 &&
git checkout-index -f -a &&
test ! -h path1 && test -d path1 &&
test -f path1/file1 && test ! -f path2/file1
@@ -79,10 +79,10 @@ test_expect_success SYMLINKS 'use --prefix=tmp/orary- where tmp is a symlink' '
test -h tmp
'
-test_expect_success SYMLINKS 'use --prefix=tmp- where tmp-path1 is a symlink' '
+test_expect_success 'use --prefix=tmp- where tmp-path1 is a symlink' '
rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 &&
- ln -s tmp1 tmp-path1 &&
+ test_ln_s tmp1 tmp-path1 &&
git checkout-index --prefix=tmp- -f -a &&
test -f tmp-path0 &&
test ! -h tmp-path1 &&
diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh
index 0f4b289..f171a55 100755
--- a/t/t2004-checkout-cache-temp.sh
+++ b/t/t2004-checkout-cache-temp.sh
@@ -194,11 +194,10 @@ test_expect_success \
test $(cat ../$s1) = tree1asubdir/path5)
)'
-test_expect_success SYMLINKS \
+test_expect_success \
'checkout --temp symlink' '
rm -f path* .merge_* out .git/index &&
-ln -s b a &&
-git update-index --add a &&
+test_ln_s_add b a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
diff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh
index e6f59f1..fc9aad5 100755
--- a/t/t2007-checkout-symlink.sh
+++ b/t/t2007-checkout-symlink.sh
@@ -6,7 +6,7 @@ test_description='git checkout to switch between branches with symlink<->dir'
. ./test-lib.sh
-test_expect_success SYMLINKS setup '
+test_expect_success setup '
mkdir frotz &&
echo hello >frotz/filfre &&
@@ -25,25 +25,25 @@ test_expect_success SYMLINKS setup '
git rm --cached frotz/filfre &&
mv frotz xyzzy &&
- ln -s xyzzy frotz &&
- git add xyzzy/filfre frotz &&
+ test_ln_s_add xyzzy frotz &&
+ git add xyzzy/filfre &&
test_tick &&
git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/"
'
-test_expect_success SYMLINKS 'switch from symlink to dir' '
+test_expect_success 'switch from symlink to dir' '
git checkout master
'
-test_expect_success SYMLINKS 'Remove temporary directories & switch to master' '
+test_expect_success 'Remove temporary directories & switch to master' '
rm -fr frotz xyzzy nitfol &&
git checkout -f master
'
-test_expect_success SYMLINKS 'switch from dir to symlink' '
+test_expect_success 'switch from dir to symlink' '
git checkout side
diff --git a/t/t2021-checkout-overwrite.sh b/t/t2021-checkout-overwrite.sh
index 5da63e9..c2ada7d 100755
--- a/t/t2021-checkout-overwrite.sh
+++ b/t/t2021-checkout-overwrite.sh
@@ -29,21 +29,25 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' '
test -f a/b
'
-test_expect_success SYMLINKS 'create a commit where dir a/b changed to symlink' '
+test_expect_success 'create a commit where dir a/b changed to symlink' '
rm -rf a/b && # cleanup if previous test failed
git checkout -f -b symlink start &&
rm -rf a/b &&
- ln -s foo a/b &&
git add -A &&
+ test_ln_s_add foo a/b &&
git commit -m "dir to symlink"
'
-test_expect_success SYMLINKS 'checkout commit with dir must not remove untracked a/b' '
+test_expect_success 'checkout commit with dir must not remove untracked a/b' '
git rm --cached a/b &&
git commit -m "un-track the symlink" &&
- test_must_fail git checkout start &&
+ test_must_fail git checkout start
+'
+
+test_expect_success SYMLINKS 'the symlink remained' '
+
test -h a/b
'
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index b2bd419..9bf2bdf 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -96,11 +96,10 @@ test_expect_success 'non-limited update in subdir leaves root alone' '
test_cmp expect actual
'
-test_expect_success SYMLINKS 'replace a file with a symlink' '
+test_expect_success 'replace a file with a symlink' '
rm foo &&
- ln -s top foo &&
- git add -u -- foo
+ test_ln_s_add top foo
'
diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index 88be904..563ac7f 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -19,12 +19,7 @@ filesystem.
test_expect_success 'setup ' '
date >path0 &&
- if test_have_prereq SYMLINKS
- then
- ln -s xyzzy path1
- else
- date >path1
- fi &&
+ test_ln_s xyzzy path1 &&
mkdir path2 path3 path4 &&
date >path2/file2 &&
date >path2-junk &&
diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh
index 2d0ff2d..310e0a2 100755
--- a/t/t3010-ls-files-killed-modified.sh
+++ b/t/t3010-ls-files-killed-modified.sh
@@ -39,12 +39,7 @@ modified without reporting path9 and path10.
test_expect_success 'git update-index --add to add various paths.' '
date >path0 &&
- if test_have_prereq SYMLINKS
- then
- ln -s xyzzy path1
- else
- date > path1
- fi &&
+ test_ln_s_add xyzzy path1 &&
mkdir path2 path3 &&
date >path2/file2 &&
date >path3/file3 &&
@@ -52,20 +47,14 @@ test_expect_success 'git update-index --add to add various paths.' '
date >path8 &&
: >path9 &&
date >path10 &&
- git update-index --add -- path0 path1 path?/file? path7 path8 path9 path10 &&
+ git update-index --add -- path0 path?/file? path7 path8 path9 path10 &&
rm -fr path? # leave path10 alone
'
test_expect_success 'git ls-files -k to show killed files.' '
date >path2 &&
- if test_have_prereq SYMLINKS
- then
- ln -s frotz path3 &&
- ln -s nitfol path5
- else
- date >path3 &&
- date >path5
- fi &&
+ test_ln_s frotz path3 &&
+ test_ln_s nitfol path5 &&
mkdir path0 path1 path6 &&
date >path0/file0 &&
date >path1/file1 &&
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 874b3a6..aab86e8 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -30,10 +30,9 @@ test_expect_success \
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
esac'
-test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by symlink' '
+test_expect_success 'git add: filemode=0 should not get confused by symlink' '
rm -f xfoo1 &&
- ln -s foo xfoo1 &&
- git add xfoo1 &&
+ test_ln_s_add foo xfoo1 &&
case "`git ls-files --stage xfoo1`" in
120000" "*xfoo1) echo pass;;
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
@@ -51,21 +50,19 @@ test_expect_success \
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
esac'
-test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by symlink' '
+test_expect_success 'git add: filemode=0 should not get confused by symlink' '
rm -f xfoo2 &&
- ln -s foo xfoo2 &&
- git update-index --add xfoo2 &&
+ test_ln_s_add foo xfoo2 &&
case "`git ls-files --stage xfoo2`" in
120000" "*xfoo2) echo pass;;
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
esac
'
-test_expect_success SYMLINKS \
+test_expect_success \
'git update-index --add: Test that executable bit is not used...' \
'git config core.filemode 0 &&
- ln -s xfoo2 xfoo3 &&
- git update-index --add xfoo3 &&
+ test_ln_s_add xfoo2 xfoo3 && # runs git update-index --add
case "`git ls-files --stage xfoo3`" in
120000" "*xfoo3) echo pass;;
*) echo fail; git ls-files --stage xfoo3; (exit 1);;
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 5dfbda7..8ff039b 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -336,41 +336,58 @@ test_expect_success SYMLINKS 'stash file to symlink (full stage)' '
# This test creates a commit with a symlink used for the following tests
-test_expect_success SYMLINKS 'stash symlink to file' '
+test_expect_success 'stash symlink to file' '
git reset --hard &&
- ln -s file filelink &&
- git add filelink &&
+ test_ln_s_add file filelink &&
git commit -m "Add symlink" &&
rm filelink &&
cp file filelink &&
- git stash save "symlink to file" &&
+ git stash save "symlink to file"
+'
+
+test_expect_success SYMLINKS 'this must have re-created the symlink' '
test -h filelink &&
- case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac &&
+ case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
+'
+
+test_expect_success 'unstash must re-create the file' '
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
'
-test_expect_success SYMLINKS 'stash symlink to file (stage rm)' '
+test_expect_success 'stash symlink to file (stage rm)' '
git reset --hard &&
git rm filelink &&
cp file filelink &&
- git stash save "symlink to file (stage rm)" &&
+ git stash save "symlink to file (stage rm)"
+'
+
+test_expect_success SYMLINKS 'this must have re-created the symlink' '
test -h filelink &&
- case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac &&
+ case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
+'
+
+test_expect_success 'unstash must re-create the file' '
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
'
-test_expect_success SYMLINKS 'stash symlink to file (full stage)' '
+test_expect_success 'stash symlink to file (full stage)' '
git reset --hard &&
rm filelink &&
cp file filelink &&
git add filelink &&
- git stash save "symlink to file (full stage)" &&
+ git stash save "symlink to file (full stage)"
+'
+
+test_expect_success SYMLINKS 'this must have re-created the symlink' '
test -h filelink &&
- case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac &&
+ case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
+'
+
+test_expect_success 'unstash must re-create the file' '
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
diff --git a/t/t4008-diff-break-rewrite.sh b/t/t4008-diff-break-rewrite.sh
index 73b4a24..27e98a8 100755
--- a/t/t4008-diff-break-rewrite.sh
+++ b/t/t4008-diff-break-rewrite.sh
@@ -99,11 +99,11 @@ test_expect_success \
'validate result of -B -M (#4)' \
'compare_diff_raw expected current'
-test_expect_success SYMLINKS \
+test_expect_success \
'make file0 into something completely different' \
'rm -f file0 &&
- ln -s frotz file0 &&
- git update-index file0 file1'
+ test_ln_s_add frotz file0 &&
+ git update-index file1'
test_expect_success \
'run diff with -B' \
@@ -114,7 +114,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 M100 file1
EOF
-test_expect_success SYMLINKS \
+test_expect_success \
'validate result of -B (#5)' \
'compare_diff_raw expected current'
@@ -129,7 +129,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 R file0 file1
EOF
-test_expect_success SYMLINKS \
+test_expect_success \
'validate result of -B -M (#6)' \
'compare_diff_raw expected current'
@@ -144,7 +144,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 M file1
EOF
-test_expect_success SYMLINKS \
+test_expect_success \
'validate result of -M (#7)' \
'compare_diff_raw expected current'
diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh
index f0d5041..3888519 100755
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
@@ -9,7 +9,7 @@ test_description='Test diff of symlinks.
. ./test-lib.sh
. "$TEST_DIRECTORY"/diff-lib.sh
-test_expect_success SYMLINKS 'diff new symlink and file' '
+test_expect_success 'diff new symlink and file' '
cat >expected <<-\EOF &&
diff --git a/frotz b/frotz
new file mode 120000
@@ -27,22 +27,25 @@ test_expect_success SYMLINKS 'diff new symlink and file' '
@@ -0,0 +1 @@
+xyzzy
EOF
- ln -s xyzzy frotz &&
- echo xyzzy >nitfol &&
+
+ # the empty tree
git update-index &&
tree=$(git write-tree) &&
- git update-index --add frotz nitfol &&
+
+ test_ln_s_add xyzzy frotz &&
+ echo xyzzy >nitfol &&
+ git update-index --add nitfol &&
GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree >current &&
compare_diff_patch expected current
'
-test_expect_success SYMLINKS 'diff unchanged symlink and file' '
+test_expect_success 'diff unchanged symlink and file' '
tree=$(git write-tree) &&
git update-index frotz nitfol &&
test -z "$(git diff-index --name-only $tree)"
'
-test_expect_success SYMLINKS 'diff removed symlink and file' '
+test_expect_success 'diff removed symlink and file' '
cat >expected <<-\EOF &&
diff --git a/frotz b/frotz
deleted file mode 120000
@@ -66,12 +69,12 @@ test_expect_success SYMLINKS 'diff removed symlink and file' '
compare_diff_patch expected current
'
-test_expect_success SYMLINKS 'diff identical, but newly created symlink and file' '
+test_expect_success 'diff identical, but newly created symlink and file' '
>expected &&
rm -f frotz nitfol &&
echo xyzzy >nitfol &&
test-chmtime +10 nitfol &&
- ln -s xyzzy frotz &&
+ test_ln_s xyzzy frotz &&
git diff-index -M -p $tree >current &&
compare_diff_patch expected current &&
@@ -80,7 +83,7 @@ test_expect_success SYMLINKS 'diff identical, but newly created symlink and file
compare_diff_patch expected current
'
-test_expect_success SYMLINKS 'diff different symlink and file' '
+test_expect_success 'diff different symlink and file' '
cat >expected <<-\EOF &&
diff --git a/frotz b/frotz
index 7c465af..df1db54 120000
@@ -100,7 +103,7 @@ test_expect_success SYMLINKS 'diff different symlink and file' '
+yxyyz
EOF
rm -f frotz &&
- ln -s yxyyz frotz &&
+ test_ln_s yxyyz frotz &&
echo yxyyz >nitfol &&
git diff-index -M -p $tree >current &&
compare_diff_patch expected current
diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh
index 53ec330..f75f46f 100755
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
@@ -139,12 +139,10 @@ index 0000000..67be421
+frotz
\ No newline at end of file
EOF
-# make a symlink the hard way that works on symlink-challenged file systems
+
test_expect_success 'textconv does not act on symlinks' '
- printf frotz > file &&
- git add file &&
- git ls-files -s | sed -e s/100644/120000/ |
- git update-index --index-info &&
+ rm -f file &&
+ test_ln_s_add frotz file &&
git commit -m typechange &&
git show >diff &&
find_diff <diff >actual &&
diff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh
index 7674dd2..872fcda 100755
--- a/t/t4115-apply-symlink.sh
+++ b/t/t4115-apply-symlink.sh
@@ -9,18 +9,16 @@ test_description='git apply symlinks and partial files
. ./test-lib.sh
-test_expect_success SYMLINKS setup '
+test_expect_success setup '
- ln -s path1/path2/path3/path4/path5 link1 &&
- git add link? &&
+ test_ln_s_add path1/path2/path3/path4/path5 link1 &&
git commit -m initial &&
git branch side &&
rm -f link? &&
- ln -s htap6 link1 &&
- git update-index link? &&
+ test_ln_s_add htap6 link1 &&
git commit -m second &&
git diff-tree -p HEAD^ HEAD >patch &&
@@ -37,7 +35,7 @@ test_expect_success SYMLINKS 'apply symlink patch' '
'
-test_expect_success SYMLINKS 'apply --index symlink patch' '
+test_expect_success 'apply --index symlink patch' '
git checkout -f side &&
git apply --index patch &&
diff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh
index 3940737..70b3a06 100755
--- a/t/t4122-apply-symlink-inside.sh
+++ b/t/t4122-apply-symlink-inside.sh
@@ -10,11 +10,11 @@ lecho () {
done
}
-test_expect_success SYMLINKS setup '
+test_expect_success setup '
mkdir -p arch/i386/boot arch/x86_64 &&
lecho 1 2 3 4 5 >arch/i386/boot/Makefile &&
- ln -s ../i386/boot arch/x86_64/boot &&
+ test_ln_s_add ../i386/boot arch/x86_64/boot &&
git add . &&
test_tick &&
git commit -m initial &&
@@ -31,7 +31,7 @@ test_expect_success SYMLINKS setup '
'
-test_expect_success SYMLINKS apply '
+test_expect_success apply '
git checkout test &&
git diff --exit-code test &&
@@ -40,7 +40,7 @@ test_expect_success SYMLINKS apply '
'
-test_expect_success SYMLINKS 'check result' '
+test_expect_success 'check result' '
git diff --exit-code master &&
git diff --exit-code --cached master &&
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..101816e 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -218,13 +218,13 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
rm -f dirty dirty2
-test_expect_success SYMLINKS 'git mv should overwrite symlink to a file' '
+test_expect_success 'git mv should overwrite symlink to a file' '
rm -fr .git &&
git init &&
echo 1 >moved &&
- ln -s moved symlink &&
- git add moved symlink &&
+ test_ln_s_add moved symlink &&
+ git add moved &&
test_must_fail git mv moved symlink &&
git mv -f moved symlink &&
! test -e moved &&
@@ -237,22 +237,26 @@ test_expect_success SYMLINKS 'git mv should overwrite symlink to a file' '
rm -f moved symlink
-test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
+test_expect_success 'git mv should overwrite file with a symlink' '
rm -fr .git &&
git init &&
echo 1 >moved &&
- ln -s moved symlink &&
- git add moved symlink &&
+ test_ln_s_add moved symlink &&
+ git add moved &&
test_must_fail git mv symlink moved &&
git mv -f symlink moved &&
! test -e symlink &&
- test -h moved &&
git update-index --refresh &&
git diff-files --quiet
'
+test_expect_success SYMLINKS 'check moved symlink' '
+
+ test -h moved
+'
+
rm -f moved symlink
test_done
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index 6547eb8..758a623 100755
--- a/t/t7607-merge-overwrite.sh
+++ b/t/t7607-merge-overwrite.sh
@@ -141,11 +141,10 @@ test_expect_success SYMLINKS 'will not overwrite untracked symlink in leading pa
test_path_is_missing .git/MERGE_HEAD
'
-test_expect_success SYMLINKS 'will not be confused by symlink in leading path' '
+test_expect_success 'will not be confused by symlink in leading path' '
git reset --hard c0 &&
rm -rf sub &&
- ln -s sub2 sub &&
- git add sub &&
+ test_ln_s_add sub2 sub &&
git commit -m ln &&
git checkout sub
'
diff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh
index bf6caa4..7683515 100755
--- a/t/t8006-blame-textconv.sh
+++ b/t/t8006-blame-textconv.sh
@@ -18,17 +18,13 @@ test_expect_success 'setup ' '
echo "bin: test number 0" >zero.bin &&
echo "bin: test 1" >one.bin &&
echo "bin: test number 2" >two.bin &&
- if test_have_prereq SYMLINKS; then
- ln -s one.bin symlink.bin
- fi &&
+ test_ln_s_add one.bin symlink.bin &&
git add . &&
GIT_AUTHOR_NAME=Number1 git commit -a -m First --date="2010-01-01 18:00:00" &&
echo "bin: test 1 version 2" >one.bin &&
echo "bin: test number 2 version 2" >>two.bin &&
- if test_have_prereq SYMLINKS; then
- rm symlink.bin &&
- ln -s two.bin symlink.bin
- fi &&
+ rm -f symlink.bin &&
+ test_ln_s_add two.bin symlink.bin &&
GIT_AUTHOR_NAME=Number2 git commit -a -m Second --date="2010-01-01 20:00:00"
'
@@ -135,7 +131,7 @@ test_expect_success SYMLINKS 'blame --textconv (on symlink)' '
# cp two.bin three.bin and make small tweak
# (this will direct blame -C -C three.bin to consider two.bin and symlink.bin)
-test_expect_success SYMLINKS 'make another new commit' '
+test_expect_success 'make another new commit' '
cat >three.bin <<\EOF &&
bin: test number 2
bin: test number 2 version 2
@@ -146,7 +142,7 @@ EOF
GIT_AUTHOR_NAME=Number4 git commit -a -m Fourth --date="2010-01-01 23:00:00"
'
-test_expect_success SYMLINKS 'blame on last commit (-C -C, symlink)' '
+test_expect_success 'blame on last commit (-C -C, symlink)' '
git blame -C -C three.bin >blame &&
find_blame <blame >result &&
cat >expected <<\EOF &&
diff --git a/t/t8007-cat-file-textconv.sh b/t/t8007-cat-file-textconv.sh
index 78a0085..b95e102 100755
--- a/t/t8007-cat-file-textconv.sh
+++ b/t/t8007-cat-file-textconv.sh
@@ -12,9 +12,7 @@ chmod +x helper
test_expect_success 'setup ' '
echo "bin: test" >one.bin &&
- if test_have_prereq SYMLINKS; then
- ln -s one.bin symlink.bin
- fi &&
+ test_ln_s_add one.bin symlink.bin &&
git add . &&
GIT_AUTHOR_NAME=Number1 git commit -a -m First --date="2010-01-01 18:00:00" &&
echo "bin: test version 2" >one.bin &&
@@ -72,14 +70,14 @@ test_expect_success 'cat-file --textconv on previous commit' '
test_cmp expected result
'
-test_expect_success SYMLINKS 'cat-file without --textconv (symlink)' '
+test_expect_success 'cat-file without --textconv (symlink)' '
git cat-file blob :symlink.bin >result &&
printf "%s" "one.bin" >expected
test_cmp expected result
'
-test_expect_success SYMLINKS 'cat-file --textconv on index (symlink)' '
+test_expect_success 'cat-file --textconv on index (symlink)' '
! git cat-file --textconv :symlink.bin 2>result &&
cat >expected <<\EOF &&
fatal: git cat-file --textconv: unable to run textconv on :symlink.bin
@@ -87,7 +85,7 @@ EOF
test_cmp expected result
'
-test_expect_success SYMLINKS 'cat-file --textconv on HEAD (symlink)' '
+test_expect_success 'cat-file --textconv on HEAD (symlink)' '
! git cat-file --textconv HEAD:symlink.bin 2>result &&
cat >expected <<EOF &&
fatal: git cat-file --textconv: unable to run textconv on HEAD:symlink.bin
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 2471bc6..34c2d8f 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -396,7 +396,7 @@ test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
test_expect_success 'tag-obj_tag' 'git fast-export tag-obj_tag'
test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
-test_expect_success SYMLINKS 'directory becomes symlink' '
+test_expect_success 'directory becomes symlink' '
git init dirtosymlink &&
git init result &&
(
@@ -408,8 +408,7 @@ test_expect_success SYMLINKS 'directory becomes symlink' '
git add foo/world bar/world &&
git commit -q -mone &&
git rm -r foo &&
- ln -s bar foo &&
- git add foo &&
+ test_ln_s_add bar foo &&
git commit -q -mtwo
) &&
(
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 6783c14..6fca193 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -156,10 +156,10 @@ test_expect_success \
git commit -a -m "File renamed." &&
gitweb_run "p=.git;a=commitdiff"'
-test_expect_success SYMLINKS \
+test_expect_success \
'commitdiff(0): file to symlink' \
'rm renamed_file &&
- ln -s file renamed_file &&
+ test_ln_s_add file renamed_file &&
git commit -a -m "File to symlink." &&
gitweb_run "p=.git;a=commitdiff"'
@@ -212,15 +212,14 @@ test_expect_success \
# ----------------------------------------------------------------------
# commitdiff testing (taken from t4114-apply-typechange.sh)
-test_expect_success SYMLINKS 'setup typechange commits' '
+test_expect_success 'setup typechange commits' '
echo "hello world" > foo &&
echo "hi planet" > bar &&
git update-index --add foo bar &&
git commit -m initial &&
git branch initial &&
rm -f foo &&
- ln -s bar foo &&
- git update-index foo &&
+ test_ln_s_add bar foo &&
git commit -m "foo symlinked to bar" &&
git branch foo-symlinked-to-bar &&
rm -f foo &&
@@ -361,11 +360,7 @@ test_expect_success \
echo "Changed" >> 04-rename-to &&
test_chmod +x 05-mode-change &&
rm -f 06-file-or-symlink &&
- if test_have_prereq SYMLINKS; then
- ln -s 01-change 06-file-or-symlink
- else
- printf %s 01-change > 06-file-or-symlink
- fi &&
+ test_ln_s_add 01-change 06-file-or-symlink &&
echo "Changed and have mode changed" > 07-change-mode-change &&
test_chmod +x 07-change-mode-change &&
git commit -a -m "Large commit" &&
--
1.8.3.rc1.32.g8b61cbb
^ permalink raw reply related [relevance 4%]
* [PATCH v2 04/10] tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
2013-06-07 20:53 4% ` [PATCH v2 00/10] Increase test coverage on Windows by removing SYMLINKS from many tests Johannes Sixt
@ 2013-06-07 20:53 5% ` Johannes Sixt
0 siblings, 0 replies; 200+ results
From: Johannes Sixt @ 2013-06-07 20:53 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Ramkumar Ramachandra
There are many instances where the treatment of symbolic links in the
object model and the algorithms are tested, but where it is not
necessary to actually have a symbolic link in the worktree. Make
adjustments to the tests and remove the SYMLINKS prerequisite when
appropriate in trivial cases, where "trivial" means:
- merely a replacement of 'ln -s a b && git add b' by test_ln_s_add
is needed;
- a test for symbolic link on the file system can be split off (and
remains protected by SYMLINKS);
- existing code is equivalent to test_ln_s_add.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
t/t1004-read-tree-m-u-wf.sh | 7 +++---
t/t2001-checkout-cache-clash.sh | 7 +++---
t/t2004-checkout-cache-temp.sh | 5 ++---
t/t2007-checkout-symlink.sh | 12 +++++------
t/t2021-checkout-overwrite.sh | 12 +++++++----
t/t2200-add-update.sh | 5 ++---
t/t3010-ls-files-killed-modified.sh | 9 ++------
t/t3700-add.sh | 15 ++++++-------
t/t3903-stash.sh | 39 ++++++++++++++++++++++++----------
t/t4008-diff-break-rewrite.sh | 12 +++++------
t/t4030-diff-textconv.sh | 8 +++----
t/t4115-apply-symlink.sh | 10 ++++-----
t/t4122-apply-symlink-inside.sh | 8 +++----
t/t7001-mv.sh | 18 ++++++++++------
t/t7607-merge-overwrite.sh | 5 ++---
t/t8006-blame-textconv.sh | 14 +++++-------
t/t8007-cat-file-textconv.sh | 10 ++++-----
t/t9350-fast-export.sh | 5 ++---
t/t9500-gitweb-standalone-no-errors.sh | 15 +++++--------
19 files changed, 106 insertions(+), 110 deletions(-)
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index b3ae7d5..3e72aff 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -158,7 +158,7 @@ test_expect_success '3-way not overwriting local changes (their side)' '
'
-test_expect_success SYMLINKS 'funny symlink in work tree' '
+test_expect_success 'funny symlink in work tree' '
git reset --hard &&
git checkout -b sym-b side-b &&
@@ -170,15 +170,14 @@ test_expect_success SYMLINKS 'funny symlink in work tree' '
rm -fr a &&
git checkout -b sym-a side-a &&
mkdir -p a &&
- ln -s ../b a/b &&
- git add a/b &&
+ test_ln_s_add ../b a/b &&
git commit -m "we add a/b" &&
read_tree_u_must_succeed -m -u sym-a sym-a sym-b
'
-test_expect_success SYMLINKS,SANITY 'funny symlink in work tree, un-unlink-able' '
+test_expect_success SANITY 'funny symlink in work tree, un-unlink-able' '
rm -fr a b &&
git reset --hard &&
diff --git a/t/t2001-checkout-cache-clash.sh b/t/t2001-checkout-cache-clash.sh
index 98aa73e..1fc8e63 100755
--- a/t/t2001-checkout-cache-clash.sh
+++ b/t/t2001-checkout-cache-clash.sh
@@ -59,10 +59,9 @@ test_expect_success \
'git read-tree -m $tree1 && git checkout-index -f -a'
test_debug 'show_files $tree1'
-test_expect_success SYMLINKS \
- 'git update-index --add a symlink.' \
- 'ln -s path0 path1 &&
- git update-index --add path1'
+test_expect_success \
+ 'add a symlink' \
+ 'test_ln_s_add path0 path1'
test_expect_success \
'writing tree out with git write-tree' \
'tree3=$(git write-tree)'
diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh
index 0f4b289..f171a55 100755
--- a/t/t2004-checkout-cache-temp.sh
+++ b/t/t2004-checkout-cache-temp.sh
@@ -194,11 +194,10 @@ test_expect_success \
test $(cat ../$s1) = tree1asubdir/path5)
)'
-test_expect_success SYMLINKS \
+test_expect_success \
'checkout --temp symlink' '
rm -f path* .merge_* out .git/index &&
-ln -s b a &&
-git update-index --add a &&
+test_ln_s_add b a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
diff --git a/t/t2007-checkout-symlink.sh b/t/t2007-checkout-symlink.sh
index e6f59f1..fc9aad5 100755
--- a/t/t2007-checkout-symlink.sh
+++ b/t/t2007-checkout-symlink.sh
@@ -6,7 +6,7 @@ test_description='git checkout to switch between branches with symlink<->dir'
. ./test-lib.sh
-test_expect_success SYMLINKS setup '
+test_expect_success setup '
mkdir frotz &&
echo hello >frotz/filfre &&
@@ -25,25 +25,25 @@ test_expect_success SYMLINKS setup '
git rm --cached frotz/filfre &&
mv frotz xyzzy &&
- ln -s xyzzy frotz &&
- git add xyzzy/filfre frotz &&
+ test_ln_s_add xyzzy frotz &&
+ git add xyzzy/filfre &&
test_tick &&
git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/"
'
-test_expect_success SYMLINKS 'switch from symlink to dir' '
+test_expect_success 'switch from symlink to dir' '
git checkout master
'
-test_expect_success SYMLINKS 'Remove temporary directories & switch to master' '
+test_expect_success 'Remove temporary directories & switch to master' '
rm -fr frotz xyzzy nitfol &&
git checkout -f master
'
-test_expect_success SYMLINKS 'switch from dir to symlink' '
+test_expect_success 'switch from dir to symlink' '
git checkout side
diff --git a/t/t2021-checkout-overwrite.sh b/t/t2021-checkout-overwrite.sh
index 5da63e9..c2ada7d 100755
--- a/t/t2021-checkout-overwrite.sh
+++ b/t/t2021-checkout-overwrite.sh
@@ -29,21 +29,25 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' '
test -f a/b
'
-test_expect_success SYMLINKS 'create a commit where dir a/b changed to symlink' '
+test_expect_success 'create a commit where dir a/b changed to symlink' '
rm -rf a/b && # cleanup if previous test failed
git checkout -f -b symlink start &&
rm -rf a/b &&
- ln -s foo a/b &&
git add -A &&
+ test_ln_s_add foo a/b &&
git commit -m "dir to symlink"
'
-test_expect_success SYMLINKS 'checkout commit with dir must not remove untracked a/b' '
+test_expect_success 'checkout commit with dir must not remove untracked a/b' '
git rm --cached a/b &&
git commit -m "un-track the symlink" &&
- test_must_fail git checkout start &&
+ test_must_fail git checkout start
+'
+
+test_expect_success SYMLINKS 'the symlink remained' '
+
test -h a/b
'
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index b2bd419..9bf2bdf 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -96,11 +96,10 @@ test_expect_success 'non-limited update in subdir leaves root alone' '
test_cmp expect actual
'
-test_expect_success SYMLINKS 'replace a file with a symlink' '
+test_expect_success 'replace a file with a symlink' '
rm foo &&
- ln -s top foo &&
- git add -u -- foo
+ test_ln_s_add top foo
'
diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh
index 2d0ff2d..262e617 100755
--- a/t/t3010-ls-files-killed-modified.sh
+++ b/t/t3010-ls-files-killed-modified.sh
@@ -39,12 +39,7 @@ modified without reporting path9 and path10.
test_expect_success 'git update-index --add to add various paths.' '
date >path0 &&
- if test_have_prereq SYMLINKS
- then
- ln -s xyzzy path1
- else
- date > path1
- fi &&
+ test_ln_s_add xyzzy path1 &&
mkdir path2 path3 &&
date >path2/file2 &&
date >path3/file3 &&
@@ -52,7 +47,7 @@ test_expect_success 'git update-index --add to add various paths.' '
date >path8 &&
: >path9 &&
date >path10 &&
- git update-index --add -- path0 path1 path?/file? path7 path8 path9 path10 &&
+ git update-index --add -- path0 path?/file? path7 path8 path9 path10 &&
rm -fr path? # leave path10 alone
'
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 874b3a6..aab86e8 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -30,10 +30,9 @@ test_expect_success \
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
esac'
-test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by symlink' '
+test_expect_success 'git add: filemode=0 should not get confused by symlink' '
rm -f xfoo1 &&
- ln -s foo xfoo1 &&
- git add xfoo1 &&
+ test_ln_s_add foo xfoo1 &&
case "`git ls-files --stage xfoo1`" in
120000" "*xfoo1) echo pass;;
*) echo fail; git ls-files --stage xfoo1; (exit 1);;
@@ -51,21 +50,19 @@ test_expect_success \
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
esac'
-test_expect_success SYMLINKS 'git add: filemode=0 should not get confused by symlink' '
+test_expect_success 'git add: filemode=0 should not get confused by symlink' '
rm -f xfoo2 &&
- ln -s foo xfoo2 &&
- git update-index --add xfoo2 &&
+ test_ln_s_add foo xfoo2 &&
case "`git ls-files --stage xfoo2`" in
120000" "*xfoo2) echo pass;;
*) echo fail; git ls-files --stage xfoo2; (exit 1);;
esac
'
-test_expect_success SYMLINKS \
+test_expect_success \
'git update-index --add: Test that executable bit is not used...' \
'git config core.filemode 0 &&
- ln -s xfoo2 xfoo3 &&
- git update-index --add xfoo3 &&
+ test_ln_s_add xfoo2 xfoo3 && # runs git update-index --add
case "`git ls-files --stage xfoo3`" in
120000" "*xfoo3) echo pass;;
*) echo fail; git ls-files --stage xfoo3; (exit 1);;
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 5dfbda7..8ff039b 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -336,41 +336,58 @@ test_expect_success SYMLINKS 'stash file to symlink (full stage)' '
# This test creates a commit with a symlink used for the following tests
-test_expect_success SYMLINKS 'stash symlink to file' '
+test_expect_success 'stash symlink to file' '
git reset --hard &&
- ln -s file filelink &&
- git add filelink &&
+ test_ln_s_add file filelink &&
git commit -m "Add symlink" &&
rm filelink &&
cp file filelink &&
- git stash save "symlink to file" &&
+ git stash save "symlink to file"
+'
+
+test_expect_success SYMLINKS 'this must have re-created the symlink' '
test -h filelink &&
- case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac &&
+ case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
+'
+
+test_expect_success 'unstash must re-create the file' '
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
'
-test_expect_success SYMLINKS 'stash symlink to file (stage rm)' '
+test_expect_success 'stash symlink to file (stage rm)' '
git reset --hard &&
git rm filelink &&
cp file filelink &&
- git stash save "symlink to file (stage rm)" &&
+ git stash save "symlink to file (stage rm)"
+'
+
+test_expect_success SYMLINKS 'this must have re-created the symlink' '
test -h filelink &&
- case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac &&
+ case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
+'
+
+test_expect_success 'unstash must re-create the file' '
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
'
-test_expect_success SYMLINKS 'stash symlink to file (full stage)' '
+test_expect_success 'stash symlink to file (full stage)' '
git reset --hard &&
rm filelink &&
cp file filelink &&
git add filelink &&
- git stash save "symlink to file (full stage)" &&
+ git stash save "symlink to file (full stage)"
+'
+
+test_expect_success SYMLINKS 'this must have re-created the symlink' '
test -h filelink &&
- case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac &&
+ case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
+'
+
+test_expect_success 'unstash must re-create the file' '
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
diff --git a/t/t4008-diff-break-rewrite.sh b/t/t4008-diff-break-rewrite.sh
index 73b4a24..27e98a8 100755
--- a/t/t4008-diff-break-rewrite.sh
+++ b/t/t4008-diff-break-rewrite.sh
@@ -99,11 +99,11 @@ test_expect_success \
'validate result of -B -M (#4)' \
'compare_diff_raw expected current'
-test_expect_success SYMLINKS \
+test_expect_success \
'make file0 into something completely different' \
'rm -f file0 &&
- ln -s frotz file0 &&
- git update-index file0 file1'
+ test_ln_s_add frotz file0 &&
+ git update-index file1'
test_expect_success \
'run diff with -B' \
@@ -114,7 +114,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 M100 file1
EOF
-test_expect_success SYMLINKS \
+test_expect_success \
'validate result of -B (#5)' \
'compare_diff_raw expected current'
@@ -129,7 +129,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 R file0 file1
EOF
-test_expect_success SYMLINKS \
+test_expect_success \
'validate result of -B -M (#6)' \
'compare_diff_raw expected current'
@@ -144,7 +144,7 @@ cat >expected <<\EOF
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 M file1
EOF
-test_expect_success SYMLINKS \
+test_expect_success \
'validate result of -M (#7)' \
'compare_diff_raw expected current'
diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh
index 53ec330..f75f46f 100755
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
@@ -139,12 +139,10 @@ index 0000000..67be421
+frotz
\ No newline at end of file
EOF
-# make a symlink the hard way that works on symlink-challenged file systems
+
test_expect_success 'textconv does not act on symlinks' '
- printf frotz > file &&
- git add file &&
- git ls-files -s | sed -e s/100644/120000/ |
- git update-index --index-info &&
+ rm -f file &&
+ test_ln_s_add frotz file &&
git commit -m typechange &&
git show >diff &&
find_diff <diff >actual &&
diff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh
index 7674dd2..872fcda 100755
--- a/t/t4115-apply-symlink.sh
+++ b/t/t4115-apply-symlink.sh
@@ -9,18 +9,16 @@ test_description='git apply symlinks and partial files
. ./test-lib.sh
-test_expect_success SYMLINKS setup '
+test_expect_success setup '
- ln -s path1/path2/path3/path4/path5 link1 &&
- git add link? &&
+ test_ln_s_add path1/path2/path3/path4/path5 link1 &&
git commit -m initial &&
git branch side &&
rm -f link? &&
- ln -s htap6 link1 &&
- git update-index link? &&
+ test_ln_s_add htap6 link1 &&
git commit -m second &&
git diff-tree -p HEAD^ HEAD >patch &&
@@ -37,7 +35,7 @@ test_expect_success SYMLINKS 'apply symlink patch' '
'
-test_expect_success SYMLINKS 'apply --index symlink patch' '
+test_expect_success 'apply --index symlink patch' '
git checkout -f side &&
git apply --index patch &&
diff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh
index 3940737..70b3a06 100755
--- a/t/t4122-apply-symlink-inside.sh
+++ b/t/t4122-apply-symlink-inside.sh
@@ -10,11 +10,11 @@ lecho () {
done
}
-test_expect_success SYMLINKS setup '
+test_expect_success setup '
mkdir -p arch/i386/boot arch/x86_64 &&
lecho 1 2 3 4 5 >arch/i386/boot/Makefile &&
- ln -s ../i386/boot arch/x86_64/boot &&
+ test_ln_s_add ../i386/boot arch/x86_64/boot &&
git add . &&
test_tick &&
git commit -m initial &&
@@ -31,7 +31,7 @@ test_expect_success SYMLINKS setup '
'
-test_expect_success SYMLINKS apply '
+test_expect_success apply '
git checkout test &&
git diff --exit-code test &&
@@ -40,7 +40,7 @@ test_expect_success SYMLINKS apply '
'
-test_expect_success SYMLINKS 'check result' '
+test_expect_success 'check result' '
git diff --exit-code master &&
git diff --exit-code --cached master &&
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..101816e 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -218,13 +218,13 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
rm -f dirty dirty2
-test_expect_success SYMLINKS 'git mv should overwrite symlink to a file' '
+test_expect_success 'git mv should overwrite symlink to a file' '
rm -fr .git &&
git init &&
echo 1 >moved &&
- ln -s moved symlink &&
- git add moved symlink &&
+ test_ln_s_add moved symlink &&
+ git add moved &&
test_must_fail git mv moved symlink &&
git mv -f moved symlink &&
! test -e moved &&
@@ -237,22 +237,26 @@ test_expect_success SYMLINKS 'git mv should overwrite symlink to a file' '
rm -f moved symlink
-test_expect_success SYMLINKS 'git mv should overwrite file with a symlink' '
+test_expect_success 'git mv should overwrite file with a symlink' '
rm -fr .git &&
git init &&
echo 1 >moved &&
- ln -s moved symlink &&
- git add moved symlink &&
+ test_ln_s_add moved symlink &&
+ git add moved &&
test_must_fail git mv symlink moved &&
git mv -f symlink moved &&
! test -e symlink &&
- test -h moved &&
git update-index --refresh &&
git diff-files --quiet
'
+test_expect_success SYMLINKS 'check moved symlink' '
+
+ test -h moved
+'
+
rm -f moved symlink
test_done
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index 6547eb8..758a623 100755
--- a/t/t7607-merge-overwrite.sh
+++ b/t/t7607-merge-overwrite.sh
@@ -141,11 +141,10 @@ test_expect_success SYMLINKS 'will not overwrite untracked symlink in leading pa
test_path_is_missing .git/MERGE_HEAD
'
-test_expect_success SYMLINKS 'will not be confused by symlink in leading path' '
+test_expect_success 'will not be confused by symlink in leading path' '
git reset --hard c0 &&
rm -rf sub &&
- ln -s sub2 sub &&
- git add sub &&
+ test_ln_s_add sub2 sub &&
git commit -m ln &&
git checkout sub
'
diff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh
index bf6caa4..7683515 100755
--- a/t/t8006-blame-textconv.sh
+++ b/t/t8006-blame-textconv.sh
@@ -18,17 +18,13 @@ test_expect_success 'setup ' '
echo "bin: test number 0" >zero.bin &&
echo "bin: test 1" >one.bin &&
echo "bin: test number 2" >two.bin &&
- if test_have_prereq SYMLINKS; then
- ln -s one.bin symlink.bin
- fi &&
+ test_ln_s_add one.bin symlink.bin &&
git add . &&
GIT_AUTHOR_NAME=Number1 git commit -a -m First --date="2010-01-01 18:00:00" &&
echo "bin: test 1 version 2" >one.bin &&
echo "bin: test number 2 version 2" >>two.bin &&
- if test_have_prereq SYMLINKS; then
- rm symlink.bin &&
- ln -s two.bin symlink.bin
- fi &&
+ rm -f symlink.bin &&
+ test_ln_s_add two.bin symlink.bin &&
GIT_AUTHOR_NAME=Number2 git commit -a -m Second --date="2010-01-01 20:00:00"
'
@@ -135,7 +131,7 @@ test_expect_success SYMLINKS 'blame --textconv (on symlink)' '
# cp two.bin three.bin and make small tweak
# (this will direct blame -C -C three.bin to consider two.bin and symlink.bin)
-test_expect_success SYMLINKS 'make another new commit' '
+test_expect_success 'make another new commit' '
cat >three.bin <<\EOF &&
bin: test number 2
bin: test number 2 version 2
@@ -146,7 +142,7 @@ EOF
GIT_AUTHOR_NAME=Number4 git commit -a -m Fourth --date="2010-01-01 23:00:00"
'
-test_expect_success SYMLINKS 'blame on last commit (-C -C, symlink)' '
+test_expect_success 'blame on last commit (-C -C, symlink)' '
git blame -C -C three.bin >blame &&
find_blame <blame >result &&
cat >expected <<\EOF &&
diff --git a/t/t8007-cat-file-textconv.sh b/t/t8007-cat-file-textconv.sh
index 78a0085..b95e102 100755
--- a/t/t8007-cat-file-textconv.sh
+++ b/t/t8007-cat-file-textconv.sh
@@ -12,9 +12,7 @@ chmod +x helper
test_expect_success 'setup ' '
echo "bin: test" >one.bin &&
- if test_have_prereq SYMLINKS; then
- ln -s one.bin symlink.bin
- fi &&
+ test_ln_s_add one.bin symlink.bin &&
git add . &&
GIT_AUTHOR_NAME=Number1 git commit -a -m First --date="2010-01-01 18:00:00" &&
echo "bin: test version 2" >one.bin &&
@@ -72,14 +70,14 @@ test_expect_success 'cat-file --textconv on previous commit' '
test_cmp expected result
'
-test_expect_success SYMLINKS 'cat-file without --textconv (symlink)' '
+test_expect_success 'cat-file without --textconv (symlink)' '
git cat-file blob :symlink.bin >result &&
printf "%s" "one.bin" >expected
test_cmp expected result
'
-test_expect_success SYMLINKS 'cat-file --textconv on index (symlink)' '
+test_expect_success 'cat-file --textconv on index (symlink)' '
! git cat-file --textconv :symlink.bin 2>result &&
cat >expected <<\EOF &&
fatal: git cat-file --textconv: unable to run textconv on :symlink.bin
@@ -87,7 +85,7 @@ EOF
test_cmp expected result
'
-test_expect_success SYMLINKS 'cat-file --textconv on HEAD (symlink)' '
+test_expect_success 'cat-file --textconv on HEAD (symlink)' '
! git cat-file --textconv HEAD:symlink.bin 2>result &&
cat >expected <<EOF &&
fatal: git cat-file --textconv: unable to run textconv on HEAD:symlink.bin
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 2471bc6..34c2d8f 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -396,7 +396,7 @@ test_expect_success 'tree_tag-obj' 'git fast-export tree_tag-obj'
test_expect_success 'tag-obj_tag' 'git fast-export tag-obj_tag'
test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
-test_expect_success SYMLINKS 'directory becomes symlink' '
+test_expect_success 'directory becomes symlink' '
git init dirtosymlink &&
git init result &&
(
@@ -408,8 +408,7 @@ test_expect_success SYMLINKS 'directory becomes symlink' '
git add foo/world bar/world &&
git commit -q -mone &&
git rm -r foo &&
- ln -s bar foo &&
- git add foo &&
+ test_ln_s_add bar foo &&
git commit -q -mtwo
) &&
(
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 6783c14..6fca193 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -156,10 +156,10 @@ test_expect_success \
git commit -a -m "File renamed." &&
gitweb_run "p=.git;a=commitdiff"'
-test_expect_success SYMLINKS \
+test_expect_success \
'commitdiff(0): file to symlink' \
'rm renamed_file &&
- ln -s file renamed_file &&
+ test_ln_s_add file renamed_file &&
git commit -a -m "File to symlink." &&
gitweb_run "p=.git;a=commitdiff"'
@@ -212,15 +212,14 @@ test_expect_success \
# ----------------------------------------------------------------------
# commitdiff testing (taken from t4114-apply-typechange.sh)
-test_expect_success SYMLINKS 'setup typechange commits' '
+test_expect_success 'setup typechange commits' '
echo "hello world" > foo &&
echo "hi planet" > bar &&
git update-index --add foo bar &&
git commit -m initial &&
git branch initial &&
rm -f foo &&
- ln -s bar foo &&
- git update-index foo &&
+ test_ln_s_add bar foo &&
git commit -m "foo symlinked to bar" &&
git branch foo-symlinked-to-bar &&
rm -f foo &&
@@ -361,11 +360,7 @@ test_expect_success \
echo "Changed" >> 04-rename-to &&
test_chmod +x 05-mode-change &&
rm -f 06-file-or-symlink &&
- if test_have_prereq SYMLINKS; then
- ln -s 01-change 06-file-or-symlink
- else
- printf %s 01-change > 06-file-or-symlink
- fi &&
+ test_ln_s_add 01-change 06-file-or-symlink &&
echo "Changed and have mode changed" > 07-change-mode-change &&
test_chmod +x 07-change-mode-change &&
git commit -a -m "Large commit" &&
--
1.8.3.rc1.32.g8b61cbb
^ permalink raw reply related [relevance 5%]
* [PATCH v2 00/10] Increase test coverage on Windows by removing SYMLINKS from many tests
2013-06-01 9:34 4% [PATCH 00/11] Increase test coverage on Windows by removing SYMLINKS from many tests Johannes Sixt
2013-06-01 9:34 4% ` [PATCH 05/11] tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases) Johannes Sixt
@ 2013-06-07 20:53 4% ` Johannes Sixt
2013-06-07 20:53 5% ` [PATCH v2 04/10] tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases) Johannes Sixt
1 sibling, 1 reply; 200+ results
From: Johannes Sixt @ 2013-06-07 20:53 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Ramkumar Ramachandra
Many tests that involve symbolic links actually check only whether our
algorithms are correct by investigating the contents of the object
database and the index. Only some of them check the filesystem.
This series introduces a function test_ln_s_add that inserts a symbolic
link in the index even if the filesystem does not support symbolic links.
By using this function, many more tests can be run when the filesystem
does not have symblic links, aka Windows.
Changes since v1:
- Ripped out test_ln_s and corresponding conversions; they were dubious.
- There are no changes to t2100 anymore; the corresponding modernization
patch is gone.
- Moved the t4011 change from the "trivial cases" to its own patch.
It still contains the effects of the former test_ln_s, but open-coded
and with a comment.
Johannes Sixt (10):
test-chmtime: Fix exit code on Windows
t3010: modernize style
tests: introduce test_ln_s_add
tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial
cases)
t0000: use test_ln_s_add to remove SYMLINKS prerequisite
t3030: use test_ln_s_add to remove SYMLINKS prerequisite
t3100: use test_ln_s_add to remove SYMLINKS prerequisite
t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
t6035: use test_ln_s_add to remove SYMLINKS prerequisite
t4011: remove SYMLINKS prerequisite
t/README | 14 ++++
t/t0000-basic.sh | 39 +++--------
t/t1004-read-tree-m-u-wf.sh | 7 +-
t/t2001-checkout-cache-clash.sh | 7 +-
t/t2004-checkout-cache-temp.sh | 5 +-
t/t2007-checkout-symlink.sh | 12 ++--
t/t2021-checkout-overwrite.sh | 12 ++--
t/t2200-add-update.sh | 5 +-
t/t3010-ls-files-killed-modified.sh | 118 ++++++++++++++++-----------------
t/t3030-merge-recursive.sh | 62 ++++++++---------
t/t3100-ls-tree-restrict.sh | 42 +++++-------
t/t3509-cherry-pick-merge-df.sh | 12 ++--
t/t3700-add.sh | 15 ++---
t/t3903-stash.sh | 39 ++++++++---
t/t4008-diff-break-rewrite.sh | 12 ++--
t/t4011-diff-symlink.sh | 35 +++++++---
t/t4023-diff-rename-typechange.sh | 28 ++++----
t/t4030-diff-textconv.sh | 8 +--
t/t4114-apply-typechange.sh | 29 ++++----
t/t4115-apply-symlink.sh | 10 ++-
t/t4122-apply-symlink-inside.sh | 8 +--
t/t6035-merge-dir-to-symlink.sh | 73 ++++++++++++--------
t/t7001-mv.sh | 18 +++--
t/t7607-merge-overwrite.sh | 5 +-
t/t8006-blame-textconv.sh | 14 ++--
t/t8007-cat-file-textconv.sh | 10 ++-
t/t9350-fast-export.sh | 5 +-
t/t9500-gitweb-standalone-no-errors.sh | 15 ++---
t/test-lib-functions.sh | 17 +++++
test-chmtime.c | 8 +--
30 files changed, 351 insertions(+), 333 deletions(-)
--
1.8.3.rc1.32.g8b61cbb
^ permalink raw reply [relevance 4%]
* Re: What's cooking in git.git (Jul 2013, #07; Sun, 21)
@ 2013-07-28 17:23 5% ` Jens Lehmann
0 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-07-28 17:23 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Junio C Hamano, Git Mailing List
Am 22.07.2013 22:47, schrieb Jens Lehmann:
> Am 22.07.2013 09:48, schrieb Duy Nguyen:
>> On Mon, Jul 22, 2013 at 2:32 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>>> Am 22.07.2013 08:57, schrieb Junio C Hamano:
>>>> * jl/submodule-mv (2013-04-23) 5 commits
>>>> . submodule.c: duplicate real_path's return value
>>>> . rm: delete .gitmodules entry of submodules removed from the work tree
>>>> . Teach mv to update the path entry in .gitmodules for moved submodules
>>>> . Teach mv to move submodules using a gitfile
>>>> . Teach mv to move submodules together with their work trees
>>>>
>>>> "git mv A B" when moving a submodule A does "the right thing",
>>>> inclusing relocating its working tree and adjusting the paths in
>>>> the .gitmodules file.
>>>>
>>>> Ejected from 'pu', as it conflicts with nd/magic-pathspec.
>>>
>>> So I'll base my upcoming re-roll on pu, right?
>>
>> The conflicted part is the use of common_prefix. I think you might be
>> able to avoid the conflict by using quote.c:path_relative() instead of
>> common_prefix() and prepending "../" manually. Or not, I did not read
>> path_relative() carefully, nor your connect_work_tree_and_git_dir().
>
> Thanks for the pointers, I'll look into that.
Yup, relative_path() seems to be the solution here (and makes the
connect_work_tree_and_git_dir() function much shorter :-).
What worries me is that even though t7001 breaks because of this
conflict (just like it should) when run inside the t directory by
itself, the prove and normal test runs did not report any failures.
I have no idea what is going on here ...
^ permalink raw reply [relevance 5%]
* [PATCH v3 0/5] Teach mv to move submodules
@ 2013-07-30 19:48 6% Jens Lehmann
2013-07-30 19:49 10% ` [PATCH v3 1/5] Teach mv to move submodules together with their work trees Jens Lehmann
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Jens Lehmann @ 2013-07-30 19:48 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano, Heiko Voigt, Nguyen Thai Ngoc Duy
Here is my third iteration of this series.
Changes to v2 are:
- I resolved the conflict with Duy's pathspec series by replacing the
use of common_prefix() with relative_path().
- I separated the functions checking for modified unstaged .gitmodules
and staging the changes to that file into another commit, as they
are used by both mv and rm.
- mv and rm now die with the message "Please, stage your changes to
.gitmodules or stash them to proceed" instead of changing and
staging a .gitmodules file containing other unstaged modifications.
- Man pages for mv and rm are updated to tell the user what they do
with the gitlink and the .gitmodules file in case of submodules.
- Minor changes according to the last review (typos and a bit more
efficient coding).
This series applies cleanly on current pu (and I also ran t3600 and
t7001 manually to make sure I don't hit the silent breakage my last
series showed when I ran the whole test suite).
Jens Lehmann (5):
Teach mv to move submodules together with their work trees
Teach mv to move submodules using a gitfile
submodule.c: add .gitmodules staging helper functions
Teach mv to update the path entry in .gitmodules for moved submodules
rm: delete .gitmodules entry of submodules removed from the work tree
Documentation/git-mv.txt | 10 ++-
Documentation/git-rm.txt | 8 ++-
builtin/mv.c | 126 ++++++++++++++++++++++----------------
builtin/rm.c | 19 +++++-
submodule.c | 147 +++++++++++++++++++++++++++++++++++++++++++++
submodule.h | 5 ++
t/t3600-rm.sh | 98 ++++++++++++++++++++++++++++--
t/t7001-mv.sh | 128 +++++++++++++++++++++++++++++++++++++++
t/t7400-submodule-basic.sh | 14 ++---
t/t7610-mergetool.sh | 6 +-
10 files changed, 484 insertions(+), 77 deletions(-)
--
1.8.4.rc0.199.g7079aac
^ permalink raw reply [relevance 6%]
* [PATCH v3 1/5] Teach mv to move submodules together with their work trees
2013-07-30 19:48 6% [PATCH v3 0/5] Teach mv to move submodules Jens Lehmann
@ 2013-07-30 19:49 10% ` Jens Lehmann
2013-07-30 19:50 9% ` [PATCH v3 2/5] Teach mv to move submodules using a gitfile Jens Lehmann
2013-07-30 19:51 8% ` [PATCH v3 4/5] Teach mv to update the path entry in .gitmodules for moved submodules Jens Lehmann
2 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-07-30 19:49 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano, Heiko Voigt, Nguyen Thai Ngoc Duy
Currently the attempt to use "git mv" on a submodule errors out with:
fatal: source directory is empty, source=<src>, destination=<dest>
The reason is that mv searches for the submodule with a trailing slash in
the index, which it doesn't find (because it is stored without a trailing
slash). As it doesn't find any index entries inside the submodule it
claims the directory would be empty even though it isn't.
Fix that by searching for the name without a trailing slash and continue
if it is a submodule. Then rename() will move the submodule work tree just
like it moves a file.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
builtin/mv.c | 99 +++++++++++++++++++++++++++++++----------------------------
t/t7001-mv.sh | 34 ++++++++++++++++++++
2 files changed, 86 insertions(+), 47 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 16ce99b..1d3ef63 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -118,55 +118,60 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
&& lstat(dst, &st) == 0)
bad = _("cannot move directory over file");
else if (src_is_dir) {
- const char *src_w_slash = add_slash(src);
- int len_w_slash = length + 1;
- int first, last;
-
- modes[i] = WORKING_DIRECTORY;
-
- first = cache_name_pos(src_w_slash, len_w_slash);
- if (first >= 0)
- die (_("Huh? %.*s is in index?"),
- len_w_slash, src_w_slash);
-
- first = -1 - first;
- for (last = first; last < active_nr; last++) {
- const char *path = active_cache[last]->name;
- if (strncmp(path, src_w_slash, len_w_slash))
- break;
- }
- free((char *)src_w_slash);
-
- if (last - first < 1)
- bad = _("source directory is empty");
- else {
- int j, dst_len;
-
- if (last - first > 0) {
- source = xrealloc(source,
- (argc + last - first)
- * sizeof(char *));
- destination = xrealloc(destination,
- (argc + last - first)
- * sizeof(char *));
- modes = xrealloc(modes,
- (argc + last - first)
- * sizeof(enum update_mode));
+ int first = cache_name_pos(src, length);
+ if (first >= 0) {
+ if (!S_ISGITLINK(active_cache[first]->ce_mode))
+ die (_("Huh? Directory %s is in index and no submodule?"), src);
+ } else {
+ const char *src_w_slash = add_slash(src);
+ int last, len_w_slash = length + 1;
+
+ modes[i] = WORKING_DIRECTORY;
+
+ first = cache_name_pos(src_w_slash, len_w_slash);
+ if (first >= 0)
+ die (_("Huh? %.*s is in index?"),
+ len_w_slash, src_w_slash);
+
+ first = -1 - first;
+ for (last = first; last < active_nr; last++) {
+ const char *path = active_cache[last]->name;
+ if (strncmp(path, src_w_slash, len_w_slash))
+ break;
}
-
- dst = add_slash(dst);
- dst_len = strlen(dst);
-
- for (j = 0; j < last - first; j++) {
- const char *path =
- active_cache[first + j]->name;
- source[argc + j] = path;
- destination[argc + j] =
- prefix_path(dst, dst_len,
- path + length + 1);
- modes[argc + j] = INDEX;
+ free((char *)src_w_slash);
+
+ if (last - first < 1)
+ bad = _("source directory is empty");
+ else {
+ int j, dst_len;
+
+ if (last - first > 0) {
+ source = xrealloc(source,
+ (argc + last - first)
+ * sizeof(char *));
+ destination = xrealloc(destination,
+ (argc + last - first)
+ * sizeof(char *));
+ modes = xrealloc(modes,
+ (argc + last - first)
+ * sizeof(enum update_mode));
+ }
+
+ dst = add_slash(dst);
+ dst_len = strlen(dst);
+
+ for (j = 0; j < last - first; j++) {
+ const char *path =
+ active_cache[first + j]->name;
+ source[argc + j] = path;
+ destination[argc + j] =
+ prefix_path(dst, dst_len,
+ path + length + 1);
+ modes[argc + j] = INDEX;
+ }
+ argc += last - first;
}
- argc += last - first;
}
} else if (cache_name_pos(src, length) < 0)
bad = _("not under version control");
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 101816e..15c18b6 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -259,4 +259,38 @@ test_expect_success SYMLINKS 'check moved symlink' '
rm -f moved symlink
+test_expect_success 'setup submodule' '
+ git commit -m initial &&
+ git reset --hard &&
+ git submodule add ./. sub &&
+ echo content >file &&
+ git add file &&
+ git commit -m "added sub and file"
+'
+
+test_expect_success 'git mv cannot move a submodule in a file' '
+ test_must_fail git mv sub file
+'
+
+test_expect_success 'git mv moves a submodule with a .git directory and no .gitmodules' '
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ git rm .gitmodules &&
+ (
+ cd sub &&
+ rm -f .git &&
+ cp -a ../.git/modules/sub .git &&
+ GIT_WORK_TREE=. git config --unset core.worktree
+ ) &&
+ mkdir mod &&
+ git mv sub mod/sub &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
test_done
--
1.8.4.rc0.199.g7079aac
^ permalink raw reply related [relevance 10%]
* [PATCH v3 2/5] Teach mv to move submodules using a gitfile
2013-07-30 19:48 6% [PATCH v3 0/5] Teach mv to move submodules Jens Lehmann
2013-07-30 19:49 10% ` [PATCH v3 1/5] Teach mv to move submodules together with their work trees Jens Lehmann
@ 2013-07-30 19:50 9% ` Jens Lehmann
2013-07-30 19:51 8% ` [PATCH v3 4/5] Teach mv to update the path entry in .gitmodules for moved submodules Jens Lehmann
2 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-07-30 19:50 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano, Heiko Voigt, Nguyen Thai Ngoc Duy
When moving a submodule which uses a gitfile to point to the git directory
stored in .git/modules/<name> of the superproject two changes must be made
to make the submodule work: the .git file and the core.worktree setting
must be adjusted to point from work tree to git directory and back.
Achieve that by remembering which submodule uses a gitfile by storing the
result of read_gitfile() of each submodule. If that is not NULL the new
function connect_work_tree_and_git_dir() is called after renaming the
submodule's work tree which updates the two settings to the new values.
Extend the man page to inform the user about that feature (and while at it
change the description to not talk about a script anymore, as mv is a
builtin for quite some time now).
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Documentation/git-mv.txt | 8 +++++++-
builtin/mv.c | 19 +++++++++++++++----
submodule.c | 31 +++++++++++++++++++++++++++++++
submodule.h | 1 +
t/t7001-mv.sh | 19 +++++++++++++++++++
5 files changed, 73 insertions(+), 5 deletions(-)
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index e93fcb4..1f6fce0 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -13,7 +13,7 @@ SYNOPSIS
DESCRIPTION
-----------
-This script is used to move or rename a file, directory or symlink.
+Move or rename a file, directory or symlink.
git mv [-v] [-f] [-n] [-k] <source> <destination>
git mv [-v] [-f] [-n] [-k] <source> ... <destination directory>
@@ -44,6 +44,12 @@ OPTIONS
--verbose::
Report the names of files as they are moved.
+SUBMODULES
+----------
+Moving a submodule using a gitfile (which means they were cloned
+with a Git version 1.7.8 or newer) will update the gitfile and
+core.worktree setting to make the submodule work in the new location.
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/builtin/mv.c b/builtin/mv.c
index 1d3ef63..68b7060 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -9,6 +9,7 @@
#include "cache-tree.h"
#include "string-list.h"
#include "parse-options.h"
+#include "submodule.h"
static const char * const builtin_mv_usage[] = {
N_("git mv [options] <source>... <destination>"),
@@ -66,7 +67,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
OPT_BOOLEAN('k', NULL, &ignore_errors, N_("skip move/rename errors")),
OPT_END(),
};
- const char **source, **destination, **dest_path;
+ const char **source, **destination, **dest_path, **submodule_gitfile;
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
@@ -85,6 +86,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source = internal_copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
dest_path = internal_copy_pathspec(prefix, argv + argc, 1, 0);
+ submodule_gitfile = xcalloc(argc, sizeof(char *));
if (dest_path[0][0] == '\0')
/* special case: "." was normalized to "" */
@@ -120,8 +122,14 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
else if (src_is_dir) {
int first = cache_name_pos(src, length);
if (first >= 0) {
+ struct strbuf submodule_dotgit = STRBUF_INIT;
if (!S_ISGITLINK(active_cache[first]->ce_mode))
die (_("Huh? Directory %s is in index and no submodule?"), src);
+ strbuf_addf(&submodule_dotgit, "%s/.git", src);
+ submodule_gitfile[i] = read_gitfile(submodule_dotgit.buf);
+ if (submodule_gitfile[i])
+ submodule_gitfile[i] = xstrdup(submodule_gitfile[i]);
+ strbuf_release(&submodule_dotgit);
} else {
const char *src_w_slash = add_slash(src);
int last, len_w_slash = length + 1;
@@ -216,9 +224,12 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
int pos;
if (show_only || verbose)
printf(_("Renaming %s to %s\n"), src, dst);
- if (!show_only && mode != INDEX &&
- rename(src, dst) < 0 && !ignore_errors)
- die_errno (_("renaming '%s' failed"), src);
+ if (!show_only && mode != INDEX) {
+ if (rename(src, dst) < 0 && !ignore_errors)
+ die_errno (_("renaming '%s' failed"), src);
+ if (submodule_gitfile[i])
+ connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
+ }
if (mode == WORKING_DIRECTORY)
continue;
diff --git a/submodule.c b/submodule.c
index 3f0a3f9..d96d187 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1004,3 +1004,34 @@ int merge_submodule(unsigned char result[20], const char *path,
free(merges.objects);
return 0;
}
+
+/* Update gitfile and core.worktree setting to connect work tree and git dir */
+void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir)
+{
+ struct strbuf file_name = STRBUF_INIT;
+ struct strbuf rel_path = STRBUF_INIT;
+ const char *real_work_tree = xstrdup(real_path(work_tree));
+ FILE *fp;
+
+ /* Update gitfile */
+ strbuf_addf(&file_name, "%s/.git", work_tree);
+ fp = fopen(file_name.buf, "w");
+ if (!fp)
+ die(_("Could not create git link %s"), file_name.buf);
+ fprintf(fp, "gitdir: %s\n", relative_path(git_dir, real_work_tree,
+ &rel_path));
+ fclose(fp);
+
+ /* Update core.worktree setting */
+ strbuf_reset(&file_name);
+ strbuf_addf(&file_name, "%s/config", git_dir);
+ if (git_config_set_in_file(file_name.buf, "core.worktree",
+ relative_path(real_work_tree, git_dir,
+ &rel_path)))
+ die(_("Could not set core.worktree in %s"),
+ file_name.buf);
+
+ strbuf_release(&file_name);
+ strbuf_release(&rel_path);
+ free((void *)real_work_tree);
+}
diff --git a/submodule.h b/submodule.h
index c7ffc7c..29e9658 100644
--- a/submodule.h
+++ b/submodule.h
@@ -36,5 +36,6 @@ int merge_submodule(unsigned char result[20], const char *path, const unsigned c
int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name,
struct string_list *needs_pushing);
int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name);
+void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir);
#endif
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 15c18b6..b99177f 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -293,4 +293,23 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
git diff-files --quiet
'
+test_expect_success 'git mv moves a submodule with gitfile' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ (
+ cd mod &&
+ git mv ../sub/ .
+ ) &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
test_done
--
1.8.4.rc0.199.g7079aac
^ permalink raw reply related [relevance 9%]
* [PATCH v3 4/5] Teach mv to update the path entry in .gitmodules for moved submodules
2013-07-30 19:48 6% [PATCH v3 0/5] Teach mv to move submodules Jens Lehmann
2013-07-30 19:49 10% ` [PATCH v3 1/5] Teach mv to move submodules together with their work trees Jens Lehmann
2013-07-30 19:50 9% ` [PATCH v3 2/5] Teach mv to move submodules using a gitfile Jens Lehmann
@ 2013-07-30 19:51 8% ` Jens Lehmann
2013-08-06 19:15 8% ` [PATCH v4 " Jens Lehmann
2 siblings, 1 reply; 200+ results
From: Jens Lehmann @ 2013-07-30 19:51 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano, Heiko Voigt, Nguyen Thai Ngoc Duy
Currently using "git mv" on a submodule moves the submodule's work tree in
that of the superproject. But the submodule's path setting in .gitmodules
is left untouched, which is now inconsistent with the work tree and makes
git commands that rely on the proper path -> name mapping (like status and
diff) behave strangely.
Let "git mv" help here by not only moving the submodule's work tree but
also updating the "submodule.<submodule name>.path" setting from the
.gitmodules file and stage both. This doesn't happen when no .gitmodules
file is found and only issues a warning when it doesn't have a section for
this submodule. This is because the user might just use plain gitlinks
without the .gitmodules file or has already updated the path setting by
hand before issuing the "git mv" command (in which case the warning
reminds him that mv would have done that for him). Only when .gitmodules
is found and contains merge conflicts the mv command will fail and tell
the user to resolve the conflict before trying again.
Also extend the man page to inform the user about this new feature.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Documentation/git-mv.txt | 2 ++
builtin/mv.c | 10 ++++++-
submodule.c | 33 +++++++++++++++++++++
submodule.h | 1 +
t/t7001-mv.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 120 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index 1f6fce0..b1f7988 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -49,6 +49,8 @@ SUBMODULES
Moving a submodule using a gitfile (which means they were cloned
with a Git version 1.7.8 or newer) will update the gitfile and
core.worktree setting to make the submodule work in the new location.
+It also will attempt to update the submodule.<name>.path setting in
+the linkgit:gitmodules[5] file and stage that file (unless -n is used).
GIT
---
diff --git a/builtin/mv.c b/builtin/mv.c
index 68b7060..7dd6bb4 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -58,7 +58,7 @@ static struct lock_file lock_file;
int cmd_mv(int argc, const char **argv, const char *prefix)
{
- int i, newfd;
+ int i, newfd, gitmodules_modified = 0;
int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
struct option builtin_mv_options[] = {
OPT__VERBOSE(&verbose, N_("be verbose")),
@@ -72,6 +72,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
struct stat st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
+ gitmodules_config();
git_config(git_default_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_mv_options,
@@ -125,6 +126,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
struct strbuf submodule_dotgit = STRBUF_INIT;
if (!S_ISGITLINK(active_cache[first]->ce_mode))
die (_("Huh? Directory %s is in index and no submodule?"), src);
+ if (!is_staging_gitmodules_ok())
+ die (_("Please, stage your changes to .gitmodules or stash them to proceed"));
strbuf_addf(&submodule_dotgit, "%s/.git", src);
submodule_gitfile[i] = read_gitfile(submodule_dotgit.buf);
if (submodule_gitfile[i])
@@ -229,6 +232,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
die_errno (_("renaming '%s' failed"), src);
if (submodule_gitfile[i])
connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
+ if (!update_path_in_gitmodules(src, dst))
+ gitmodules_modified = 1;
}
if (mode == WORKING_DIRECTORY)
@@ -240,6 +245,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
rename_cache_entry_at(pos, dst);
}
+ if (gitmodules_modified)
+ stage_updated_gitmodules();
+
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
diff --git a/submodule.c b/submodule.c
index 584f7de..b210685 100644
--- a/submodule.c
+++ b/submodule.c
@@ -47,6 +47,39 @@ int is_staging_gitmodules_ok()
return !gitmodules_is_modified;
}
+/*
+ * Try to update the "path" entry in the "submodule.<name>" section of the
+ * .gitmodules file. Return 0 only if a .gitmodules file was found, a section
+ * with the correct path=<oldpath> setting was found and we could update it.
+ */
+int update_path_in_gitmodules(const char *oldpath, const char *newpath)
+{
+ struct strbuf entry = STRBUF_INIT;
+ struct string_list_item *path_option;
+
+ if (!file_exists(".gitmodules")) /* Do nothing without .gitmodules */
+ return -1;
+
+ if (gitmodules_is_unmerged)
+ die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
+
+ path_option = unsorted_string_list_lookup(&config_name_for_path, oldpath);
+ if (!path_option) {
+ warning(_("Could not find section in .gitmodules where path=%s"), oldpath);
+ return -1;
+ }
+ strbuf_addstr(&entry, "submodule.");
+ strbuf_addstr(&entry, path_option->util);
+ strbuf_addstr(&entry, ".path");
+ if (git_config_set_in_file(".gitmodules", entry.buf, newpath) < 0) {
+ /* Maybe the user already did that, don't error out here */
+ warning(_("Could not update .gitmodules entry %s"), entry.buf);
+ return -1;
+ }
+ strbuf_release(&entry);
+ return 0;
+}
+
void stage_updated_gitmodules(void)
{
struct strbuf buf = STRBUF_INIT;
diff --git a/submodule.h b/submodule.h
index 244d5f5..570d4d0 100644
--- a/submodule.h
+++ b/submodule.h
@@ -12,6 +12,7 @@ enum {
};
int is_staging_gitmodules_ok();
+int update_path_in_gitmodules(const char *oldpath, const char *newpath);
void stage_updated_gitmodules(void);
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
const char *path);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b99177f..d432f42 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -308,8 +308,83 @@ test_expect_success 'git mv moves a submodule with gitfile' '
cd mod/sub &&
git status
) &&
+ echo mod/sub >expected &&
+ git config -f .gitmodules submodule.sub.path >actual &&
+ test_cmp expected actual &&
git update-index --refresh &&
git diff-files --quiet
'
+test_expect_success 'mv does not complain when no .gitmodules file is found' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git rm .gitmodules &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ git mv sub mod/sub 2>actual.err &&
+ ! test -s actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv will error out on a modified .gitmodules file unless staged' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git config -f .gitmodules foo.bar true &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ test_must_fail git mv sub mod/sub 2>actual.err &&
+ test -s actual.err &&
+ test -e sub &&
+ git diff-files --quiet -- sub &&
+ git add .gitmodules &&
+ git mv sub mod/sub 2>actual.err &&
+ ! test -s actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv issues a warning when section is not found in .gitmodules' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git config -f .gitmodules --remove-section submodule.sub &&
+ git add .gitmodules &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
+ git mv sub mod/sub 2>actual.err &&
+ test_i18ncmp expect.err actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git mv -n sub mod/sub 2>actual.err &&
+ test -f sub/.git &&
+ git diff-index --exit-code HEAD &&
+ git update-index --refresh &&
+ git diff-files --quiet -- sub .gitmodules
+'
+
test_done
--
1.8.4.rc0.199.g7079aac
^ permalink raw reply related [relevance 8%]
* Re: [PATCH v4 4/5] Teach mv to update the path entry in .gitmodules for moved submodules
2013-07-30 19:51 8% ` [PATCH v3 4/5] Teach mv to update the path entry in .gitmodules for moved submodules Jens Lehmann
@ 2013-08-06 19:15 8% ` Jens Lehmann
0 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-08-06 19:15 UTC (permalink / raw)
To: Git Mailing List
Cc: Junio C Hamano, Heiko Voigt, Nguyen Thai Ngoc Duy,
Fredrik Gustafsson
Currently using "git mv" on a submodule moves the submodule's work tree in
that of the superproject. But the submodule's path setting in .gitmodules
is left untouched, which is now inconsistent with the work tree and makes
git commands that rely on the proper path -> name mapping (like status and
diff) behave strangely.
Let "git mv" help here by not only moving the submodule's work tree but
also updating the "submodule.<submodule name>.path" setting from the
.gitmodules file and stage both. This doesn't happen when no .gitmodules
file is found and only issues a warning when it doesn't have a section for
this submodule. This is because the user might just use plain gitlinks
without the .gitmodules file or has already updated the path setting by
hand before issuing the "git mv" command (in which case the warning
reminds him that mv would have done that for him). Only when .gitmodules
is found and contains merge conflicts the mv command will fail and tell
the user to resolve the conflict before trying again.
Also extend the man page to inform the user about this new feature.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
This version fixes the missing strbuf_release() noticed by Frederik.
Documentation/git-mv.txt | 2 ++
builtin/mv.c | 10 ++++++-
submodule.c | 34 ++++++++++++++++++++++
submodule.h | 1 +
t/t7001-mv.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 121 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index 1f6fce0..b1f7988 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -49,6 +49,8 @@ SUBMODULES
Moving a submodule using a gitfile (which means they were cloned
with a Git version 1.7.8 or newer) will update the gitfile and
core.worktree setting to make the submodule work in the new location.
+It also will attempt to update the submodule.<name>.path setting in
+the linkgit:gitmodules[5] file and stage that file (unless -n is used).
GIT
---
diff --git a/builtin/mv.c b/builtin/mv.c
index 68b7060..7dd6bb4 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -58,7 +58,7 @@ static struct lock_file lock_file;
int cmd_mv(int argc, const char **argv, const char *prefix)
{
- int i, newfd;
+ int i, newfd, gitmodules_modified = 0;
int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
struct option builtin_mv_options[] = {
OPT__VERBOSE(&verbose, N_("be verbose")),
@@ -72,6 +72,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
struct stat st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
+ gitmodules_config();
git_config(git_default_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_mv_options,
@@ -125,6 +126,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
struct strbuf submodule_dotgit = STRBUF_INIT;
if (!S_ISGITLINK(active_cache[first]->ce_mode))
die (_("Huh? Directory %s is in index and no submodule?"), src);
+ if (!is_staging_gitmodules_ok())
+ die (_("Please, stage your changes to .gitmodules or stash them to proceed"));
strbuf_addf(&submodule_dotgit, "%s/.git", src);
submodule_gitfile[i] = read_gitfile(submodule_dotgit.buf);
if (submodule_gitfile[i])
@@ -229,6 +232,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
die_errno (_("renaming '%s' failed"), src);
if (submodule_gitfile[i])
connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
+ if (!update_path_in_gitmodules(src, dst))
+ gitmodules_modified = 1;
}
if (mode == WORKING_DIRECTORY)
@@ -240,6 +245,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
rename_cache_entry_at(pos, dst);
}
+ if (gitmodules_modified)
+ stage_updated_gitmodules();
+
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
diff --git a/submodule.c b/submodule.c
index 5874d08..1c2714f 100644
--- a/submodule.c
+++ b/submodule.c
@@ -47,6 +47,40 @@ int is_staging_gitmodules_ok(void)
return !gitmodules_is_modified;
}
+/*
+ * Try to update the "path" entry in the "submodule.<name>" section of the
+ * .gitmodules file. Return 0 only if a .gitmodules file was found, a section
+ * with the correct path=<oldpath> setting was found and we could update it.
+ */
+int update_path_in_gitmodules(const char *oldpath, const char *newpath)
+{
+ struct strbuf entry = STRBUF_INIT;
+ struct string_list_item *path_option;
+
+ if (!file_exists(".gitmodules")) /* Do nothing without .gitmodules */
+ return -1;
+
+ if (gitmodules_is_unmerged)
+ die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
+
+ path_option = unsorted_string_list_lookup(&config_name_for_path, oldpath);
+ if (!path_option) {
+ warning(_("Could not find section in .gitmodules where path=%s"), oldpath);
+ return -1;
+ }
+ strbuf_addstr(&entry, "submodule.");
+ strbuf_addstr(&entry, path_option->util);
+ strbuf_addstr(&entry, ".path");
+ if (git_config_set_in_file(".gitmodules", entry.buf, newpath) < 0) {
+ /* Maybe the user already did that, don't error out here */
+ warning(_("Could not update .gitmodules entry %s"), entry.buf);
+ strbuf_release(&entry);
+ return -1;
+ }
+ strbuf_release(&entry);
+ return 0;
+}
+
void stage_updated_gitmodules(void)
{
struct strbuf buf = STRBUF_INIT;
diff --git a/submodule.h b/submodule.h
index 5501354..e339891 100644
--- a/submodule.h
+++ b/submodule.h
@@ -12,6 +12,7 @@ enum {
};
int is_staging_gitmodules_ok(void);
+int update_path_in_gitmodules(const char *oldpath, const char *newpath);
void stage_updated_gitmodules(void);
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
const char *path);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b99177f..d432f42 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -308,8 +308,83 @@ test_expect_success 'git mv moves a submodule with gitfile' '
cd mod/sub &&
git status
) &&
+ echo mod/sub >expected &&
+ git config -f .gitmodules submodule.sub.path >actual &&
+ test_cmp expected actual &&
git update-index --refresh &&
git diff-files --quiet
'
+test_expect_success 'mv does not complain when no .gitmodules file is found' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git rm .gitmodules &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ git mv sub mod/sub 2>actual.err &&
+ ! test -s actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv will error out on a modified .gitmodules file unless staged' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git config -f .gitmodules foo.bar true &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ test_must_fail git mv sub mod/sub 2>actual.err &&
+ test -s actual.err &&
+ test -e sub &&
+ git diff-files --quiet -- sub &&
+ git add .gitmodules &&
+ git mv sub mod/sub 2>actual.err &&
+ ! test -s actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv issues a warning when section is not found in .gitmodules' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git config -f .gitmodules --remove-section submodule.sub &&
+ git add .gitmodules &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
+ git mv sub mod/sub 2>actual.err &&
+ test_i18ncmp expect.err actual.err &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
+test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
+ rm -rf mod/sub &&
+ git reset --hard &&
+ git submodule update &&
+ git mv -n sub mod/sub 2>actual.err &&
+ test -f sub/.git &&
+ git diff-index --exit-code HEAD &&
+ git update-index --refresh &&
+ git diff-files --quiet -- sub .gitmodules
+'
+
test_done
--
1.8.4.rc0.199.g3f237fc
^ permalink raw reply related [relevance 8%]
* [PATCH] mv: Fix spurious warning when moving a file in presence of submodules
@ 2013-10-13 11:52 11% ` Jens Lehmann
0 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-10-13 11:52 UTC (permalink / raw)
To: Matthieu Moy, git, Jonathan Nieder, Junio C Hamano
In commit 0656781fa "git mv" learned to update the submodule path in the
.gitmodules file when moving a submodule in the work tree. But since that
commit update_path_in_gitmodules() gets called no matter if we moved a
submodule or a regular file, which is wrong and leads to a bogus warning
when moving a regular file in a repo containing a .gitmodules file:
warning: Could not find section in .gitmodules where path=<filename>
Fix that by only calling update_path_in_gitmodules() when moving a
submodule. To achieve that, we introduce the special SUBMODULE_WITH_GITDIR
define to distinguish the cases where we also have to connect work tree
and git directory from those where we only need to update the .gitmodules
setting.
A test for submodules using a .git directory together with a .gitmodules
file has been added to t7001. Even though newer git versions will always
use a gitfile when cloning submodules, repositories cloned with older git
versions will still use this layout.
Reported-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Am 11.10.2013 19:53, schrieb Jens Lehmann:
> Am 11.10.2013 16:29, schrieb Matthieu Moy:
>> I'm getting this warning:
>>
>> warning: Could not find section in .gitmodules where path=XXX
>>
>> whenever I use "git mv" to move a file in a repository containing a
>> submodule. The file is outside the submodule and is completely
>> unrelated, so I do not understand the intent of the warning.
>>
>> My understanding (without looking at the code in detail) is that Git
>> tries to be clever about submodule renames, hence checks whether the
>> source file is a submodule. But then if the lookup fails, it should just
>> silently move on to "normal file move" mode I guess...
>
> Right. Thanks for reporting, I can reproduce that here and am currently
> looking into that.
And this is the fix for it, which I believe is stuff for maint.
builtin/mv.c | 13 +++++++++----
t/t7001-mv.sh | 26 ++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index aec79d1..2e0e61b 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -55,6 +55,7 @@ static const char *add_slash(const char *path)
}
static struct lock_file lock_file;
+#define SUBMODULE_WITH_GITDIR ((const char *)1)
int cmd_mv(int argc, const char **argv, const char *prefix)
{
@@ -132,6 +133,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
submodule_gitfile[i] = read_gitfile(submodule_dotgit.buf);
if (submodule_gitfile[i])
submodule_gitfile[i] = xstrdup(submodule_gitfile[i]);
+ else
+ submodule_gitfile[i] = SUBMODULE_WITH_GITDIR;
strbuf_release(&submodule_dotgit);
} else {
const char *src_w_slash = add_slash(src);
@@ -230,10 +233,12 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
if (!show_only && mode != INDEX) {
if (rename(src, dst) < 0 && !ignore_errors)
die_errno (_("renaming '%s' failed"), src);
- if (submodule_gitfile[i])
- connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
- if (!update_path_in_gitmodules(src, dst))
- gitmodules_modified = 1;
+ if (submodule_gitfile[i]) {
+ if (submodule_gitfile[i] != SUBMODULE_WITH_GITDIR)
+ connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
+ if (!update_path_in_gitmodules(src, dst))
+ gitmodules_modified = 1;
+ }
}
if (mode == WORKING_DIRECTORY)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index d432f42..b90e985 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -293,6 +293,32 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
git diff-files --quiet
'
+test_expect_success 'git mv moves a submodule with a .git directory and .gitmodules' '
+ rm -rf mod &&
+ git reset --hard &&
+ git submodule update &&
+ entry="$(git ls-files --stage sub | cut -f 1)" &&
+ (
+ cd sub &&
+ rm -f .git &&
+ cp -a ../.git/modules/sub .git &&
+ GIT_WORK_TREE=. git config --unset core.worktree
+ ) &&
+ mkdir mod &&
+ git mv sub mod/sub &&
+ ! test -e sub &&
+ [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ (
+ cd mod/sub &&
+ git status
+ ) &&
+ echo mod/sub >expected &&
+ git config -f .gitmodules submodule.sub.path >actual &&
+ test_cmp expected actual &&
+ git update-index --refresh &&
+ git diff-files --quiet
+'
+
test_expect_success 'git mv moves a submodule with gitfile' '
rm -rf mod/sub &&
git reset --hard &&
--
1.8.4.474.g128a96c.dirty
^ permalink raw reply related [relevance 11%]
* Re: What's cooking in git.git (Oct 2013, #03; Wed, 16)
@ 2013-10-17 21:07 5% ` Junio C Hamano
2013-10-18 0:42 0% ` Karsten Blees
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2013-10-17 21:07 UTC (permalink / raw)
To: Karsten Blees; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> Karsten Blees <karsten.blees@gmail.com> writes:
>
>> Am 16.10.2013 23:43, schrieb Junio C Hamano:
>>> * kb/fast-hashmap (2013-09-25) 6 commits
>>> - fixup! diffcore-rename.c: simplify finding exact renames
>>> - diffcore-rename.c: use new hash map implementation
>>> - diffcore-rename.c: simplify finding exact renames
>>> - diffcore-rename.c: move code around to prepare for the next patch
>>> - buitin/describe.c: use new hash map implementation
>>> - add a hashtable implementation that supports O(1) removal
>>>
>>
>> I posted a much more complete v3 [1], but somehow missed Jonathan's fixup! commit.
>
> Thanks; I'll replace the above with v3 and squash the fix-up in.
Interestingly, v3 applied on 'maint' and then merged to 'master'
seems to break t3600 and t7001 with a coredump.
It would conflict with es/name-hash-no-trailing-slash-in-dirs that
has been cooking in 'next', too; the resolution might be trivial but
I didn't look too deeply into it.
^ permalink raw reply [relevance 5%]
* Re: What's cooking in git.git (Oct 2013, #03; Wed, 16)
2013-10-17 21:07 5% ` Junio C Hamano
@ 2013-10-18 0:42 0% ` Karsten Blees
2013-10-18 19:37 0% ` Jens Lehmann
0 siblings, 1 reply; 200+ results
From: Karsten Blees @ 2013-10-18 0:42 UTC (permalink / raw)
To: Junio C Hamano, Jens Lehmann; +Cc: git
Am 17.10.2013 23:07, schrieb Junio C Hamano:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Karsten Blees <karsten.blees@gmail.com> writes:
>>
>>> Am 16.10.2013 23:43, schrieb Junio C Hamano:
>>>> * kb/fast-hashmap (2013-09-25) 6 commits
>>>> - fixup! diffcore-rename.c: simplify finding exact renames
>>>> - diffcore-rename.c: use new hash map implementation
>>>> - diffcore-rename.c: simplify finding exact renames
>>>> - diffcore-rename.c: move code around to prepare for the next patch
>>>> - buitin/describe.c: use new hash map implementation
>>>> - add a hashtable implementation that supports O(1) removal
>>>>
>>>
>>> I posted a much more complete v3 [1], but somehow missed Jonathan's fixup! commit.
>>
>> Thanks; I'll replace the above with v3 and squash the fix-up in.
>
> Interestingly, v3 applied on 'maint' and then merged to 'master'
> seems to break t3600 and t7001 with a coredump.
>
> It would conflict with es/name-hash-no-trailing-slash-in-dirs that
> has been cooking in 'next', too; the resolution might be trivial but
> I didn't look too deeply into it.
>
I've pushed a rebased version to https://github.com/kblees/git/commits/kb/hashmap-v3-next
(no changes yet except for Jonathan's fixup in #04 and merge resolution).
The coredumps are caused by my patch #10, which free()s cache_entries when they are removed, in combination with submodule.c::stage_updated_gitmodules (5fee9952 "submodule.c: add .gitmodules staging helper functions"), which removes a cache_entry, then modifies and re-adds the (now) free()d memory.
Can't we just use add_file_to_cache here (which replaces cache_entries by creating a copy)?
diff --git a/submodule.c b/submodule.c
index 1905d75..e388487 100644
--- a/submodule.c
+++ b/submodule.c
@@ -116,30 +116,7 @@ int remove_path_from_gitmodules(const char *path)
void stage_updated_gitmodules(void)
{
- struct strbuf buf = STRBUF_INIT;
- struct stat st;
- int pos;
- struct cache_entry *ce;
- int namelen = strlen(".gitmodules");
-
- pos = cache_name_pos(".gitmodules", namelen);
- if (pos < 0) {
- warning(_("could not find .gitmodules in index"));
- return;
- }
- ce = active_cache[pos];
- ce->ce_flags = namelen;
- if (strbuf_read_file(&buf, ".gitmodules", 0) < 0)
- die(_("reading updated .gitmodules failed"));
- if (lstat(".gitmodules", &st) < 0)
- die_errno(_("unable to stat updated .gitmodules"));
- fill_stat_cache_info(ce, &st);
- ce->ce_mode = ce_mode_from_stat(ce, st.st_mode);
- if (remove_cache_entry_at(pos) < 0)
- die(_("unable to remove .gitmodules from index"));
- if (write_sha1_file(buf.buf, buf.len, blob_type, ce->sha1))
- die(_("adding updated .gitmodules failed"));
- if (add_cache_entry(ce, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE))
+ if (add_file_to_cache(".gitmodules", 0))
die(_("staging updated .gitmodules failed"));
}
^ permalink raw reply related [relevance 0%]
* Re: What's cooking in git.git (Oct 2013, #03; Wed, 16)
2013-10-18 0:42 0% ` Karsten Blees
@ 2013-10-18 19:37 0% ` Jens Lehmann
0 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2013-10-18 19:37 UTC (permalink / raw)
To: Karsten Blees, Junio C Hamano; +Cc: git
Am 18.10.2013 02:42, schrieb Karsten Blees:
> Am 17.10.2013 23:07, schrieb Junio C Hamano:
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>> Karsten Blees <karsten.blees@gmail.com> writes:
>>>
>>>> Am 16.10.2013 23:43, schrieb Junio C Hamano:
>>>>> * kb/fast-hashmap (2013-09-25) 6 commits
>>>>> - fixup! diffcore-rename.c: simplify finding exact renames
>>>>> - diffcore-rename.c: use new hash map implementation
>>>>> - diffcore-rename.c: simplify finding exact renames
>>>>> - diffcore-rename.c: move code around to prepare for the next patch
>>>>> - buitin/describe.c: use new hash map implementation
>>>>> - add a hashtable implementation that supports O(1) removal
>>>>>
>>>>
>>>> I posted a much more complete v3 [1], but somehow missed Jonathan's fixup! commit.
>>>
>>> Thanks; I'll replace the above with v3 and squash the fix-up in.
>>
>> Interestingly, v3 applied on 'maint' and then merged to 'master'
>> seems to break t3600 and t7001 with a coredump.
>>
>> It would conflict with es/name-hash-no-trailing-slash-in-dirs that
>> has been cooking in 'next', too; the resolution might be trivial but
>> I didn't look too deeply into it.
>>
>
> I've pushed a rebased version to https://github.com/kblees/git/commits/kb/hashmap-v3-next
> (no changes yet except for Jonathan's fixup in #04 and merge resolution).
>
> The coredumps are caused by my patch #10, which free()s cache_entries when they are removed, in combination with submodule.c::stage_updated_gitmodules (5fee9952 "submodule.c: add .gitmodules staging helper functions"), which removes a cache_entry, then modifies and re-adds the (now) free()d memory.
>
> Can't we just use add_file_to_cache here (which replaces cache_entries by creating a copy)?
No objections from my side. Looks like we could also copy the
cache entry just before remove_cache_entry_at() and use that
copy afterwards, but your solution is so much shorter that I
would really like to use it (unless someone more cache-savvy
than me has any objections).
And by the way: this is the last use of remove_cache_entry_at(),
would it make sense to remove that define while at it? Only the
remove_index_entry_at() function it is defined to is currently
used.
> diff --git a/submodule.c b/submodule.c
> index 1905d75..e388487 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -116,30 +116,7 @@ int remove_path_from_gitmodules(const char *path)
>
> void stage_updated_gitmodules(void)
> {
> - struct strbuf buf = STRBUF_INIT;
> - struct stat st;
> - int pos;
> - struct cache_entry *ce;
> - int namelen = strlen(".gitmodules");
> -
> - pos = cache_name_pos(".gitmodules", namelen);
> - if (pos < 0) {
> - warning(_("could not find .gitmodules in index"));
> - return;
> - }
> - ce = active_cache[pos];
> - ce->ce_flags = namelen;
> - if (strbuf_read_file(&buf, ".gitmodules", 0) < 0)
> - die(_("reading updated .gitmodules failed"));
> - if (lstat(".gitmodules", &st) < 0)
> - die_errno(_("unable to stat updated .gitmodules"));
> - fill_stat_cache_info(ce, &st);
> - ce->ce_mode = ce_mode_from_stat(ce, st.st_mode);
> - if (remove_cache_entry_at(pos) < 0)
> - die(_("unable to remove .gitmodules from index"));
> - if (write_sha1_file(buf.buf, buf.len, blob_type, ce->sha1))
> - die(_("adding updated .gitmodules failed"));
> - if (add_cache_entry(ce, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE))
> + if (add_file_to_cache(".gitmodules", 0))
> die(_("staging updated .gitmodules failed"));
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [relevance 0%]
* Re: [BUG] git mv file directory/ creates the file directory
@ 2013-12-02 17:07 11% ` Matthieu Moy
0 siblings, 0 replies; 200+ results
From: Matthieu Moy @ 2013-12-02 17:07 UTC (permalink / raw)
To: Duy Nguyen; +Cc: git
Duy Nguyen <pclouds@gmail.com> writes:
> This may be a start. Does not seem to break anything..
I did not thoroughly review/test, but it does fix my case. Below is the
same patch with one test case. No time to do more right now.
Thanks,
>From 99985341ed1312cf6a7b63e14be7da0d51c701b4 Mon Sep 17 00:00:00 2001
From: Matthieu Moy <Matthieu.Moy@imag.fr>
Date: Mon, 2 Dec 2013 18:03:20 +0100
Subject: [PATCH] WIP: error out on git mv file no-such-dir/
---
builtin/mv.c | 18 +++++++++++-------
t/t7001-mv.sh | 9 +++++++++
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 2e0e61b..0fcccd5 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -16,9 +16,12 @@ static const char * const builtin_mv_usage[] = {
NULL
};
+#define DUP_BASENAME 1
+#define KEEP_TRAILING_SLASH 2
+
static const char **internal_copy_pathspec(const char *prefix,
const char **pathspec,
- int count, int base_name)
+ int count, unsigned flags)
{
int i;
const char **result = xmalloc((count + 1) * sizeof(const char *));
@@ -27,11 +30,12 @@ static const char **internal_copy_pathspec(const char *prefix,
for (i = 0; i < count; i++) {
int length = strlen(result[i]);
int to_copy = length;
- while (to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
+ while (!(flags & KEEP_TRAILING_SLASH) &&
+ to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
to_copy--;
- if (to_copy != length || base_name) {
+ if (to_copy != length || flags & DUP_BASENAME) {
char *it = xmemdupz(result[i], to_copy);
- if (base_name) {
+ if (flags & DUP_BASENAME) {
result[i] = xstrdup(basename(it));
free(it);
} else
@@ -87,16 +91,16 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source = internal_copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
- dest_path = internal_copy_pathspec(prefix, argv + argc, 1, 0);
+ dest_path = internal_copy_pathspec(prefix, argv + argc, 1, KEEP_TRAILING_SLASH);
submodule_gitfile = xcalloc(argc, sizeof(char *));
if (dest_path[0][0] == '\0')
/* special case: "." was normalized to "" */
- destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
+ destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
else if (!lstat(dest_path[0], &st) &&
S_ISDIR(st.st_mode)) {
dest_path[0] = add_slash(dest_path[0]);
- destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
+ destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
} else {
if (argc != 1)
die("destination '%s' is not a directory", dest_path[0]);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b90e985..7e74bf3 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -72,6 +72,15 @@ rm -f idontexist untracked1 untracked2 \
.git/index.lock
test_expect_success \
+ 'moving to target with trailing slash' \
+ 'test_must_fail git mv path0/COPYING no-such-dir/ &&
+ git mv path0/ no-such-dir/'
+
+test_expect_success \
+ 'clean up' \
+ 'git reset --hard'
+
+test_expect_success \
'adding another file' \
'cp "$TEST_DIRECTORY"/../README path0/README &&
git add path0/README &&
--
1.8.5.rc3.4.g8bd3721
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply related [relevance 11%]
* [PATCH] mv: let 'git mv file no-such-dir/' error out
@ 2013-12-03 8:32 11% Matthieu Moy
2013-12-03 10:06 0% ` Duy Nguyen
0 siblings, 1 reply; 200+ results
From: Matthieu Moy @ 2013-12-03 8:32 UTC (permalink / raw)
To: git, gitster; +Cc: Duy Nguyen, Matthieu Moy
Git used to trim the trailing slash, and make the command equivalent to
'git mv file no-such-dir', which created the file no-such-dir (while the
trailing slash explicitly stated that it could only be a directory).
This patch skips the trailing slash removal for the destination path. The
path with its trailing slash is passed to rename(2), which errors out
with the appropriate message:
$ git mv file no-such-dir/
fatal: renaming 'file' failed: Not a directory
Original-patch-by: Duy Nguyen <pclouds@gmail.com>
Tests, tweaks and commit message by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
builtin/mv.c | 23 ++++++++++++++++-------
t/t7001-mv.sh | 10 ++++++++++
2 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 2e0e61b..08fbc03 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -16,9 +16,12 @@ static const char * const builtin_mv_usage[] = {
NULL
};
+#define DUP_BASENAME 1
+#define KEEP_TRAILING_SLASH 2
+
static const char **internal_copy_pathspec(const char *prefix,
const char **pathspec,
- int count, int base_name)
+ int count, unsigned flags)
{
int i;
const char **result = xmalloc((count + 1) * sizeof(const char *));
@@ -27,11 +30,12 @@ static const char **internal_copy_pathspec(const char *prefix,
for (i = 0; i < count; i++) {
int length = strlen(result[i]);
int to_copy = length;
- while (to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
+ while (!(flags & KEEP_TRAILING_SLASH) &&
+ to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
to_copy--;
- if (to_copy != length || base_name) {
+ if (to_copy != length || flags & DUP_BASENAME) {
char *it = xmemdupz(result[i], to_copy);
- if (base_name) {
+ if (flags & DUP_BASENAME) {
result[i] = xstrdup(basename(it));
free(it);
} else
@@ -87,16 +91,21 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source = internal_copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
- dest_path = internal_copy_pathspec(prefix, argv + argc, 1, 0);
+ /*
+ * Keep trailing slash, needed to let
+ * "git mv file no-such-dir/" error out.
+ */
+ dest_path = internal_copy_pathspec(prefix, argv + argc, 1,
+ KEEP_TRAILING_SLASH);
submodule_gitfile = xcalloc(argc, sizeof(char *));
if (dest_path[0][0] == '\0')
/* special case: "." was normalized to "" */
- destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
+ destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
else if (!lstat(dest_path[0], &st) &&
S_ISDIR(st.st_mode)) {
dest_path[0] = add_slash(dest_path[0]);
- destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
+ destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
} else {
if (argc != 1)
die("destination '%s' is not a directory", dest_path[0]);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b90e985..e5c8084 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -72,6 +72,16 @@ rm -f idontexist untracked1 untracked2 \
.git/index.lock
test_expect_success \
+ 'moving to target with trailing slash' \
+ 'test_must_fail git mv path0/COPYING no-such-dir/ &&
+ test_must_fail git mv path0/COPYING no-such-dir// &&
+ git mv path0/ no-such-dir/'
+
+test_expect_success \
+ 'clean up' \
+ 'git reset --hard'
+
+test_expect_success \
'adding another file' \
'cp "$TEST_DIRECTORY"/../README path0/README &&
git add path0/README &&
--
1.8.5.rc3.4.g8bd3721
^ permalink raw reply related [relevance 11%]
* Re: [PATCH] mv: let 'git mv file no-such-dir/' error out
2013-12-03 8:32 11% [PATCH] mv: let 'git mv file no-such-dir/' error out Matthieu Moy
@ 2013-12-03 10:06 0% ` Duy Nguyen
2013-12-04 8:44 12% ` Matthieu Moy
0 siblings, 1 reply; 200+ results
From: Duy Nguyen @ 2013-12-03 10:06 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Git Mailing List, Junio C Hamano
On Tue, Dec 3, 2013 at 3:32 PM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> Git used to trim the trailing slash, and make the command equivalent to
> 'git mv file no-such-dir', which created the file no-such-dir (while the
> trailing slash explicitly stated that it could only be a directory).
>
> This patch skips the trailing slash removal for the destination path. The
> path with its trailing slash is passed to rename(2), which errors out
> with the appropriate message:
>
> $ git mv file no-such-dir/
> fatal: renaming 'file' failed: Not a directory
There's something we probably should check. In d78b0f3 ([PATCH]
git-mv: add more path normalization - 2006-08-16), it mentions about
git mv something/ somewhere/
there's no test in that commit so I don't know the actual input and
expected outcome. If "somewhere" is a directory, it errors out with
this patch and works without it. If "somewhere" does not exist, it
seems to work like Linux "mv" with or without the patch.
> Original-patch-by: Duy Nguyen <pclouds@gmail.com>
> Tests, tweaks and commit message by: Matthieu Moy <Matthieu.Moy@imag.fr>
>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
> ---
> builtin/mv.c | 23 ++++++++++++++++-------
> t/t7001-mv.sh | 10 ++++++++++
> 2 files changed, 26 insertions(+), 7 deletions(-)
>
> diff --git a/builtin/mv.c b/builtin/mv.c
> index 2e0e61b..08fbc03 100644
> --- a/builtin/mv.c
> +++ b/builtin/mv.c
> @@ -16,9 +16,12 @@ static const char * const builtin_mv_usage[] = {
> NULL
> };
>
> +#define DUP_BASENAME 1
> +#define KEEP_TRAILING_SLASH 2
> +
> static const char **internal_copy_pathspec(const char *prefix,
> const char **pathspec,
> - int count, int base_name)
> + int count, unsigned flags)
> {
> int i;
> const char **result = xmalloc((count + 1) * sizeof(const char *));
> @@ -27,11 +30,12 @@ static const char **internal_copy_pathspec(const char *prefix,
> for (i = 0; i < count; i++) {
> int length = strlen(result[i]);
> int to_copy = length;
> - while (to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
> + while (!(flags & KEEP_TRAILING_SLASH) &&
> + to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
> to_copy--;
> - if (to_copy != length || base_name) {
> + if (to_copy != length || flags & DUP_BASENAME) {
> char *it = xmemdupz(result[i], to_copy);
> - if (base_name) {
> + if (flags & DUP_BASENAME) {
> result[i] = xstrdup(basename(it));
> free(it);
> } else
> @@ -87,16 +91,21 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
>
> source = internal_copy_pathspec(prefix, argv, argc, 0);
> modes = xcalloc(argc, sizeof(enum update_mode));
> - dest_path = internal_copy_pathspec(prefix, argv + argc, 1, 0);
> + /*
> + * Keep trailing slash, needed to let
> + * "git mv file no-such-dir/" error out.
> + */
> + dest_path = internal_copy_pathspec(prefix, argv + argc, 1,
> + KEEP_TRAILING_SLASH);
> submodule_gitfile = xcalloc(argc, sizeof(char *));
>
> if (dest_path[0][0] == '\0')
> /* special case: "." was normalized to "" */
> - destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
> + destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
> else if (!lstat(dest_path[0], &st) &&
> S_ISDIR(st.st_mode)) {
> dest_path[0] = add_slash(dest_path[0]);
> - destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
> + destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
> } else {
> if (argc != 1)
> die("destination '%s' is not a directory", dest_path[0]);
> diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
> index b90e985..e5c8084 100755
> --- a/t/t7001-mv.sh
> +++ b/t/t7001-mv.sh
> @@ -72,6 +72,16 @@ rm -f idontexist untracked1 untracked2 \
> .git/index.lock
>
> test_expect_success \
> + 'moving to target with trailing slash' \
> + 'test_must_fail git mv path0/COPYING no-such-dir/ &&
> + test_must_fail git mv path0/COPYING no-such-dir// &&
> + git mv path0/ no-such-dir/'
> +
> +test_expect_success \
> + 'clean up' \
> + 'git reset --hard'
> +
> +test_expect_success \
> 'adding another file' \
> 'cp "$TEST_DIRECTORY"/../README path0/README &&
> git add path0/README &&
> --
> 1.8.5.rc3.4.g8bd3721
>
--
Duy
^ permalink raw reply [relevance 0%]
* Re: [PATCH] mv: let 'git mv file no-such-dir/' error out
2013-12-03 10:06 0% ` Duy Nguyen
@ 2013-12-04 8:44 12% ` Matthieu Moy
0 siblings, 1 reply; 200+ results
From: Matthieu Moy @ 2013-12-04 8:44 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Git Mailing List, Junio C Hamano
Duy Nguyen <pclouds@gmail.com> writes:
> On Tue, Dec 3, 2013 at 3:32 PM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>> Git used to trim the trailing slash, and make the command equivalent to
>> 'git mv file no-such-dir', which created the file no-such-dir (while the
>> trailing slash explicitly stated that it could only be a directory).
>>
>> This patch skips the trailing slash removal for the destination path. The
>> path with its trailing slash is passed to rename(2), which errors out
>> with the appropriate message:
>>
>> $ git mv file no-such-dir/
>> fatal: renaming 'file' failed: Not a directory
>
> There's something we probably should check. In d78b0f3 ([PATCH]
> git-mv: add more path normalization - 2006-08-16), it mentions about
>
> git mv something/ somewhere/
>
> there's no test in that commit so I don't know the actual input and
> expected outcome.
To me, the expected outcome is "behave like Unix's mv" (which works with
or without the trailing slash if somewhere exists).
> If "somewhere" is a directory, it errors out with this patch and works
> without it.
I can't reproduce. I've added this to my patch (indeed, the area wasn't
well tested), and the tests pass.
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e5c8084..3bfdfed 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -70,12 +70,31 @@ test_expect_success \
rm -f idontexist untracked1 untracked2 \
path0/idontexist path0/untracked1 path0/untracked2 \
.git/index.lock
+rmdir path1
test_expect_success \
- 'moving to target with trailing slash' \
+ 'moving to absent target with trailing slash' \
'test_must_fail git mv path0/COPYING no-such-dir/ &&
test_must_fail git mv path0/COPYING no-such-dir// &&
- git mv path0/ no-such-dir/'
+ git mv path0/ no-such-dir/ &&
+ test_path_is_dir no-such-dir'
+
+test_expect_success \
+ 'clean up' \
+ 'git reset --hard'
+
+test_expect_success \
+ 'moving to existing untracked target with trailing slash' \
+ 'mkdir path1 &&
+ git mv path0/ path1/ &&
+ test_path_is_dir path1/path0/'
+
+test_expect_success \
+ 'moving to existing tracked target with trailing slash' \
+ 'mkdir path2 &&
+ >path2/file && git add path2/file &&
+ git mv path1/path0/ path2/ &&
+ test_path_is_dir path2/path0/'
test_expect_success \
'clean up' \
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply related [relevance 12%]
* [PATCH v2] mv: let 'git mv file no-such-dir/' error out
@ 2013-12-04 17:37 10% ` Matthieu Moy
2013-12-04 17:44 5% ` [PATCH] " Junio C Hamano
1 sibling, 0 replies; 200+ results
From: Matthieu Moy @ 2013-12-04 17:37 UTC (permalink / raw)
To: git, gitster; +Cc: Duy Nguyen, Matthieu Moy
Git used to trim the trailing slash, and make the command equivalent to
'git mv file no-such-dir', which created the file no-such-dir (while the
trailing slash explicitly stated that it could only be a directory).
This patch skips the trailing slash removal for the destination path. The
path with its trailing slash is passed to rename(2), which errors out
with the appropriate message:
$ git mv file no-such-dir/
fatal: renaming 'file' failed: Not a directory
Original-patch-by: Duy Nguyen <pclouds@gmail.com>
Tests, tweaks and commit message by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
So, this patch adds more tests, as suggested by Duy. They all pass
without modifying the code.
builtin/mv.c | 23 ++++++++++++++++-------
t/t7001-mv.sh | 29 +++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 7 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 2e0e61b..08fbc03 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -16,9 +16,12 @@ static const char * const builtin_mv_usage[] = {
NULL
};
+#define DUP_BASENAME 1
+#define KEEP_TRAILING_SLASH 2
+
static const char **internal_copy_pathspec(const char *prefix,
const char **pathspec,
- int count, int base_name)
+ int count, unsigned flags)
{
int i;
const char **result = xmalloc((count + 1) * sizeof(const char *));
@@ -27,11 +30,12 @@ static const char **internal_copy_pathspec(const char *prefix,
for (i = 0; i < count; i++) {
int length = strlen(result[i]);
int to_copy = length;
- while (to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
+ while (!(flags & KEEP_TRAILING_SLASH) &&
+ to_copy > 0 && is_dir_sep(result[i][to_copy - 1]))
to_copy--;
- if (to_copy != length || base_name) {
+ if (to_copy != length || flags & DUP_BASENAME) {
char *it = xmemdupz(result[i], to_copy);
- if (base_name) {
+ if (flags & DUP_BASENAME) {
result[i] = xstrdup(basename(it));
free(it);
} else
@@ -87,16 +91,21 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
source = internal_copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
- dest_path = internal_copy_pathspec(prefix, argv + argc, 1, 0);
+ /*
+ * Keep trailing slash, needed to let
+ * "git mv file no-such-dir/" error out.
+ */
+ dest_path = internal_copy_pathspec(prefix, argv + argc, 1,
+ KEEP_TRAILING_SLASH);
submodule_gitfile = xcalloc(argc, sizeof(char *));
if (dest_path[0][0] == '\0')
/* special case: "." was normalized to "" */
- destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
+ destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
else if (!lstat(dest_path[0], &st) &&
S_ISDIR(st.st_mode)) {
dest_path[0] = add_slash(dest_path[0]);
- destination = internal_copy_pathspec(dest_path[0], argv, argc, 1);
+ destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
} else {
if (argc != 1)
die("destination '%s' is not a directory", dest_path[0]);
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b90e985..2f82478 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -70,6 +70,35 @@ test_expect_success \
rm -f idontexist untracked1 untracked2 \
path0/idontexist path0/untracked1 path0/untracked2 \
.git/index.lock
+rmdir path1
+
+test_expect_success \
+ 'moving to absent target with trailing slash' \
+ 'test_must_fail git mv path0/COPYING no-such-dir/ &&
+ test_must_fail git mv path0/COPYING no-such-dir// &&
+ git mv path0/ no-such-dir/ &&
+ test_path_is_dir no-such-dir/'
+
+test_expect_success \
+ 'clean up' \
+ 'git reset --hard'
+
+test_expect_success \
+ 'moving to existing untracked target with trailing slash' \
+ 'mkdir path1 &&
+ git mv path0/ path1/ &&
+ test_path_is_dir path1/path0/'
+
+test_expect_success \
+ 'moving to existing tracked target with trailing slash' \
+ 'mkdir path2 &&
+ >path2/file && git add path2/file &&
+ git mv path1/path0/ path2/ &&
+ test_path_is_dir path2/path0/'
+
+test_expect_success \
+ 'clean up' \
+ 'git reset --hard'
test_expect_success \
'adding another file' \
--
1.8.5.rc3.4.g8bd3721
^ permalink raw reply related [relevance 10%]
* Re: [PATCH] mv: let 'git mv file no-such-dir/' error out
2013-12-04 17:37 10% ` [PATCH v2] " Matthieu Moy
@ 2013-12-04 17:44 5% ` Junio C Hamano
2013-12-04 17:48 0% ` Matthieu Moy
1 sibling, 1 reply; 200+ results
From: Junio C Hamano @ 2013-12-04 17:44 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Matthieu Moy, Git Mailing List
Duy Nguyen <pclouds@gmail.com> writes:
> On Wed, Dec 4, 2013 at 3:44 PM, Matthieu Moy
> <Matthieu.Moy@grenoble-inp.fr> wrote:
>> Duy Nguyen <pclouds@gmail.com> writes:
>>
>>> On Tue, Dec 3, 2013 at 3:32 PM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>>> There's something we probably should check. In d78b0f3 ([PATCH]
>>> git-mv: add more path normalization - 2006-08-16), it mentions about
>>>
>>> git mv something/ somewhere/
>>>
>>> there's no test in that commit so I don't know the actual input and
>>> expected outcome.
>>
>> To me, the expected outcome is "behave like Unix's mv" (which works with
>> or without the trailing slash if somewhere exists).
>>
>>> If "somewhere" is a directory, it errors out with this patch and works
>>> without it.
>>
>> I can't reproduce. I've added this to my patch (indeed, the area wasn't
>> well tested), and the tests pass.
>
> Now I can't either. Probably some mis-setups or some local bugs in my
> tree. Good that we have more tests.
OK, I was also scratching my head after seeing your response.
It seems that t7001 needs some face-lifting, by the way. Perhaps
after this patch solidifies.
^ permalink raw reply [relevance 5%]
* Re: [PATCH] mv: let 'git mv file no-such-dir/' error out
2013-12-04 17:44 5% ` [PATCH] " Junio C Hamano
@ 2013-12-04 17:48 0% ` Matthieu Moy
0 siblings, 0 replies; 200+ results
From: Matthieu Moy @ 2013-12-04 17:48 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Duy Nguyen, Git Mailing List
Junio C Hamano <gitster@pobox.com> writes:
> It seems that t7001 needs some face-lifting, by the way. Perhaps
> after this patch solidifies.
Yes. I followed the style of surrounding code, but it could be
reformatted to follow the current standard. I have no time for it now.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [relevance 0%]
* [PATCH] mv: better document side effects when moving a submodule
@ 2014-01-06 19:21 11% ` Jens Lehmann
2014-01-06 22:40 0% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Jens Lehmann @ 2014-01-06 19:21 UTC (permalink / raw)
To: George Papanikolaou; +Cc: git, Junio C Hamano
The "Submodules" section of the "git mv" documentation mentions what will
happen when a submodule with a gitfile gets moved with newer git. But it
doesn't talk about what happens when the user changes between commits
before and after the move, which does not update the work tree like using
the mv command did the first time.
Explain what happens and what the user has to do manually to fix that.
Also document this in a new test.
Reported-by: George Papanikolaou <g3orge.app@gmail.com>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Am 09.12.2013 18:49, schrieb Jens Lehmann:
> Am 09.12.2013 11:59, schrieb George Papanikolaou:
>> Also after mv you need to run 'submodule update' and I think this should be
>> documented somewhere.
>
> You're right, this should be mentioned in the mv man page. I'll
> prepare a patch for that.
Does this new paragraph make it clearer?
Documentation/git-mv.txt | 10 ++++++++++
t/t7001-mv.sh | 21 +++++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index b1f7988..c9e8568 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -52,6 +52,16 @@ core.worktree setting to make the submodule work in the new location.
It also will attempt to update the submodule.<name>.path setting in
the linkgit:gitmodules[5] file and stage that file (unless -n is used).
+Please note that each time a superproject update moves a populated
+submodule (e.g. when switching between commits before and after the
+move) a stale submodule checkout will remain in the old location
+and an empty directory will appear in the new location. To populate
+the submodule again in the new location the user will have to run
+"git submodule update" afterwards. Removing the old directory is
+only safe when it uses a gitfile, as otherwise the history of the
+submodule will be deleted too. Both steps will be obsolete when
+recursive submodule update has been implemented.
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 3bfdfed..e3c8c2c 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -442,4 +442,25 @@ test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
git diff-files --quiet -- sub .gitmodules
'
+test_expect_success 'checking out a commit before submodule moved needs manual updates' '
+ git mv sub sub2 &&
+ git commit -m "moved sub to sub2" &&
+ git checkout -q HEAD^ 2>actual &&
+ echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
+ test_i18ncmp expected actual &&
+ git status -s sub2 >actual &&
+ echo "?? sub2/" >expected &&
+ test_cmp expected actual &&
+ ! test -f sub/.git &&
+ test -f sub2/.git &&
+ git submodule update &&
+ test -f sub/.git &&
+ rm -rf sub2 &&
+ git diff-index --exit-code HEAD &&
+ git update-index --refresh &&
+ git diff-files --quiet -- sub .gitmodules &&
+ git status -s sub2 >actual &&
+ ! test -s actual
+'
+
test_done
--
1.8.5.2.230.g9325930
^ permalink raw reply related [relevance 11%]
* Re: [PATCH] mv: better document side effects when moving a submodule
2014-01-06 19:21 11% ` [PATCH] mv: better document side effects when moving a submodule Jens Lehmann
@ 2014-01-06 22:40 0% ` Junio C Hamano
2014-01-07 17:57 0% ` Jens Lehmann
0 siblings, 1 reply; 200+ results
From: Junio C Hamano @ 2014-01-06 22:40 UTC (permalink / raw)
To: Jens Lehmann; +Cc: George Papanikolaou, git
Jens Lehmann <Jens.Lehmann@web.de> writes:
> The "Submodules" section of the "git mv" documentation mentions what will
> happen when a submodule with a gitfile gets moved with newer git. But it
> doesn't talk about what happens when the user changes between commits
> before and after the move, which does not update the work tree like using
> the mv command did the first time.
>
> Explain what happens and what the user has to do manually to fix that.
> Also document this in a new test.
>
> Reported-by: George Papanikolaou <g3orge.app@gmail.com>
> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
> ---
>
> Am 09.12.2013 18:49, schrieb Jens Lehmann:
>> Am 09.12.2013 11:59, schrieb George Papanikolaou:
>>> Also after mv you need to run 'submodule update' and I think this should be
>>> documented somewhere.
>>
>> You're right, this should be mentioned in the mv man page. I'll
>> prepare a patch for that.
>
> Does this new paragraph make it clearer?
Don't we have bugs section that we can use to list the known
limitations like this?
> Documentation/git-mv.txt | 10 ++++++++++
> t/t7001-mv.sh | 21 +++++++++++++++++++++
It also may make sense to express the test as "this is what we would
like to see happen eventually" in the form of test_expect_failure;
it is not a big deal though.
> 2 files changed, 31 insertions(+)
>
> diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
> index b1f7988..c9e8568 100644
> --- a/Documentation/git-mv.txt
> +++ b/Documentation/git-mv.txt
> @@ -52,6 +52,16 @@ core.worktree setting to make the submodule work in the new location.
> It also will attempt to update the submodule.<name>.path setting in
> the linkgit:gitmodules[5] file and stage that file (unless -n is used).
>
> +Please note that each time a superproject update moves a populated
> +submodule (e.g. when switching between commits before and after the
> +move) a stale submodule checkout will remain in the old location
> +and an empty directory will appear in the new location. To populate
> +the submodule again in the new location the user will have to run
> +"git submodule update" afterwards. Removing the old directory is
> +only safe when it uses a gitfile, as otherwise the history of the
> +submodule will be deleted too. Both steps will be obsolete when
> +recursive submodule update has been implemented.
> +
> GIT
> ---
> Part of the linkgit:git[1] suite
> diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
> index 3bfdfed..e3c8c2c 100755
> --- a/t/t7001-mv.sh
> +++ b/t/t7001-mv.sh
> @@ -442,4 +442,25 @@ test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
> git diff-files --quiet -- sub .gitmodules
> '
>
> +test_expect_success 'checking out a commit before submodule moved needs manual updates' '
> + git mv sub sub2 &&
> + git commit -m "moved sub to sub2" &&
> + git checkout -q HEAD^ 2>actual &&
> + echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
> + test_i18ncmp expected actual &&
> + git status -s sub2 >actual &&
> + echo "?? sub2/" >expected &&
> + test_cmp expected actual &&
> + ! test -f sub/.git &&
> + test -f sub2/.git &&
> + git submodule update &&
> + test -f sub/.git &&
> + rm -rf sub2 &&
> + git diff-index --exit-code HEAD &&
> + git update-index --refresh &&
> + git diff-files --quiet -- sub .gitmodules &&
> + git status -s sub2 >actual &&
> + ! test -s actual
> +'
> +
> test_done
^ permalink raw reply [relevance 0%]
* Re: [PATCH] mv: better document side effects when moving a submodule
2014-01-06 22:40 0% ` Junio C Hamano
@ 2014-01-07 17:57 0% ` Jens Lehmann
2014-01-07 21:30 5% ` [PATCH v2 0/2] better document side effects when [re]moving " Jens Lehmann
0 siblings, 1 reply; 200+ results
From: Jens Lehmann @ 2014-01-07 17:57 UTC (permalink / raw)
To: Junio C Hamano; +Cc: George Papanikolaou, git
Am 06.01.2014 23:40, schrieb Junio C Hamano:
> Jens Lehmann <Jens.Lehmann@web.de> writes:
>> Does this new paragraph make it clearer?
>
> Don't we have bugs section that we can use to list the known
> limitations like this?
Right, will change accordingly in v2.
>> Documentation/git-mv.txt | 10 ++++++++++
>> t/t7001-mv.sh | 21 +++++++++++++++++++++
>
> It also may make sense to express the test as "this is what we would
> like to see happen eventually" in the form of test_expect_failure;
> it is not a big deal though.
We'll get the "what we would like to see happen eventually" test for
free from the recursive submodule update framework I'm currently
implementing, so I propose we don't implement this exepected failure
in this patch.
^ permalink raw reply [relevance 0%]
* [PATCH v2 0/2] better document side effects when [re]moving a submodule
2014-01-07 17:57 0% ` Jens Lehmann
@ 2014-01-07 21:30 5% ` Jens Lehmann
2014-01-07 21:31 11% ` [PATCH v2 1/2] mv: better document side effects when moving " Jens Lehmann
0 siblings, 1 reply; 200+ results
From: Jens Lehmann @ 2014-01-07 21:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: George Papanikolaou, git
Am 07.01.2014 18:57, schrieb Jens Lehmann:
> Am 06.01.2014 23:40, schrieb Junio C Hamano:
>> Jens Lehmann <Jens.Lehmann@web.de> writes:
>>> Does this new paragraph make it clearer?
>>
>> Don't we have bugs section that we can use to list the known
>> limitations like this?
>
> Right, will change accordingly in v2.
Changes from v1:
- Document side effects under the BUGS section
- Add similar documentation for "git rm"
Jens Lehmann (2):
mv: better document side effects when moving a submodule
rm: better document side effects when removing a submodule
Documentation/git-mv.txt | 12 ++++++++++++
Documentation/git-rm.txt | 9 +++++++++
t/t3600-rm.sh | 16 ++++++++++++++++
t/t7001-mv.sh | 21 +++++++++++++++++++++
4 files changed, 58 insertions(+)
--
1.8.5.2.231.gfc86eb1
^ permalink raw reply [relevance 5%]
* [PATCH v2 1/2] mv: better document side effects when moving a submodule
2014-01-07 21:30 5% ` [PATCH v2 0/2] better document side effects when [re]moving " Jens Lehmann
@ 2014-01-07 21:31 11% ` Jens Lehmann
0 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2014-01-07 21:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: George Papanikolaou, git
The "Submodules" section of the "git mv" documentation mentions what will
happen when a submodule with a gitfile gets moved with newer git. But it
doesn't talk about what happens when the user changes between commits
before and after the move, which does not update the work tree like using
the mv command did the first time.
Explain what happens and what the user has to do manually to fix that in
the new BUGS section. Also document this behavior in a new test.
Reported-by: George Papanikolaou <g3orge.app@gmail.com>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Documentation/git-mv.txt | 12 ++++++++++++
t/t7001-mv.sh | 21 +++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index b1f7988..e453132 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -52,6 +52,18 @@ core.worktree setting to make the submodule work in the new location.
It also will attempt to update the submodule.<name>.path setting in
the linkgit:gitmodules[5] file and stage that file (unless -n is used).
+BUGS
+----
+Each time a superproject update moves a populated submodule (e.g. when
+switching between commits before and after the move) a stale submodule
+checkout will remain in the old location and an empty directory will
+appear in the new location. To populate the submodule again in the new
+location the user will have to run "git submodule update"
+afterwards. Removing the old directory is only safe when it uses a
+gitfile, as otherwise the history of the submodule will be deleted
+too. Both steps will be obsolete when recursive submodule update has
+been implemented.
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 3bfdfed..e3c8c2c 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -442,4 +442,25 @@ test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
git diff-files --quiet -- sub .gitmodules
'
+test_expect_success 'checking out a commit before submodule moved needs manual updates' '
+ git mv sub sub2 &&
+ git commit -m "moved sub to sub2" &&
+ git checkout -q HEAD^ 2>actual &&
+ echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
+ test_i18ncmp expected actual &&
+ git status -s sub2 >actual &&
+ echo "?? sub2/" >expected &&
+ test_cmp expected actual &&
+ ! test -f sub/.git &&
+ test -f sub2/.git &&
+ git submodule update &&
+ test -f sub/.git &&
+ rm -rf sub2 &&
+ git diff-index --exit-code HEAD &&
+ git update-index --refresh &&
+ git diff-files --quiet -- sub .gitmodules &&
+ git status -s sub2 >actual &&
+ ! test -s actual
+'
+
test_done
--
1.8.5.2.231.gfc86eb1
^ permalink raw reply related [relevance 11%]
* [PATCH 0/2] solaris test fixups
@ 2014-01-23 19:54 5% Jeff King
0 siblings, 0 replies; 200+ results
From: Jeff King @ 2014-01-23 19:54 UTC (permalink / raw)
To: git
Due to the alignment bug in another thread, I had the pleasure of
visiting my old friend Solaris 9 today. The tests _almost_ all run out
of the box.
This series features two minor fixes:
[1/2]: t7501: fix "empty commit" test with NO_PERL
[2/2]: t7700: do not use "touch -r"
I had a few other failures related to encodings; I suspect the problem
is simply that the machine in question doesn't have eucJP support at
all.
The big one that I did not fix is in t7001-mv. We do this:
test_must_fail git mv some-file no-such-dir/
and assume that it will fail. It doesn't. Solaris happily renames
some-file to a regular file named "no-such-dir". So we fail later during
the index-update, complaining about adding the entry "no-such-dir/", but
still exit(0) at the end. I'm mostly willing to just call Solaris crazy
for allowing the rename (Linux returns ENOTDIR), but I do wonder if
the index codepath could be improved (and especially to return an
error).
-Peff
^ permalink raw reply [relevance 5%]
* [PATCH v2] mv: prevent mismatched data when ignoring errors.
@ 2014-03-15 18:56 12% ` brian m. carlson
0 siblings, 0 replies; 200+ results
From: brian m. carlson @ 2014-03-15 18:56 UTC (permalink / raw)
To: git; +Cc: Jens Lehmann, John Keeping, Junio C Hamano, Guillaume Gelin
We shrink the source and destination arrays, but not the modes or
submodule_gitfile arrays, resulting in potentially mismatched data. Shrink
all the arrays at the same time to prevent this. Add tests to ensure the
problem does not recur.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
I attempted to come up with a second patch that would refactor out the
four different arrays into one array of struct, as Jeff suggested, but
it became very ugly very quickly. So this patch simply fixes the
problem and adds tests.
builtin/mv.c | 5 +++++
t/t7001-mv.sh | 13 ++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index f99c91e..09bbc63 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -230,6 +230,11 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
memmove(destination + i,
destination + i + 1,
(argc - i) * sizeof(char *));
+ memmove(modes + i, modes + i + 1,
+ (argc - i) * sizeof(enum update_mode));
+ memmove(submodule_gitfile + i,
+ submodule_gitfile + i + 1,
+ (argc - i) * sizeof(char *));
i--;
}
} else
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e3c8c2c..215d43d 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -294,7 +294,8 @@ test_expect_success 'setup submodule' '
git submodule add ./. sub &&
echo content >file &&
git add file &&
- git commit -m "added sub and file"
+ git commit -m "added sub and file" &&
+ git branch submodule
'
test_expect_success 'git mv cannot move a submodule in a file' '
@@ -463,4 +464,14 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
! test -s actual
'
+test_expect_success 'mv -k does not accidentally destroy submodules' '
+ git checkout submodule &&
+ mkdir dummy dest &&
+ git mv -k dummy sub dest &&
+ git status --porcelain >actual &&
+ grep "^R sub -> dest/sub" actual &&
+ git reset --hard &&
+ git checkout .
+'
+
test_done
--
1.9.0.1010.g6633b85.dirty
^ permalink raw reply related [relevance 12%]
* [PATCH 000/144] Use the $( ... ) construct for command substitution instead of using the back-quotes
@ 2014-03-24 16:56 2% Elia Pinto
0 siblings, 0 replies; 200+ results
From: Elia Pinto @ 2014-03-24 16:56 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
This patch series changes everywhere the back-quotes construct for command
substitution with the $( ... ). The Git CodingGuidelines prefer
the $( ... ) construct for command substitution instead of using the back-quotes
, or grave accents (`..`).
The backquoted form is the historical method for command substitution,
and is supported by POSIX. However,all but the simplest uses become
complicated quickly. In particular,embedded command substitutions
and/or the use of double quotes require careful escaping with the backslash
character. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell. Because this construct uses distinct
opening and closing delimiters, it is much easier to follow.
Also now the embedded double quotes no longer need escaping.
The patch is simple but involves a large number of files with different authors.
Being simple I think it is wasteful to cc a large number of different people
for doing a review.
Elia Pinto (144):
check-builtins.sh: use the $( ... ) construct for command
substitution
git-am.sh: use the $( ... ) construct for command substitution
git-pull.sh: use the $( ... ) construct for command substitution
git-rebase--merge.sh: use the $( ... ) construct for command
substitution
git-rebase.sh: use the $( ... ) construct for command substitution
git-stash.sh: use the $( ... ) construct for command substitution
git-web--browse.sh: use the $( ... ) construct for command
substitution
unimplemented.sh: use the $( ... ) construct for command substitution
t0001-init.sh: use the $( ... ) construct for command substitution
t0010-racy-git.sh: use the $( ... ) construct for command
substitution
t0020-crlf.sh: use the $( ... ) construct for command substitution
t0025-crlf-auto.sh: use the $( ... ) construct for command
substitution
t0026-eol-config.sh: use the $( ... ) construct for command
substitution
t0030-stripspace.sh: use the $( ... ) construct for command
substitution
t0204-gettext-reencode-sanity.sh: use the $( ... ) construct for
command substitution
t0300-credentials.sh: use the $( ... ) construct for command
substitution
t1000-read-tree-m-3way.sh: use the $( ... ) construct for command
substitution
t1001-read-tree-m-2way.sh: use the $( ... ) construct for command
substitution
t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command
substitution
t1003-read-tree-prefix.sh: use the $( ... ) construct for command
substitution
t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command
substitution
t1020-subdirectory.sh: use the $( ... ) construct for command
substitution
t1050-large.sh: use the $( ... ) construct for command substitution
t1100-commit-tree-options.sh: use the $( ... ) construct for command
substitution
t1401-symbolic-ref.sh: use the $( ... ) construct for command
substitution
t1410-reflog.sh: use the $( ... ) construct for command substitution
t1511-rev-parse-caret.sh: use the $( ... ) construct for command
substitution
t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for
command substitution
t2102-update-index-symlinks.sh: use the $( ... ) construct for
command substitution
t3030-merge-recursive.sh: use the $( ... ) construct for command
substitution
t3100-ls-tree-restrict.sh: use the $( ... ) construct for command
substitution
t3101-ls-tree-dirname.sh: use the $( ... ) construct for command
substitution
t3210-pack-refs.sh: use the $( ... ) construct for command
substitution
t3403-rebase-skip.sh: use the $( ... ) construct for command
substitution
t3511-cherry-pick-x.sh: use the $( ... ) construct for command
substitution
t3600-rm.sh: use the $( ... ) construct for command substitution
t3700-add.sh: use the $( ... ) construct for command substitution
t3905-stash-include-untracked.sh: use the $( ... ) construct for
command substitution
t3910-mac-os-precompose.sh: use the $( ... ) construct for command
substitution
t4006-diff-mode.sh: use the $( ... ) construct for command
substitution
t4010-diff-pathspec.sh: use the $( ... ) construct for command
substitution
t4012-diff-binary.sh: use the $( ... ) construct for command
substitution
t4013-diff-various.sh: use the $( ... ) construct for command
substitution
t4014-format-patch.sh: use the $( ... ) construct for command
substitution
t4036-format-patch-signer-mime.sh: use the $( ... ) construct for
command substitution
t4038-diff-combined.sh: use the $( ... ) construct for command
substitution
t4057-diff-combined-paths.sh: use the $( ... ) construct for command
substitution
t4116-apply-reverse.sh: use the $( ... ) construct for command
substitution
t4119-apply-config.sh: use the $( ... ) construct for command
substitution
t4204-patch-id.sh: use the $( ... ) construct for command
substitution
t5000-tar-tree.sh: use the $( ... ) construct for command
substitution
t5003-archive-zip.sh: use the $( ... ) construct for command
substitution
t5100-mailinfo.sh: use the $( ... ) construct for command
substitution
t5300-pack-object.sh: use the $( ... ) construct for command
substitution
t5301-sliding-window.sh: use the $( ... ) construct for command
substitution
t5302-pack-index.sh: use the $( ... ) construct for command
substitution
t5303-pack-corruption-resilience.sh: use the $( ... ) construct for
command substitution
t5304-prune.sh: use the $( ... ) construct for command substitution
t5305-include-tag.sh: use the $( ... ) construct for command
substitution
t5500-fetch-pack.sh: use the $( ... ) construct for command
substitution
t5505-remote.sh: use the $( ... ) construct for command substitution
t5506-remote-groups.sh: use the $( ... ) construct for command
substitution
t5510-fetch.sh: use the $( ... ) construct for command substitution
t5515-fetch-merge-logic.sh: use the $( ... ) construct for command
substitution
t5516-fetch-push.sh: use the $( ... ) construct for command
substitution
t5517-push-mirror.sh: use the $( ... ) construct for command
substitution
t5520-pull.sh: use the $( ... ) construct for command substitution
t5522-pull-symlink.sh: use the $( ... ) construct for command
substitution
t5530-upload-pack-error.sh: use the $( ... ) construct for command
substitution
t5537-fetch-shallow.sh: use the $( ... ) construct for command
substitution
t5538-push-shallow.sh: use the $( ... ) construct for command
substitution
t5550-http-fetch-dumb.sh: use the $( ... ) construct for command
substitution
t5551-http-fetch-smart.sh: use the $( ... ) construct for command
substitution
t5570-git-daemon.sh: use the $( ... ) construct for command
substitution
t5601-clone.sh: use the $( ... ) construct for command substitution
t5700-clone-reference.sh: use the $( ... ) construct for command
substitution
t5710-info-alternate.sh: use the $( ... ) construct for command
substitution
t5900-repo-selection.sh: use the $( ... ) construct for command
substitution
t6001-rev-list-graft.sh: use the $( ... ) construct for command
substitution
t6002-rev-list-bisect.sh: use the $( ... ) construct for command
substitution
t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for
command substitution
t6032-merge-large-rename.sh: use the $( ... ) construct for command
substitution
t6034-merge-rename-nocruft.sh: use the $( ... ) construct for command
substitution
t6111-rev-list-treesame.sh: use the $( ... ) construct for command
substitution
t6132-pathspec-exclude.sh: use the $( ... ) construct for command
substitution
t7001-mv.sh: use the $( ... ) construct for command substitution
t7003-filter-branch.sh: use the $( ... ) construct for command
substitution
t7004-tag.sh: use the $( ... ) construct for command substitution
t7006-pager.sh: use the $( ... ) construct for command substitution
t7103-reset-bare.sh: use the $( ... ) construct for command
substitution
t7406-submodule-update.sh: use the $( ... ) construct for command
substitution
t7408-submodule-reference.sh: use the $( ... ) construct for command
substitution
t7504-commit-msg-hook.sh: use the $( ... ) construct for command
substitution
t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for
command substitution
t7602-merge-octopus-many.sh: use the $( ... ) construct for command
substitution
t7700-repack.sh: use the $( ... ) construct for command substitution
t8003-blame-corner-cases.sh: use the $( ... ) construct for command
substitution
t9001-send-email.sh: use the $( ... ) construct for command
substitution
t9101-git-svn-props.sh: use the $( ... ) construct for command
substitution
t9104-git-svn-follow-parent.sh: use the $( ... ) construct for
command substitution
t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command
substitution
t9107-git-svn-migrate.sh: use the $( ... ) construct for command
substitution
t9108-git-svn-glob.sh: use the $( ... ) construct for command
substitution
t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command
substitution
t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for
command substitution
t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for
command substitution
t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for
command substitution
t9119-git-svn-info.sh: use the $( ... ) construct for command
substitution
t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for
command substitution
t9130-git-svn-authors-file.sh: use the $( ... ) construct for command
substitution
t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for
command substitution
t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct
for command substitution
t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command
substitution
t9145-git-svn-master-branch.sh: use the $( ... ) construct for
command substitution
t9150-svk-mergetickets.sh: use the $( ... ) construct for command
substitution
t9300-fast-import.sh: use the $( ... ) construct for command
substitution
t9350-fast-export.sh: use the $( ... ) construct for command
substitution
t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct
for command substitution
t9901-git-web--browse.sh: use the $( ... ) construct for command
substitution
test-lib-functions.sh: use the $( ... ) construct for command
substitution
lib-credential.sh: use the $( ... ) construct for command
substitution
lib-cvs.sh: use the $( ... ) construct for command substitution
lib-gpg.sh: use the $( ... ) construct for command substitution
p5302-pack-index.sh: use the $( ... ) construct for command
substitution
howto-index.sh: use the $( ... ) construct for command substitution
install-webdoc.sh: use the $( ... ) construct for command
substitution
git-checkout.sh: use the $( ... ) construct for command substitution
git-clone.sh: use the $( ... ) construct for command substitution
git-commit.sh: use the $( ... ) construct for command substitution
git-fetch.sh: use the $( ... ) construct for command substitution
git-ls-remote.sh: use the $( ... ) construct for command substitution
git-merge.sh: use the $( ... ) construct for command substitution
git-repack.sh: use the $( ... ) construct for command substitution
git-resolve.sh: use the $( ... ) construct for command substitution
git-revert.sh: use the $( ... ) construct for command substitution
git-tag.sh: use the $( ... ) construct for command substitution
t9360-mw-to-git-clone.sh: use the $( ... ) construct for command
substitution
t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command
substitution
t9365-continuing-queries.sh: use the $( ... ) construct for command
substitution
test-gitmw-lib.sh: use the $( ... ) construct for command
substitution
t7900-subtree.sh: use the $( ... ) construct for command substitution
appp.sh: use the $( ... ) construct for command substitution
txt-to-pot.sh: use the $( ... ) construct for command substitution
t9100-git-svn-basic.sh: use the $( ... ) construct for command
substitution
Documentation/howto-index.sh | 12 ++--
Documentation/install-webdoc.sh | 6 +-
check-builtins.sh | 4 +-
contrib/examples/git-checkout.sh | 8 +--
contrib/examples/git-clone.sh | 20 +++----
contrib/examples/git-commit.sh | 10 ++--
contrib/examples/git-fetch.sh | 6 +-
contrib/examples/git-ls-remote.sh | 4 +-
contrib/examples/git-merge.sh | 4 +-
contrib/examples/git-repack.sh | 2 +-
contrib/examples/git-resolve.sh | 2 +-
contrib/examples/git-revert.sh | 2 +-
contrib/examples/git-tag.sh | 2 +-
contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 14 ++---
contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 4 +-
contrib/mw-to-git/t/t9365-continuing-queries.sh | 2 +-
contrib/mw-to-git/t/test-gitmw-lib.sh | 6 +-
contrib/subtree/t/t7900-subtree.sh | 2 +-
contrib/thunderbird-patch-inline/appp.sh | 14 ++---
git-am.sh | 30 +++++-----
git-gui/po/glossary/txt-to-pot.sh | 4 +-
git-pull.sh | 2 +-
git-rebase--merge.sh | 4 +-
git-rebase.sh | 8 +--
git-stash.sh | 2 +-
git-web--browse.sh | 6 +-
t/lib-credential.sh | 2 +-
t/lib-cvs.sh | 2 +-
t/lib-gpg.sh | 2 +-
t/perf/p5302-pack-index.sh | 2 +-
t/t0001-init.sh | 12 ++--
t/t0010-racy-git.sh | 4 +-
t/t0020-crlf.sh | 42 +++++++-------
t/t0025-crlf-auto.sh | 38 ++++++-------
t/t0026-eol-config.sh | 20 +++----
t/t0030-stripspace.sh | 20 +++----
t/t0204-gettext-reencode-sanity.sh | 2 +-
t/t0300-credentials.sh | 2 +-
t/t1000-read-tree-m-3way.sh | 4 +-
t/t1001-read-tree-m-2way.sh | 18 +++---
t/t1002-read-tree-m-u-2way.sh | 10 ++--
t/t1003-read-tree-prefix.sh | 2 +-
t/t1004-read-tree-m-u-wf.sh | 8 +--
t/t1020-subdirectory.sh | 22 ++++----
t/t1050-large.sh | 4 +-
t/t1100-commit-tree-options.sh | 4 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1410-reflog.sh | 24 ++++----
t/t1511-rev-parse-caret.sh | 4 +-
t/t1512-rev-parse-disambiguation.sh | 8 +--
t/t2102-update-index-symlinks.sh | 2 +-
t/t3030-merge-recursive.sh | 2 +-
t/t3100-ls-tree-restrict.sh | 2 +-
t/t3101-ls-tree-dirname.sh | 2 +-
t/t3210-pack-refs.sh | 2 +-
t/t3403-rebase-skip.sh | 2 +-
t/t3511-cherry-pick-x.sh | 14 ++---
t/t3600-rm.sh | 4 +-
t/t3700-add.sh | 16 +++---
t/t3905-stash-include-untracked.sh | 4 +-
t/t3910-mac-os-precompose.sh | 16 +++---
t/t4006-diff-mode.sh | 2 +-
t/t4010-diff-pathspec.sh | 4 +-
t/t4012-diff-binary.sh | 16 +++---
t/t4013-diff-various.sh | 6 +-
t/t4014-format-patch.sh | 10 ++--
t/t4036-format-patch-signer-mime.sh | 2 +-
t/t4038-diff-combined.sh | 2 +-
t/t4057-diff-combined-paths.sh | 2 +-
t/t4116-apply-reverse.sh | 12 ++--
t/t4119-apply-config.sh | 2 +-
t/t4204-patch-id.sh | 4 +-
t/t5000-tar-tree.sh | 6 +-
t/t5003-archive-zip.sh | 2 +-
t/t5100-mailinfo.sh | 12 ++--
t/t5300-pack-object.sh | 18 +++---
t/t5301-sliding-window.sh | 14 ++---
t/t5302-pack-index.sh | 34 ++++++------
t/t5303-pack-corruption-resilience.sh | 8 +--
t/t5304-prune.sh | 2 +-
t/t5305-include-tag.sh | 8 +--
t/t5500-fetch-pack.sh | 16 +++---
t/t5505-remote.sh | 2 +-
t/t5506-remote-groups.sh | 2 +-
t/t5510-fetch.sh | 10 ++--
t/t5515-fetch-merge-logic.sh | 4 +-
t/t5516-fetch-push.sh | 4 +-
t/t5517-push-mirror.sh | 2 +-
t/t5520-pull.sh | 10 ++--
t/t5522-pull-symlink.sh | 2 +-
t/t5530-upload-pack-error.sh | 2 +-
t/t5537-fetch-shallow.sh | 4 +-
t/t5538-push-shallow.sh | 4 +-
t/t5550-http-fetch-dumb.sh | 8 +--
t/t5551-http-fetch-smart.sh | 2 +-
t/t5570-git-daemon.sh | 8 +--
t/t5601-clone.sh | 2 +-
t/t5700-clone-reference.sh | 2 +-
t/t5710-info-alternate.sh | 2 +-
t/t5900-repo-selection.sh | 2 +-
t/t6001-rev-list-graft.sh | 12 ++--
t/t6002-rev-list-bisect.sh | 6 +-
t/t6015-rev-list-show-all-parents.sh | 6 +-
t/t6032-merge-large-rename.sh | 2 +-
t/t6034-merge-rename-nocruft.sh | 2 +-
t/t6111-rev-list-treesame.sh | 2 +-
t/t6132-pathspec-exclude.sh | 2 +-
t/t7001-mv.sh | 4 +-
t/t7003-filter-branch.sh | 6 +-
t/t7004-tag.sh | 16 +++---
t/t7006-pager.sh | 2 +-
t/t7103-reset-bare.sh | 2 +-
t/t7406-submodule-update.sh | 4 +-
t/t7408-submodule-reference.sh | 2 +-
t/t7504-commit-msg-hook.sh | 2 +-
t/t7505-prepare-commit-msg-hook.sh | 32 +++++------
t/t7602-merge-octopus-many.sh | 8 +--
t/t7700-repack.sh | 4 +-
t/t8003-blame-corner-cases.sh | 4 +-
t/t9001-send-email.sh | 10 ++--
t/t9100-git-svn-basic.sh | 24 ++++----
t/t9101-git-svn-props.sh | 30 +++++-----
t/t9104-git-svn-follow-parent.sh | 48 ++++++++--------
t/t9105-git-svn-commit-diff.sh | 4 +-
t/t9107-git-svn-migrate.sh | 16 +++---
t/t9108-git-svn-glob.sh | 20 +++----
t/t9109-git-svn-multi-glob.sh | 32 +++++------
t/t9110-git-svn-use-svm-props.sh | 2 +-
t/t9114-git-svn-dcommit-merge.sh | 12 ++--
t/t9118-git-svn-funky-branch-names.sh | 2 +-
t/t9119-git-svn-info.sh | 2 +-
t/t9129-git-svn-i18n-commitencoding.sh | 4 +-
t/t9130-git-svn-authors-file.sh | 12 ++--
t/t9132-git-svn-broken-symlink.sh | 4 +-
t/t9137-git-svn-dcommit-clobber-series.sh | 24 ++++----
t/t9138-git-svn-authors-prog.sh | 2 +-
t/t9145-git-svn-master-branch.sh | 4 +-
t/t9150-svk-mergetickets.sh | 2 +-
t/t9300-fast-import.sh | 68 +++++++++++------------
t/t9350-fast-export.sh | 6 +-
t/t9501-gitweb-standalone-http-status.sh | 6 +-
t/t9901-git-web--browse.sh | 2 +-
t/test-lib-functions.sh | 8 +--
unimplemented.sh | 2 +-
144 files changed, 611 insertions(+), 611 deletions(-)
--
1.7.10.4
^ permalink raw reply [relevance 2%]
* [PATCH 086/144] t7001-mv.sh: use the $( ... ) construct for command substitution
2014-03-25 8:24 2% Elia Pinto
@ 2014-03-25 8:25 20% ` Elia Pinto
0 siblings, 0 replies; 200+ results
From: Elia Pinto @ 2014-03-25 8:25 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).
The backquoted form is the historical method for command substitution,
and is supported by POSIX. However,all but the simplest uses become
complicated quickly. In particular,embedded command substitutions
and/or the use of double quotes require careful escaping with the backslash
character. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
t/t7001-mv.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e3c8c2c..23564bf 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -156,11 +156,11 @@ test_expect_success "Michael Cassar's test case" '
echo b > partA/outline.txt &&
echo c > papers/unsorted/_another &&
git add papers partA &&
- T1=`git write-tree` &&
+ T1=$(git write-tree) &&
git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
- T=`git write-tree` &&
+ T=$(git write-tree) &&
git ls-tree -r $T | grep partA/outline.txt || {
git ls-tree -r $T
(exit 1)
--
1.7.10.4
^ permalink raw reply related [relevance 20%]
* [PATCH 000/144] Use the $( ... ) construct for command substitution instead of using the back-quotes
@ 2014-03-25 8:24 2% Elia Pinto
2014-03-25 8:25 20% ` [PATCH 086/144] t7001-mv.sh: use the $( ... ) construct for command substitution Elia Pinto
0 siblings, 1 reply; 200+ results
From: Elia Pinto @ 2014-03-25 8:24 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
This patch series changes everywhere the back-quotes construct for command
substitution with the $( ... ). The Git CodingGuidelines prefer
the $( ... ) construct for command substitution instead of using the back-quotes
, or grave accents (`..`).
The backquoted form is the historical method for command substitution,
and is supported by POSIX. However,all but the simplest uses become
complicated quickly. In particular,embedded command substitutions
and/or the use of double quotes require careful escaping with the backslash
character. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell. Because this construct uses distinct
opening and closing delimiters, it is much easier to follow.
Also now the embedded double quotes no longer need escaping.
The patch is simple but involves a large number of files with different authors.
Being simple I think it is wasteful to cc a large number of different people
for doing a review.
Elia Pinto (144):
check-builtins.sh: use the $( ... ) construct for command
substitution
git-am.sh: use the $( ... ) construct for command substitution
git-pull.sh: use the $( ... ) construct for command substitution
git-rebase--merge.sh: use the $( ... ) construct for command
substitution
git-rebase.sh: use the $( ... ) construct for command substitution
git-stash.sh: use the $( ... ) construct for command substitution
git-web--browse.sh: use the $( ... ) construct for command
substitution
unimplemented.sh: use the $( ... ) construct for command substitution
t0001-init.sh: use the $( ... ) construct for command substitution
t0010-racy-git.sh: use the $( ... ) construct for command
substitution
t0020-crlf.sh: use the $( ... ) construct for command substitution
t0025-crlf-auto.sh: use the $( ... ) construct for command
substitution
t0026-eol-config.sh: use the $( ... ) construct for command
substitution
t0030-stripspace.sh: use the $( ... ) construct for command
substitution
t0204-gettext-reencode-sanity.sh: use the $( ... ) construct for
command substitution
t0300-credentials.sh: use the $( ... ) construct for command
substitution
t1000-read-tree-m-3way.sh: use the $( ... ) construct for command
substitution
t1001-read-tree-m-2way.sh: use the $( ... ) construct for command
substitution
t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command
substitution
t1003-read-tree-prefix.sh: use the $( ... ) construct for command
substitution
t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command
substitution
t1020-subdirectory.sh: use the $( ... ) construct for command
substitution
t1050-large.sh: use the $( ... ) construct for command substitution
t1100-commit-tree-options.sh: use the $( ... ) construct for command
substitution
t1401-symbolic-ref.sh: use the $( ... ) construct for command
substitution
t1410-reflog.sh: use the $( ... ) construct for command substitution
t1511-rev-parse-caret.sh: use the $( ... ) construct for command
substitution
t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for
command substitution
t2102-update-index-symlinks.sh: use the $( ... ) construct for
command substitution
t3030-merge-recursive.sh: use the $( ... ) construct for command
substitution
t3100-ls-tree-restrict.sh: use the $( ... ) construct for command
substitution
t3101-ls-tree-dirname.sh: use the $( ... ) construct for command
substitution
t3210-pack-refs.sh: use the $( ... ) construct for command
substitution
t3403-rebase-skip.sh: use the $( ... ) construct for command
substitution
t3511-cherry-pick-x.sh: use the $( ... ) construct for command
substitution
t3600-rm.sh: use the $( ... ) construct for command substitution
t3700-add.sh: use the $( ... ) construct for command substitution
t3905-stash-include-untracked.sh: use the $( ... ) construct for
command substitution
t3910-mac-os-precompose.sh: use the $( ... ) construct for command
substitution
t4006-diff-mode.sh: use the $( ... ) construct for command
substitution
t4010-diff-pathspec.sh: use the $( ... ) construct for command
substitution
t4012-diff-binary.sh: use the $( ... ) construct for command
substitution
t4013-diff-various.sh: use the $( ... ) construct for command
substitution
t4014-format-patch.sh: use the $( ... ) construct for command
substitution
t4036-format-patch-signer-mime.sh: use the $( ... ) construct for
command substitution
t4038-diff-combined.sh: use the $( ... ) construct for command
substitution
t4057-diff-combined-paths.sh: use the $( ... ) construct for command
substitution
t4116-apply-reverse.sh: use the $( ... ) construct for command
substitution
t4119-apply-config.sh: use the $( ... ) construct for command
substitution
t4204-patch-id.sh: use the $( ... ) construct for command
substitution
t5000-tar-tree.sh: use the $( ... ) construct for command
substitution
t5003-archive-zip.sh: use the $( ... ) construct for command
substitution
t5100-mailinfo.sh: use the $( ... ) construct for command
substitution
t5300-pack-object.sh: use the $( ... ) construct for command
substitution
t5301-sliding-window.sh: use the $( ... ) construct for command
substitution
t5302-pack-index.sh: use the $( ... ) construct for command
substitution
t5303-pack-corruption-resilience.sh: use the $( ... ) construct for
command substitution
t5304-prune.sh: use the $( ... ) construct for command substitution
t5305-include-tag.sh: use the $( ... ) construct for command
substitution
t5500-fetch-pack.sh: use the $( ... ) construct for command
substitution
t5505-remote.sh: use the $( ... ) construct for command substitution
t5506-remote-groups.sh: use the $( ... ) construct for command
substitution
t5510-fetch.sh: use the $( ... ) construct for command substitution
t5515-fetch-merge-logic.sh: use the $( ... ) construct for command
substitution
t5516-fetch-push.sh: use the $( ... ) construct for command
substitution
t5517-push-mirror.sh: use the $( ... ) construct for command
substitution
t5520-pull.sh: use the $( ... ) construct for command substitution
t5522-pull-symlink.sh: use the $( ... ) construct for command
substitution
t5530-upload-pack-error.sh: use the $( ... ) construct for command
substitution
t5537-fetch-shallow.sh: use the $( ... ) construct for command
substitution
t5538-push-shallow.sh: use the $( ... ) construct for command
substitution
t5550-http-fetch-dumb.sh: use the $( ... ) construct for command
substitution
t5551-http-fetch-smart.sh: use the $( ... ) construct for command
substitution
t5570-git-daemon.sh: use the $( ... ) construct for command
substitution
t5601-clone.sh: use the $( ... ) construct for command substitution
t5700-clone-reference.sh: use the $( ... ) construct for command
substitution
t5710-info-alternate.sh: use the $( ... ) construct for command
substitution
t5900-repo-selection.sh: use the $( ... ) construct for command
substitution
t6001-rev-list-graft.sh: use the $( ... ) construct for command
substitution
t6002-rev-list-bisect.sh: use the $( ... ) construct for command
substitution
t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for
command substitution
t6032-merge-large-rename.sh: use the $( ... ) construct for command
substitution
t6034-merge-rename-nocruft.sh: use the $( ... ) construct for command
substitution
t6111-rev-list-treesame.sh: use the $( ... ) construct for command
substitution
t6132-pathspec-exclude.sh: use the $( ... ) construct for command
substitution
t7001-mv.sh: use the $( ... ) construct for command substitution
t7003-filter-branch.sh: use the $( ... ) construct for command
substitution
t7004-tag.sh: use the $( ... ) construct for command substitution
t7006-pager.sh: use the $( ... ) construct for command substitution
t7103-reset-bare.sh: use the $( ... ) construct for command
substitution
t7406-submodule-update.sh: use the $( ... ) construct for command
substitution
t7408-submodule-reference.sh: use the $( ... ) construct for command
substitution
t7504-commit-msg-hook.sh: use the $( ... ) construct for command
substitution
t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for
command substitution
t7602-merge-octopus-many.sh: use the $( ... ) construct for command
substitution
t7700-repack.sh: use the $( ... ) construct for command substitution
t8003-blame-corner-cases.sh: use the $( ... ) construct for command
substitution
t9001-send-email.sh: use the $( ... ) construct for command
substitution
t9101-git-svn-props.sh: use the $( ... ) construct for command
substitution
t9104-git-svn-follow-parent.sh: use the $( ... ) construct for
command substitution
t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command
substitution
t9107-git-svn-migrate.sh: use the $( ... ) construct for command
substitution
t9108-git-svn-glob.sh: use the $( ... ) construct for command
substitution
t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command
substitution
t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for
command substitution
t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for
command substitution
t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for
command substitution
t9119-git-svn-info.sh: use the $( ... ) construct for command
substitution
t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for
command substitution
t9130-git-svn-authors-file.sh: use the $( ... ) construct for command
substitution
t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for
command substitution
t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct
for command substitution
t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command
substitution
t9145-git-svn-master-branch.sh: use the $( ... ) construct for
command substitution
t9150-svk-mergetickets.sh: use the $( ... ) construct for command
substitution
t9300-fast-import.sh: use the $( ... ) construct for command
substitution
t9350-fast-export.sh: use the $( ... ) construct for command
substitution
t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct
for command substitution
t9901-git-web--browse.sh: use the $( ... ) construct for command
substitution
test-lib-functions.sh: use the $( ... ) construct for command
substitution
lib-credential.sh: use the $( ... ) construct for command
substitution
lib-cvs.sh: use the $( ... ) construct for command substitution
lib-gpg.sh: use the $( ... ) construct for command substitution
p5302-pack-index.sh: use the $( ... ) construct for command
substitution
howto-index.sh: use the $( ... ) construct for command substitution
install-webdoc.sh: use the $( ... ) construct for command
substitution
git-checkout.sh: use the $( ... ) construct for command substitution
git-clone.sh: use the $( ... ) construct for command substitution
git-commit.sh: use the $( ... ) construct for command substitution
git-fetch.sh: use the $( ... ) construct for command substitution
git-ls-remote.sh: use the $( ... ) construct for command substitution
git-merge.sh: use the $( ... ) construct for command substitution
git-repack.sh: use the $( ... ) construct for command substitution
git-resolve.sh: use the $( ... ) construct for command substitution
git-revert.sh: use the $( ... ) construct for command substitution
git-tag.sh: use the $( ... ) construct for command substitution
t9360-mw-to-git-clone.sh: use the $( ... ) construct for command
substitution
t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command
substitution
t9365-continuing-queries.sh: use the $( ... ) construct for command
substitution
test-gitmw-lib.sh: use the $( ... ) construct for command
substitution
t7900-subtree.sh: use the $( ... ) construct for command substitution
appp.sh: use the $( ... ) construct for command substitution
txt-to-pot.sh: use the $( ... ) construct for command substitution
t9100-git-svn-basic.sh: use the $( ... ) construct for command
substitution
Documentation/howto-index.sh | 12 ++--
Documentation/install-webdoc.sh | 6 +-
check-builtins.sh | 4 +-
contrib/examples/git-checkout.sh | 8 +--
contrib/examples/git-clone.sh | 20 +++----
contrib/examples/git-commit.sh | 10 ++--
contrib/examples/git-fetch.sh | 6 +-
contrib/examples/git-ls-remote.sh | 4 +-
contrib/examples/git-merge.sh | 4 +-
contrib/examples/git-repack.sh | 2 +-
contrib/examples/git-resolve.sh | 2 +-
contrib/examples/git-revert.sh | 2 +-
contrib/examples/git-tag.sh | 2 +-
contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 14 ++---
contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 4 +-
contrib/mw-to-git/t/t9365-continuing-queries.sh | 2 +-
contrib/mw-to-git/t/test-gitmw-lib.sh | 6 +-
contrib/subtree/t/t7900-subtree.sh | 2 +-
contrib/thunderbird-patch-inline/appp.sh | 14 ++---
git-am.sh | 30 +++++-----
git-gui/po/glossary/txt-to-pot.sh | 4 +-
git-pull.sh | 2 +-
git-rebase--merge.sh | 4 +-
git-rebase.sh | 8 +--
git-stash.sh | 2 +-
git-web--browse.sh | 6 +-
t/lib-credential.sh | 2 +-
t/lib-cvs.sh | 2 +-
t/lib-gpg.sh | 2 +-
t/perf/p5302-pack-index.sh | 2 +-
t/t0001-init.sh | 12 ++--
t/t0010-racy-git.sh | 4 +-
t/t0020-crlf.sh | 42 +++++++-------
t/t0025-crlf-auto.sh | 38 ++++++-------
t/t0026-eol-config.sh | 20 +++----
t/t0030-stripspace.sh | 20 +++----
t/t0204-gettext-reencode-sanity.sh | 2 +-
t/t0300-credentials.sh | 2 +-
t/t1000-read-tree-m-3way.sh | 4 +-
t/t1001-read-tree-m-2way.sh | 18 +++---
t/t1002-read-tree-m-u-2way.sh | 10 ++--
t/t1003-read-tree-prefix.sh | 2 +-
t/t1004-read-tree-m-u-wf.sh | 8 +--
t/t1020-subdirectory.sh | 22 ++++----
t/t1050-large.sh | 4 +-
t/t1100-commit-tree-options.sh | 4 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1410-reflog.sh | 24 ++++----
t/t1511-rev-parse-caret.sh | 4 +-
t/t1512-rev-parse-disambiguation.sh | 8 +--
t/t2102-update-index-symlinks.sh | 2 +-
t/t3030-merge-recursive.sh | 2 +-
t/t3100-ls-tree-restrict.sh | 2 +-
t/t3101-ls-tree-dirname.sh | 2 +-
t/t3210-pack-refs.sh | 2 +-
t/t3403-rebase-skip.sh | 2 +-
t/t3511-cherry-pick-x.sh | 14 ++---
t/t3600-rm.sh | 4 +-
t/t3700-add.sh | 16 +++---
t/t3905-stash-include-untracked.sh | 4 +-
t/t3910-mac-os-precompose.sh | 16 +++---
t/t4006-diff-mode.sh | 2 +-
t/t4010-diff-pathspec.sh | 4 +-
t/t4012-diff-binary.sh | 16 +++---
t/t4013-diff-various.sh | 6 +-
t/t4014-format-patch.sh | 10 ++--
t/t4036-format-patch-signer-mime.sh | 2 +-
t/t4038-diff-combined.sh | 2 +-
t/t4057-diff-combined-paths.sh | 2 +-
t/t4116-apply-reverse.sh | 12 ++--
t/t4119-apply-config.sh | 2 +-
t/t4204-patch-id.sh | 4 +-
t/t5000-tar-tree.sh | 6 +-
t/t5003-archive-zip.sh | 2 +-
t/t5100-mailinfo.sh | 12 ++--
t/t5300-pack-object.sh | 18 +++---
t/t5301-sliding-window.sh | 14 ++---
t/t5302-pack-index.sh | 34 ++++++------
t/t5303-pack-corruption-resilience.sh | 8 +--
t/t5304-prune.sh | 2 +-
t/t5305-include-tag.sh | 8 +--
t/t5500-fetch-pack.sh | 16 +++---
t/t5505-remote.sh | 2 +-
t/t5506-remote-groups.sh | 2 +-
t/t5510-fetch.sh | 10 ++--
t/t5515-fetch-merge-logic.sh | 4 +-
t/t5516-fetch-push.sh | 4 +-
t/t5517-push-mirror.sh | 2 +-
t/t5520-pull.sh | 10 ++--
t/t5522-pull-symlink.sh | 2 +-
t/t5530-upload-pack-error.sh | 2 +-
t/t5537-fetch-shallow.sh | 4 +-
t/t5538-push-shallow.sh | 4 +-
t/t5550-http-fetch-dumb.sh | 8 +--
t/t5551-http-fetch-smart.sh | 2 +-
t/t5570-git-daemon.sh | 8 +--
t/t5601-clone.sh | 2 +-
t/t5700-clone-reference.sh | 2 +-
t/t5710-info-alternate.sh | 2 +-
t/t5900-repo-selection.sh | 2 +-
t/t6001-rev-list-graft.sh | 12 ++--
t/t6002-rev-list-bisect.sh | 6 +-
t/t6015-rev-list-show-all-parents.sh | 6 +-
t/t6032-merge-large-rename.sh | 2 +-
t/t6034-merge-rename-nocruft.sh | 2 +-
t/t6111-rev-list-treesame.sh | 2 +-
t/t6132-pathspec-exclude.sh | 2 +-
t/t7001-mv.sh | 4 +-
t/t7003-filter-branch.sh | 6 +-
t/t7004-tag.sh | 16 +++---
t/t7006-pager.sh | 2 +-
t/t7103-reset-bare.sh | 2 +-
t/t7406-submodule-update.sh | 4 +-
t/t7408-submodule-reference.sh | 2 +-
t/t7504-commit-msg-hook.sh | 2 +-
t/t7505-prepare-commit-msg-hook.sh | 32 +++++------
t/t7602-merge-octopus-many.sh | 8 +--
t/t7700-repack.sh | 4 +-
t/t8003-blame-corner-cases.sh | 4 +-
t/t9001-send-email.sh | 10 ++--
t/t9100-git-svn-basic.sh | 24 ++++----
t/t9101-git-svn-props.sh | 30 +++++-----
t/t9104-git-svn-follow-parent.sh | 48 ++++++++--------
t/t9105-git-svn-commit-diff.sh | 4 +-
t/t9107-git-svn-migrate.sh | 16 +++---
t/t9108-git-svn-glob.sh | 20 +++----
t/t9109-git-svn-multi-glob.sh | 32 +++++------
t/t9110-git-svn-use-svm-props.sh | 2 +-
t/t9114-git-svn-dcommit-merge.sh | 12 ++--
t/t9118-git-svn-funky-branch-names.sh | 2 +-
t/t9119-git-svn-info.sh | 2 +-
t/t9129-git-svn-i18n-commitencoding.sh | 4 +-
t/t9130-git-svn-authors-file.sh | 12 ++--
t/t9132-git-svn-broken-symlink.sh | 4 +-
t/t9137-git-svn-dcommit-clobber-series.sh | 24 ++++----
t/t9138-git-svn-authors-prog.sh | 2 +-
t/t9145-git-svn-master-branch.sh | 4 +-
t/t9150-svk-mergetickets.sh | 2 +-
t/t9300-fast-import.sh | 68 +++++++++++------------
t/t9350-fast-export.sh | 6 +-
t/t9501-gitweb-standalone-http-status.sh | 6 +-
t/t9901-git-web--browse.sh | 2 +-
t/test-lib-functions.sh | 8 +--
unimplemented.sh | 2 +-
144 files changed, 611 insertions(+), 611 deletions(-)
--
1.7.10.4
^ permalink raw reply [relevance 2%]
* [PATCH v2 084/142] t7001-mv.sh: use the $( ... ) construct for command substitution
2014-03-25 17:22 2% [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
@ 2014-03-25 17:23 20% ` Elia Pinto
0 siblings, 0 replies; 200+ results
From: Elia Pinto @ 2014-03-25 17:23 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).
The backquoted form is the historical method for command substitution,
and is supported by POSIX. However, all but the simplest uses become
complicated quickly. In particular, embedded command substitutions
and/or the use of double quotes require careful escaping with the backslash
character. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.
The patch was generated by the simple script
for _f in $(find . -name "*.sh")
do
sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
done
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
t/t7001-mv.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e3c8c2c..23564bf 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -156,11 +156,11 @@ test_expect_success "Michael Cassar's test case" '
echo b > partA/outline.txt &&
echo c > papers/unsorted/_another &&
git add papers partA &&
- T1=`git write-tree` &&
+ T1=$(git write-tree) &&
git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
- T=`git write-tree` &&
+ T=$(git write-tree) &&
git ls-tree -r $T | grep partA/outline.txt || {
git ls-tree -r $T
(exit 1)
--
1.7.10.4
^ permalink raw reply related [relevance 20%]
* [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes
@ 2014-03-25 17:22 2% Elia Pinto
2014-03-25 17:23 20% ` [PATCH v2 084/142] t7001-mv.sh: use the $( ... ) construct for command substitution Elia Pinto
0 siblings, 1 reply; 200+ results
From: Elia Pinto @ 2014-03-25 17:22 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
This patch series changes everywhere the back-quotes construct for command
substitution with the $( ... ). The Git CodingGuidelines prefer
the $( ... ) construct for command substitution instead of using the back-quotes
, or grave accents (`..`).
The backquoted form is the historical method for command substitution,
and is supported by POSIX. However, all but the simplest uses become
complicated quickly. In particular, embedded command substitutions
and/or the use of double quotes require careful escaping with the backslash
character. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell. Because this construct uses distinct
opening and closing delimiters, it is much easier to follow.
Also now the embedded double quotes no longer need escaping.
The patch is simple but involves a large number of files with different authors.
Being simple I think it is wasteful to cc a large number of different people
for doing a review.
This is a second reroll after the
Matthieu Moy review. Changes from v1:
- Dropped the silly patches to t6111-rev-list-treesame.sh,
t0204-gettext-reencode-sanity.sh.
- Simple reformatting of the commit message.
- added the toy script used for doing the patch.
Elia Pinto (142):
check-builtins.sh: use the $( ... ) construct for command
substitution
git-am.sh: use the $( ... ) construct for command substitution
git-pull.sh: use the $( ... ) construct for command substitution
git-rebase--merge.sh: use the $( ... ) construct for command
substitution
git-rebase.sh: use the $( ... ) construct for command substitution
git-stash.sh: use the $( ... ) construct for command substitution
git-web--browse.sh: use the $( ... ) construct for command
substitution
unimplemented.sh: use the $( ... ) construct for command substitution
t0001-init.sh: use the $( ... ) construct for command substitution
t0010-racy-git.sh: use the $( ... ) construct for command
substitution
t0020-crlf.sh: use the $( ... ) construct for command substitution
t0025-crlf-auto.sh: use the $( ... ) construct for command
substitution
t0026-eol-config.sh: use the $( ... ) construct for command
substitution
t0030-stripspace.sh: use the $( ... ) construct for command
substitution
t0300-credentials.sh: use the $( ... ) construct for command
substitution
t1000-read-tree-m-3way.sh: use the $( ... ) construct for command
substitution
t1001-read-tree-m-2way.sh: use the $( ... ) construct for command
substitution
t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command
substitution
t1003-read-tree-prefix.sh: use the $( ... ) construct for command
substitution
t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command
substitution
t1020-subdirectory.sh: use the $( ... ) construct for command
substitution
t1050-large.sh: use the $( ... ) construct for command substitution
t1100-commit-tree-options.sh: use the $( ... ) construct for command
substitution
t1401-symbolic-ref.sh: use the $( ... ) construct for command
substitution
t1410-reflog.sh: use the $( ... ) construct for command substitution
t1511-rev-parse-caret.sh: use the $( ... ) construct for command
substitution
t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for
command substitution
t2102-update-index-symlinks.sh: use the $( ... ) construct for
command substitution
t3030-merge-recursive.sh: use the $( ... ) construct for command
substitution
t3100-ls-tree-restrict.sh: use the $( ... ) construct for command
substitution
t3101-ls-tree-dirname.sh: use the $( ... ) construct for command
substitution
t3210-pack-refs.sh: use the $( ... ) construct for command
substitution
t3403-rebase-skip.sh: use the $( ... ) construct for command
substitution
t3511-cherry-pick-x.sh: use the $( ... ) construct for command
substitution
t3600-rm.sh: use the $( ... ) construct for command substitution
t3700-add.sh: use the $( ... ) construct for command substitution
t3905-stash-include-untracked.sh: use the $( ... ) construct for
command substitution
t3910-mac-os-precompose.sh: use the $( ... ) construct for command
substitution
t4006-diff-mode.sh: use the $( ... ) construct for command
substitution
t4010-diff-pathspec.sh: use the $( ... ) construct for command
substitution
t4012-diff-binary.sh: use the $( ... ) construct for command
substitution
t4013-diff-various.sh: use the $( ... ) construct for command
substitution
t4014-format-patch.sh: use the $( ... ) construct for command
substitution
t4036-format-patch-signer-mime.sh: use the $( ... ) construct for
command substitution
t4038-diff-combined.sh: use the $( ... ) construct for command
substitution
t4057-diff-combined-paths.sh: use the $( ... ) construct for command
substitution
t4116-apply-reverse.sh: use the $( ... ) construct for command
substitution
t4119-apply-config.sh: use the $( ... ) construct for command
substitution
t4204-patch-id.sh: use the $( ... ) construct for command
substitution
t5000-tar-tree.sh: use the $( ... ) construct for command
substitution
t5003-archive-zip.sh: use the $( ... ) construct for command
substitution
t5100-mailinfo.sh: use the $( ... ) construct for command
substitution
t5300-pack-object.sh: use the $( ... ) construct for command
substitution
t5301-sliding-window.sh: use the $( ... ) construct for command
substitution
t5302-pack-index.sh: use the $( ... ) construct for command
substitution
t5303-pack-corruption-resilience.sh: use the $( ... ) construct for
command substitution
t5304-prune.sh: use the $( ... ) construct for command substitution
t5305-include-tag.sh: use the $( ... ) construct for command
substitution
t5500-fetch-pack.sh: use the $( ... ) construct for command
substitution
t5505-remote.sh: use the $( ... ) construct for command substitution
t5506-remote-groups.sh: use the $( ... ) construct for command
substitution
t5510-fetch.sh: use the $( ... ) construct for command substitution
t5515-fetch-merge-logic.sh: use the $( ... ) construct for command
substitution
t5516-fetch-push.sh: use the $( ... ) construct for command
substitution
t5517-push-mirror.sh: use the $( ... ) construct for command
substitution
t5520-pull.sh: use the $( ... ) construct for command substitution
t5522-pull-symlink.sh: use the $( ... ) construct for command
substitution
t5530-upload-pack-error.sh: use the $( ... ) construct for command
substitution
t5537-fetch-shallow.sh: use the $( ... ) construct for command
substitution
t5538-push-shallow.sh: use the $( ... ) construct for command
substitution
t5550-http-fetch-dumb.sh: use the $( ... ) construct for command
substitution
t5551-http-fetch-smart.sh: use the $( ... ) construct for command
substitution
t5570-git-daemon.sh: use the $( ... ) construct for command
substitution
t5601-clone.sh: use the $( ... ) construct for command substitution
t5700-clone-reference.sh: use the $( ... ) construct for command
substitution
t5710-info-alternate.sh: use the $( ... ) construct for command
substitution
t5900-repo-selection.sh: use the $( ... ) construct for command
substitution
t6001-rev-list-graft.sh: use the $( ... ) construct for command
substitution
t6002-rev-list-bisect.sh: use the $( ... ) construct for command
substitution
t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for
command substitution
t6032-merge-large-rename.sh: use the $( ... ) construct for command
substitution
t6034-merge-rename-nocruft.sh: use the $( ... ) construct for command
substitution
t6132-pathspec-exclude.sh: use the $( ... ) construct for command
substitution
t7001-mv.sh: use the $( ... ) construct for command substitution
t7003-filter-branch.sh: use the $( ... ) construct for command
substitution
t7004-tag.sh: use the $( ... ) construct for command substitution
t7006-pager.sh: use the $( ... ) construct for command substitution
t7103-reset-bare.sh: use the $( ... ) construct for command
substitution
t7406-submodule-update.sh: use the $( ... ) construct for command
substitution
t7408-submodule-reference.sh: use the $( ... ) construct for command
substitution
t7504-commit-msg-hook.sh: use the $( ... ) construct for command
substitution
t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for
command substitution
t7602-merge-octopus-many.sh: use the $( ... ) construct for command
substitution
t7700-repack.sh: use the $( ... ) construct for command substitution
t8003-blame-corner-cases.sh: use the $( ... ) construct for command
substitution
t9001-send-email.sh: use the $( ... ) construct for command
substitution
t9101-git-svn-props.sh: use the $( ... ) construct for command
substitution
t9104-git-svn-follow-parent.sh: use the $( ... ) construct for
command substitution
t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command
substitution
t9107-git-svn-migrate.sh: use the $( ... ) construct for command
substitution
t9108-git-svn-glob.sh: use the $( ... ) construct for command
substitution
t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command
substitution
t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for
command substitution
t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for
command substitution
t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for
command substitution
t9119-git-svn-info.sh: use the $( ... ) construct for command
substitution
t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for
command substitution
t9130-git-svn-authors-file.sh: use the $( ... ) construct for command
substitution
t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for
command substitution
t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct
for command substitution
t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command
substitution
t9145-git-svn-master-branch.sh: use the $( ... ) construct for
command substitution
t9150-svk-mergetickets.sh: use the $( ... ) construct for command
substitution
t9300-fast-import.sh: use the $( ... ) construct for command
substitution
t9350-fast-export.sh: use the $( ... ) construct for command
substitution
t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct
for command substitution
t9901-git-web--browse.sh: use the $( ... ) construct for command
substitution
test-lib-functions.sh: use the $( ... ) construct for command
substitution
lib-credential.sh: use the $( ... ) construct for command
substitution
lib-cvs.sh: use the $( ... ) construct for command substitution
lib-gpg.sh: use the $( ... ) construct for command substitution
p5302-pack-index.sh: use the $( ... ) construct for command
substitution
howto-index.sh: use the $( ... ) construct for command substitution
install-webdoc.sh: use the $( ... ) construct for command
substitution
git-checkout.sh: use the $( ... ) construct for command substitution
git-clone.sh: use the $( ... ) construct for command substitution
git-commit.sh: use the $( ... ) construct for command substitution
git-fetch.sh: use the $( ... ) construct for command substitution
git-ls-remote.sh: use the $( ... ) construct for command substitution
git-merge.sh: use the $( ... ) construct for command substitution
git-repack.sh: use the $( ... ) construct for command substitution
git-resolve.sh: use the $( ... ) construct for command substitution
git-revert.sh: use the $( ... ) construct for command substitution
git-tag.sh: use the $( ... ) construct for command substitution
t9360-mw-to-git-clone.sh: use the $( ... ) construct for command
substitution
t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command
substitution
t9365-continuing-queries.sh: use the $( ... ) construct for command
substitution
test-gitmw-lib.sh: use the $( ... ) construct for command
substitution
t7900-subtree.sh: use the $( ... ) construct for command substitution
appp.sh: use the $( ... ) construct for command substitution
txt-to-pot.sh: use the $( ... ) construct for command substitution
t9100-git-svn-basic.sh: use the $( ... ) construct for command
substitution
Documentation/howto-index.sh | 12 ++--
Documentation/install-webdoc.sh | 6 +-
check-builtins.sh | 4 +-
contrib/examples/git-checkout.sh | 8 +--
contrib/examples/git-clone.sh | 20 +++----
contrib/examples/git-commit.sh | 10 ++--
contrib/examples/git-fetch.sh | 6 +-
contrib/examples/git-ls-remote.sh | 4 +-
contrib/examples/git-merge.sh | 4 +-
contrib/examples/git-repack.sh | 2 +-
contrib/examples/git-resolve.sh | 2 +-
contrib/examples/git-revert.sh | 2 +-
contrib/examples/git-tag.sh | 2 +-
contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 14 ++---
contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 4 +-
contrib/mw-to-git/t/t9365-continuing-queries.sh | 2 +-
contrib/mw-to-git/t/test-gitmw-lib.sh | 6 +-
contrib/subtree/t/t7900-subtree.sh | 2 +-
contrib/thunderbird-patch-inline/appp.sh | 14 ++---
git-am.sh | 30 +++++-----
git-gui/po/glossary/txt-to-pot.sh | 4 +-
git-pull.sh | 2 +-
git-rebase--merge.sh | 4 +-
git-rebase.sh | 8 +--
git-stash.sh | 2 +-
git-web--browse.sh | 6 +-
t/lib-credential.sh | 2 +-
t/lib-cvs.sh | 2 +-
t/lib-gpg.sh | 2 +-
t/perf/p5302-pack-index.sh | 2 +-
t/t0001-init.sh | 12 ++--
t/t0010-racy-git.sh | 4 +-
t/t0020-crlf.sh | 42 +++++++-------
t/t0025-crlf-auto.sh | 38 ++++++-------
t/t0026-eol-config.sh | 20 +++----
t/t0030-stripspace.sh | 20 +++----
t/t0300-credentials.sh | 2 +-
t/t1000-read-tree-m-3way.sh | 4 +-
t/t1001-read-tree-m-2way.sh | 18 +++---
t/t1002-read-tree-m-u-2way.sh | 10 ++--
t/t1003-read-tree-prefix.sh | 2 +-
t/t1004-read-tree-m-u-wf.sh | 8 +--
t/t1020-subdirectory.sh | 22 ++++----
t/t1050-large.sh | 4 +-
t/t1100-commit-tree-options.sh | 4 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1410-reflog.sh | 24 ++++----
t/t1511-rev-parse-caret.sh | 4 +-
t/t1512-rev-parse-disambiguation.sh | 8 +--
t/t2102-update-index-symlinks.sh | 2 +-
t/t3030-merge-recursive.sh | 2 +-
t/t3100-ls-tree-restrict.sh | 2 +-
t/t3101-ls-tree-dirname.sh | 2 +-
t/t3210-pack-refs.sh | 2 +-
t/t3403-rebase-skip.sh | 2 +-
t/t3511-cherry-pick-x.sh | 14 ++---
t/t3600-rm.sh | 4 +-
t/t3700-add.sh | 16 +++---
t/t3905-stash-include-untracked.sh | 4 +-
t/t3910-mac-os-precompose.sh | 16 +++---
t/t4006-diff-mode.sh | 2 +-
t/t4010-diff-pathspec.sh | 4 +-
t/t4012-diff-binary.sh | 16 +++---
t/t4013-diff-various.sh | 6 +-
t/t4014-format-patch.sh | 10 ++--
t/t4036-format-patch-signer-mime.sh | 2 +-
t/t4038-diff-combined.sh | 2 +-
t/t4057-diff-combined-paths.sh | 2 +-
t/t4116-apply-reverse.sh | 12 ++--
t/t4119-apply-config.sh | 2 +-
t/t4204-patch-id.sh | 4 +-
t/t5000-tar-tree.sh | 6 +-
t/t5003-archive-zip.sh | 2 +-
t/t5100-mailinfo.sh | 12 ++--
t/t5300-pack-object.sh | 18 +++---
t/t5301-sliding-window.sh | 14 ++---
t/t5302-pack-index.sh | 34 ++++++------
t/t5303-pack-corruption-resilience.sh | 8 +--
t/t5304-prune.sh | 2 +-
t/t5305-include-tag.sh | 8 +--
t/t5500-fetch-pack.sh | 16 +++---
t/t5505-remote.sh | 2 +-
t/t5506-remote-groups.sh | 2 +-
t/t5510-fetch.sh | 10 ++--
t/t5515-fetch-merge-logic.sh | 4 +-
t/t5516-fetch-push.sh | 4 +-
t/t5517-push-mirror.sh | 2 +-
t/t5520-pull.sh | 10 ++--
t/t5522-pull-symlink.sh | 2 +-
t/t5530-upload-pack-error.sh | 2 +-
t/t5537-fetch-shallow.sh | 4 +-
t/t5538-push-shallow.sh | 4 +-
t/t5550-http-fetch-dumb.sh | 8 +--
t/t5551-http-fetch-smart.sh | 2 +-
t/t5570-git-daemon.sh | 8 +--
t/t5601-clone.sh | 2 +-
t/t5700-clone-reference.sh | 2 +-
t/t5710-info-alternate.sh | 2 +-
t/t5900-repo-selection.sh | 2 +-
t/t6001-rev-list-graft.sh | 12 ++--
t/t6002-rev-list-bisect.sh | 6 +-
t/t6015-rev-list-show-all-parents.sh | 6 +-
t/t6032-merge-large-rename.sh | 2 +-
t/t6034-merge-rename-nocruft.sh | 2 +-
t/t6132-pathspec-exclude.sh | 2 +-
t/t7001-mv.sh | 4 +-
t/t7003-filter-branch.sh | 6 +-
t/t7004-tag.sh | 16 +++---
t/t7006-pager.sh | 2 +-
t/t7103-reset-bare.sh | 2 +-
t/t7406-submodule-update.sh | 4 +-
t/t7408-submodule-reference.sh | 2 +-
t/t7504-commit-msg-hook.sh | 2 +-
t/t7505-prepare-commit-msg-hook.sh | 32 +++++------
t/t7602-merge-octopus-many.sh | 8 +--
t/t7700-repack.sh | 4 +-
t/t8003-blame-corner-cases.sh | 4 +-
t/t9001-send-email.sh | 10 ++--
t/t9100-git-svn-basic.sh | 24 ++++----
t/t9101-git-svn-props.sh | 30 +++++-----
t/t9104-git-svn-follow-parent.sh | 48 ++++++++--------
t/t9105-git-svn-commit-diff.sh | 4 +-
t/t9107-git-svn-migrate.sh | 16 +++---
t/t9108-git-svn-glob.sh | 20 +++----
t/t9109-git-svn-multi-glob.sh | 32 +++++------
t/t9110-git-svn-use-svm-props.sh | 2 +-
t/t9114-git-svn-dcommit-merge.sh | 12 ++--
t/t9118-git-svn-funky-branch-names.sh | 2 +-
t/t9119-git-svn-info.sh | 2 +-
t/t9129-git-svn-i18n-commitencoding.sh | 4 +-
t/t9130-git-svn-authors-file.sh | 12 ++--
t/t9132-git-svn-broken-symlink.sh | 4 +-
t/t9137-git-svn-dcommit-clobber-series.sh | 24 ++++----
t/t9138-git-svn-authors-prog.sh | 2 +-
t/t9145-git-svn-master-branch.sh | 4 +-
t/t9150-svk-mergetickets.sh | 2 +-
t/t9300-fast-import.sh | 68 +++++++++++------------
t/t9350-fast-export.sh | 6 +-
t/t9501-gitweb-standalone-http-status.sh | 6 +-
t/t9901-git-web--browse.sh | 2 +-
t/test-lib-functions.sh | 8 +--
unimplemented.sh | 2 +-
142 files changed, 609 insertions(+), 609 deletions(-)
--
1.7.10.4
^ permalink raw reply [relevance 2%]
* [PATCH 2/2] Don't rely on strerror text when testing rmdir failure
@ 2014-03-29 15:39 12% ` Charles Bailey
2014-03-29 15:48 0% ` Jens Lehmann
0 siblings, 1 reply; 200+ results
From: Charles Bailey @ 2014-03-29 15:39 UTC (permalink / raw)
To: git; +Cc: Charles Bailey
AIX doesn't make a distiction between EEXIST and ENOTEMPTY so relying on
the strerror string for the rmdir failure is fragile. Just test that the
start of the string matches the Git controlled "failed to rmdir..."
error. The exact text of the OS generated error string isn't important
to the test.
Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
---
t/t3600-rm.sh | 5 ++---
t/t7001-mv.sh | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 3d30581..23eed17 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -709,10 +709,9 @@ test_expect_success 'checking out a commit after submodule removal needs manual
git commit -m "submodule removal" submod &&
git checkout HEAD^ &&
git submodule update &&
- git checkout -q HEAD^ 2>actual &&
+ git checkout -q HEAD^ 2>/dev/null &&
git checkout -q master 2>actual &&
- echo "warning: unable to rmdir submod: Directory not empty" >expected &&
- test_i18ncmp expected actual &&
+ test_i18ngrep "^warning: unable to rmdir submod:" actual &&
git status -s submod >actual &&
echo "?? submod/" >expected &&
test_cmp expected actual &&
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 215d43d..34fb1af 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -447,8 +447,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
git mv sub sub2 &&
git commit -m "moved sub to sub2" &&
git checkout -q HEAD^ 2>actual &&
- echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
- test_i18ncmp expected actual &&
+ test_i18ngrep "^warning: unable to rmdir sub2:" actual &&
git status -s sub2 >actual &&
echo "?? sub2/" >expected &&
test_cmp expected actual &&
--
1.8.5.1.2.ge5d1dab
^ permalink raw reply related [relevance 12%]
* Re: [PATCH 2/2] Don't rely on strerror text when testing rmdir failure
2014-03-29 15:39 12% ` [PATCH 2/2] Don't rely on strerror text when testing rmdir failure Charles Bailey
@ 2014-03-29 15:48 0% ` Jens Lehmann
2014-03-31 17:35 0% ` Junio C Hamano
0 siblings, 1 reply; 200+ results
From: Jens Lehmann @ 2014-03-29 15:48 UTC (permalink / raw)
To: Charles Bailey, git
Am 29.03.2014 16:39, schrieb Charles Bailey:
> AIX doesn't make a distiction between EEXIST and ENOTEMPTY so relying on
> the strerror string for the rmdir failure is fragile. Just test that the
> start of the string matches the Git controlled "failed to rmdir..."
> error. The exact text of the OS generated error string isn't important
> to the test.
Makes sense.
> Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
> ---
> t/t3600-rm.sh | 5 ++---
> t/t7001-mv.sh | 3 +--
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
> index 3d30581..23eed17 100755
> --- a/t/t3600-rm.sh
> +++ b/t/t3600-rm.sh
> @@ -709,10 +709,9 @@ test_expect_success 'checking out a commit after submodule removal needs manual
> git commit -m "submodule removal" submod &&
> git checkout HEAD^ &&
> git submodule update &&
> - git checkout -q HEAD^ 2>actual &&
> + git checkout -q HEAD^ 2>/dev/null &&
Isn't this unrelated to the strerror issue you are fixing here?
Why not just drop the redirection completely? But maybe I'm just
being to pedantic here ;-)
> git checkout -q master 2>actual &&
> - echo "warning: unable to rmdir submod: Directory not empty" >expected &&
> - test_i18ncmp expected actual &&
> + test_i18ngrep "^warning: unable to rmdir submod:" actual &&
> git status -s submod >actual &&
> echo "?? submod/" >expected &&
> test_cmp expected actual &&
> diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
> index 215d43d..34fb1af 100755
> --- a/t/t7001-mv.sh
> +++ b/t/t7001-mv.sh
> @@ -447,8 +447,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
> git mv sub sub2 &&
> git commit -m "moved sub to sub2" &&
> git checkout -q HEAD^ 2>actual &&
> - echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
> - test_i18ncmp expected actual &&
> + test_i18ngrep "^warning: unable to rmdir sub2:" actual &&
> git status -s sub2 >actual &&
> echo "?? sub2/" >expected &&
> test_cmp expected actual &&
>
^ permalink raw reply [relevance 0%]
* Re: [PATCH 2/2] Don't rely on strerror text when testing rmdir failure
2014-03-29 15:48 0% ` Jens Lehmann
@ 2014-03-31 17:35 0% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2014-03-31 17:35 UTC (permalink / raw)
To: Jens Lehmann; +Cc: Charles Bailey, git
Jens Lehmann <Jens.Lehmann@web.de> writes:
> Am 29.03.2014 16:39, schrieb Charles Bailey:
>> AIX doesn't make a distiction between EEXIST and ENOTEMPTY so relying on
>> the strerror string for the rmdir failure is fragile. Just test that the
>> start of the string matches the Git controlled "failed to rmdir..."
>> error. The exact text of the OS generated error string isn't important
>> to the test.
>
> Makes sense.
>
>> Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
>> ---
>> t/t3600-rm.sh | 5 ++---
>> t/t7001-mv.sh | 3 +--
>> 2 files changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
>> index 3d30581..23eed17 100755
>> --- a/t/t3600-rm.sh
>> +++ b/t/t3600-rm.sh
>> @@ -709,10 +709,9 @@ test_expect_success 'checking out a commit after submodule removal needs manual
>> git commit -m "submodule removal" submod &&
>> git checkout HEAD^ &&
>> git submodule update &&
>> - git checkout -q HEAD^ 2>actual &&
>> + git checkout -q HEAD^ 2>/dev/null &&
>
> Isn't this unrelated to the strerror issue you are fixing here?
> Why not just drop the redirection completely? But maybe I'm just
> being to pedantic here ;-)
No, that sounds like a very reasonable suggestion. Especially given
that the redirection destination is overwritten immediately after.
In general tests should not have to squelch their standard error
output with 2>/dev/null; that is a job for the test harness, and
they will be shown in the output of "./t3600-rm -v" to serve as
anchor point while finding where a test goes wrong, which is a good
thing.
^ permalink raw reply [relevance 0%]
* Patch Series v3 for "use the $( ... ) construct for command substitution"
@ 2014-04-04 16:52 2% Elia Pinto
0 siblings, 0 replies; 200+ results
From: Elia Pinto @ 2014-04-04 16:52 UTC (permalink / raw)
To: git@vger.kernel.org; +Cc: Matthieu Moy, Eric Sunshine
This patch series contain the
use the $( ... ) construct for command substitution
patches not already merged in ep/shell-command-substitution
in the mantainer repository. It is the version 3 of the
patch series.
I changed the commit message in accordance with those approved,
and I have rebased the patches to the master branch, adjusting where
necessary any conflicts. The patches can be applied also to pu and next.
I hope this is a better way to send the (a long) patch series to git.
Best Regards
------
The following changes since commit 82edd396632501b3dd1901d0f3ae5aa72759b5fb:
Update draft release notes to 2.0 (2014-04-03 13:40:59 -0700)
are available in the git repository at:
git@github.com:devzero2000/git-core.git ep/shell-command-substitution-v3
for you to fetch changes up to a4f27b5de27b9848c0720ac2c74a3b82c2531122:
t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for
command substitution (2014-04-04 08:03:33 -0700)
----------------------------------------------------------------
Elia Pinto (140):
howto-index.sh: use the $( ... ) construct for command substitution
install-webdoc.sh: use the $( ... ) construct for command substitution
git-checkout.sh: use the $( ... ) construct for command substitution
git-clone.sh: use the $( ... ) construct for command substitution
git-commit.sh: use the $( ... ) construct for command substitution
git-fetch.sh: use the $( ... ) construct for command substitution
git-ls-remote.sh: use the $( ... ) construct for command substitution
git-merge.sh: use the $( ... ) construct for command substitution
git-repack.sh: use the $( ... ) construct for command substitution
git-resolve.sh: use the $( ... ) construct for command substitution
git-revert.sh: use the $( ... ) construct for command substitution
git-tag.sh: use the $( ... ) construct for command substitution
t9360-mw-to-git-clone.sh: use the $( ... ) construct for command
substitution
t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command
substitution
t9365-continuing-queries.sh: use the $( ... ) construct for
command substitution
test-gitmw-lib.sh: use the $( ... ) construct for command substitution
t7900-subtree.sh: use the $( ... ) construct for command substitution
appp.sh: use the $( ... ) construct for command substitution
txt-to-pot.sh: use the $( ... ) construct for command substitution
git-pull.sh: use the $( ... ) construct for command substitution
git-rebase--merge.sh: use the $( ... ) construct for command substitution
git-rebase.sh: use the $( ... ) construct for command substitution
git-stash.sh: use the $( ... ) construct for command substitution
git-web--browse.sh: use the $( ... ) construct for command substitution
lib-credential.sh: use the $( ... ) construct for command substitution
lib-cvs.sh: use the $( ... ) construct for command substitution
lib-gpg.sh: use the $( ... ) construct for command substitution
p5302-pack-index.sh: use the $( ... ) construct for command substitution
t0001-init.sh: use the $( ... ) construct for command substitution
t0010-racy-git.sh: use the $( ... ) construct for command substitution
t0020-crlf.sh: use the $( ... ) construct for command substitution
t0025-crlf-auto.sh: use the $( ... ) construct for command substitution
t0026-eol-config.sh: use the $( ... ) construct for command substitution
t0030-stripspace.sh: use the $( ... ) construct for command substitution
t0300-credentials.sh: use the $( ... ) construct for command substitution
t1000-read-tree-m-3way.sh: use the $( ... ) construct for
command substitution
t1001-read-tree-m-2way.sh: use the $( ... ) construct for
command substitution
t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for
command substitution
t1003-read-tree-prefix.sh: use the $( ... ) construct for
command substitution
t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for
command substitution
t1020-subdirectory.sh: use the $( ... ) construct for command substitution
t1050-large.sh: use the $( ... ) construct for command substitution
t1100-commit-tree-options.sh: use the $( ... ) construct for
command substitution
t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
t1410-reflog.sh: use the $( ... ) construct for command substitution
t1511-rev-parse-caret.sh: use the $( ... ) construct for command
substitution
t1512-rev-parse-disambiguation.sh: use the $( ... ) construct
for command substitution
t2102-update-index-symlinks.sh: use the $( ... ) construct for
command substitution
t3030-merge-recursive.sh: use the $( ... ) construct for command
substitution
t3100-ls-tree-restrict.sh: use the $( ... ) construct for
command substitution
t3101-ls-tree-dirname.sh: use the $( ... ) construct for command
substitution
t3210-pack-refs.sh: use the $( ... ) construct for command substitution
t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
t3511-cherry-pick-x.sh: use the $( ... ) construct for command
substitution
t3600-rm.sh: use the $( ... ) construct for command substitution
t3700-add.sh: use the $( ... ) construct for command substitution
t3905-stash-include-untracked.sh: use the $( ... ) construct for
command substitution
t3910-mac-os-precompose.sh: use the $( ... ) construct for
command substitution
t4006-diff-mode.sh: use the $( ... ) construct for command substitution
t4010-diff-pathspec.sh: use the $( ... ) construct for command
substitution
t4012-diff-binary.sh: use the $( ... ) construct for command substitution
t4013-diff-various.sh: use the $( ... ) construct for command substitution
t4014-format-patch.sh: use the $( ... ) construct for command substitution
t4036-format-patch-signer-mime.sh: use the $( ... ) construct
for command substitution
t4038-diff-combined.sh: use the $( ... ) construct for command
substitution
t4057-diff-combined-paths.sh: use the $( ... ) construct for
command substitution
t4116-apply-reverse.sh: use the $( ... ) construct for command
substitution
t4119-apply-config.sh: use the $( ... ) construct for command substitution
t4204-patch-id.sh: use the $( ... ) construct for command substitution
t5000-tar-tree.sh: use the $( ... ) construct for command substitution
t5003-archive-zip.sh: use the $( ... ) construct for command substitution
t5100-mailinfo.sh: use the $( ... ) construct for command substitution
t5300-pack-object.sh: use the $( ... ) construct for command substitution
t5301-sliding-window.sh: use the $( ... ) construct for command
substitution
t5302-pack-index.sh: use the $( ... ) construct for command substitution
t5303-pack-corruption-resilience.sh: use the $( ... ) construct
for command substitution
t5304-prune.sh: use the $( ... ) construct for command substitution
t5305-include-tag.sh: use the $( ... ) construct for command substitution
t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
t5505-remote.sh: use the $( ... ) construct for command substitution
t5506-remote-groups.sh: use the $( ... ) construct for command
substitution
t5510-fetch.sh: use the $( ... ) construct for command substitution
t5515-fetch-merge-logic.sh: use the $( ... ) construct for
command substitution
t5516-fetch-push.sh: use the $( ... ) construct for command substitution
t5517-push-mirror.sh: use the $( ... ) construct for command substitution
t5520-pull.sh: use the $( ... ) construct for command substitution
t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
t5530-upload-pack-error.sh: use the $( ... ) construct for
command substitution
t5537-fetch-shallow.sh: use the $( ... ) construct for command
substitution
t5538-push-shallow.sh: use the $( ... ) construct for command substitution
t5550-http-fetch-dumb.sh: use the $( ... ) construct for command
substitution
t5551-http-fetch-smart.sh: use the $( ... ) construct for
command substitution
t5570-git-daemon.sh: use the $( ... ) construct for command substitution
t5601-clone.sh: use the $( ... ) construct for command substitution
t5700-clone-reference.sh: use the $( ... ) construct for command
substitution
t5710-info-alternate.sh: use the $( ... ) construct for command
substitution
t5900-repo-selection.sh: use the $( ... ) construct for command
substitution
t6001-rev-list-graft.sh: use the $( ... ) construct for command
substitution
t6002-rev-list-bisect.sh: use the $( ... ) construct for command
substitution
t6015-rev-list-show-all-parents.sh: use the $( ... ) construct
for command substitution
t6032-merge-large-rename.sh: use the $( ... ) construct for
command substitution
t6034-merge-rename-nocruft.sh: use the $( ... ) construct for
command substitution
t6132-pathspec-exclude.sh: use the $( ... ) construct for
command substitution
t7001-mv.sh: use the $( ... ) construct for command substitution
t7003-filter-branch.sh: use the $( ... ) construct for command
substitution
t7004-tag.sh: use the $( ... ) construct for command substitution
t7006-pager.sh: use the $( ... ) construct for command substitution
t7103-reset-bare.sh: use the $( ... ) construct for command substitution
t7406-submodule-update.sh: use the $( ... ) construct for
command substitution
t7408-submodule-reference.sh: use the $( ... ) construct for
command substitution
t7504-commit-msg-hook.sh: use the $( ... ) construct for command
substitution
t7602-merge-octopus-many.sh: use the $( ... ) construct for
command substitution
t7700-repack.sh: use the $( ... ) construct for command substitution
t8003-blame-corner-cases.sh: use the $( ... ) construct for
command substitution
t9001-send-email.sh: use the $( ... ) construct for command substitution
t9100-git-svn-basic.sh: use the $( ... ) construct for command
substitution
t9101-git-svn-props.sh: use the $( ... ) construct for command
substitution
t9104-git-svn-follow-parent.sh: use the $( ... ) construct for
command substitution
t9105-git-svn-commit-diff.sh: use the $( ... ) construct for
command substitution
t9107-git-svn-migrate.sh: use the $( ... ) construct for command
substitution
t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution
t9109-git-svn-multi-glob.sh: use the $( ... ) construct for
command substitution
t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for
command substitution
t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for
command substitution
t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct
for command substitution
t9119-git-svn-info.sh: use the $( ... ) construct for command substitution
t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct
for command substitution
t9130-git-svn-authors-file.sh: use the $( ... ) construct for
command substitution
t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for
command substitution
t9137-git-svn-dcommit-clobber-series.sh: use the $( ... )
construct for command substitution
t9138-git-svn-authors-prog.sh: use the $( ... ) construct for
command substitution
t9145-git-svn-master-branch.sh: use the $( ... ) construct for
command substitution
t9150-svk-mergetickets.sh: use the $( ... ) construct for
command substitution
t9300-fast-import.sh: use the $( ... ) construct for command substitution
t9350-fast-export.sh: use the $( ... ) construct for command substitution
t9501-gitweb-standalone-http-status.sh: use the $( ... )
construct for command substitution
t9901-git-web--browse.sh: use the $( ... ) construct for command
substitution
test-lib-functions.sh: use the $( ... ) construct for command substitution
unimplemented.sh: use the $( ... ) construct for command substitution
t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for
command substitution
Documentation/howto-index.sh | 12 ++--
Documentation/install-webdoc.sh | 6 +-
contrib/examples/git-checkout.sh | 8 +--
contrib/examples/git-clone.sh | 20 +++----
contrib/examples/git-commit.sh | 10 ++--
contrib/examples/git-fetch.sh | 6 +-
contrib/examples/git-ls-remote.sh | 4 +-
contrib/examples/git-merge.sh | 4 +-
contrib/examples/git-repack.sh | 2 +-
contrib/examples/git-resolve.sh | 2 +-
contrib/examples/git-revert.sh | 2 +-
contrib/examples/git-tag.sh | 2 +-
contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 14 ++---
contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 4 +-
contrib/mw-to-git/t/t9365-continuing-queries.sh | 2 +-
contrib/mw-to-git/t/test-gitmw-lib.sh | 6 +-
contrib/subtree/t/t7900-subtree.sh | 2 +-
contrib/thunderbird-patch-inline/appp.sh | 14 ++---
git-gui/po/glossary/txt-to-pot.sh | 4 +-
git-pull.sh | 2 +-
git-rebase--merge.sh | 4 +-
git-rebase.sh | 8 +--
git-stash.sh | 2 +-
git-web--browse.sh | 6 +-
t/lib-credential.sh | 2 +-
t/lib-cvs.sh | 2 +-
t/lib-gpg.sh | 2 +-
t/perf/p5302-pack-index.sh | 2 +-
t/t0001-init.sh | 12 ++--
t/t0010-racy-git.sh | 4 +-
t/t0020-crlf.sh | 42 +++++++-------
t/t0025-crlf-auto.sh | 38 ++++++-------
t/t0026-eol-config.sh | 20 +++----
t/t0030-stripspace.sh | 20 +++----
t/t0300-credentials.sh | 2 +-
t/t1000-read-tree-m-3way.sh | 4 +-
t/t1001-read-tree-m-2way.sh | 18 +++---
t/t1002-read-tree-m-u-2way.sh | 10 ++--
t/t1003-read-tree-prefix.sh | 2 +-
t/t1004-read-tree-m-u-wf.sh | 8 +--
t/t1020-subdirectory.sh | 22 ++++----
t/t1050-large.sh | 4 +-
t/t1100-commit-tree-options.sh | 4 +-
t/t1401-symbolic-ref.sh | 2 +-
t/t1410-reflog.sh | 24 ++++----
t/t1511-rev-parse-caret.sh | 4 +-
t/t1512-rev-parse-disambiguation.sh | 8 +--
t/t2102-update-index-symlinks.sh | 2 +-
t/t3030-merge-recursive.sh | 2 +-
t/t3100-ls-tree-restrict.sh | 2 +-
t/t3101-ls-tree-dirname.sh | 2 +-
t/t3210-pack-refs.sh | 2 +-
t/t3403-rebase-skip.sh | 2 +-
t/t3511-cherry-pick-x.sh | 14 ++---
t/t3600-rm.sh | 4 +-
t/t3700-add.sh | 16 +++---
t/t3905-stash-include-untracked.sh | 4 +-
t/t3910-mac-os-precompose.sh | 16 +++---
t/t4006-diff-mode.sh | 2 +-
t/t4010-diff-pathspec.sh | 4 +-
t/t4012-diff-binary.sh | 16 +++---
t/t4013-diff-various.sh | 6 +-
t/t4014-format-patch.sh | 10 ++--
t/t4036-format-patch-signer-mime.sh | 2 +-
t/t4038-diff-combined.sh | 2 +-
t/t4057-diff-combined-paths.sh | 2 +-
t/t4116-apply-reverse.sh | 12 ++--
t/t4119-apply-config.sh | 2 +-
t/t4204-patch-id.sh | 4 +-
t/t5000-tar-tree.sh | 6 +-
t/t5003-archive-zip.sh | 2 +-
t/t5100-mailinfo.sh | 12 ++--
t/t5300-pack-object.sh | 18 +++---
t/t5301-sliding-window.sh | 14 ++---
t/t5302-pack-index.sh | 34 ++++++------
t/t5303-pack-corruption-resilience.sh | 8 +--
t/t5304-prune.sh | 2 +-
t/t5305-include-tag.sh | 8 +--
t/t5500-fetch-pack.sh | 16 +++---
t/t5505-remote.sh | 2 +-
t/t5506-remote-groups.sh | 2 +-
t/t5510-fetch.sh | 10 ++--
t/t5515-fetch-merge-logic.sh | 4 +-
t/t5516-fetch-push.sh | 4 +-
t/t5517-push-mirror.sh | 2 +-
t/t5520-pull.sh | 10 ++--
t/t5522-pull-symlink.sh | 2 +-
t/t5530-upload-pack-error.sh | 2 +-
t/t5537-fetch-shallow.sh | 4 +-
t/t5538-push-shallow.sh | 4 +-
t/t5550-http-fetch-dumb.sh | 8 +--
t/t5551-http-fetch-smart.sh | 2 +-
t/t5570-git-daemon.sh | 8 +--
t/t5601-clone.sh | 2 +-
t/t5700-clone-reference.sh | 2 +-
t/t5710-info-alternate.sh | 2 +-
t/t5900-repo-selection.sh | 2 +-
t/t6001-rev-list-graft.sh | 12 ++--
t/t6002-rev-list-bisect.sh | 6 +-
t/t6015-rev-list-show-all-parents.sh | 6 +-
t/t6032-merge-large-rename.sh | 2 +-
t/t6034-merge-rename-nocruft.sh | 2 +-
t/t6132-pathspec-exclude.sh | 2 +-
t/t7001-mv.sh | 4 +-
t/t7003-filter-branch.sh | 6 +-
t/t7004-tag.sh | 16 +++---
t/t7006-pager.sh | 2 +-
t/t7103-reset-bare.sh | 2 +-
t/t7406-submodule-update.sh | 4 +-
t/t7408-submodule-reference.sh | 2 +-
t/t7504-commit-msg-hook.sh | 2 +-
t/t7505-prepare-commit-msg-hook.sh | 32 +++++------
t/t7602-merge-octopus-many.sh | 8 +--
t/t7700-repack.sh | 4 +-
t/t8003-blame-corner-cases.sh | 4 +-
t/t9001-send-email.sh | 10 ++--
t/t9100-git-svn-basic.sh | 24 ++++----
t/t9101-git-svn-props.sh | 30 +++++-----
t/t9104-git-svn-follow-parent.sh | 48 ++++++++--------
t/t9105-git-svn-commit-diff.sh | 4 +-
t/t9107-git-svn-migrate.sh | 16 +++---
t/t9108-git-svn-glob.sh | 20 +++----
t/t9109-git-svn-multi-glob.sh | 32 +++++------
t/t9110-git-svn-use-svm-props.sh | 2 +-
t/t9114-git-svn-dcommit-merge.sh | 12 ++--
t/t9118-git-svn-funky-branch-names.sh | 2 +-
t/t9119-git-svn-info.sh | 2 +-
t/t9129-git-svn-i18n-commitencoding.sh | 4 +-
t/t9130-git-svn-authors-file.sh | 12 ++--
t/t9132-git-svn-broken-symlink.sh | 4 +-
t/t9137-git-svn-dcommit-clobber-series.sh | 24 ++++----
t/t9138-git-svn-authors-prog.sh | 2 +-
t/t9145-git-svn-master-branch.sh | 4 +-
t/t9150-svk-mergetickets.sh | 2 +-
t/t9300-fast-import.sh | 68 +++++++++++------------
t/t9350-fast-export.sh | 6 +-
t/t9501-gitweb-standalone-http-status.sh | 6 +-
t/t9901-git-web--browse.sh | 2 +-
t/test-lib-functions.sh | 8 +--
unimplemented.sh | 2 +-
140 files changed, 592 insertions(+), 592 deletions(-)
^ permalink raw reply [relevance 2%]
* [PATCH] test: fix t7001 cp to use POSIX options
@ 2014-04-11 8:24 19% Kyle J. McKay
2014-04-11 11:43 6% ` Jeff King
0 siblings, 1 reply; 200+ results
From: Kyle J. McKay @ 2014-04-11 8:24 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jens Lehmann
Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the
t7001-mv test has used "cp -a" to perform a copy in several of the
tests.
However, the "-a" option is not required for a POSIX cp utility and
some platforms' cp utilities do not support it.
The POSIX equivalent of -a is -R -P -p.
Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works
on systems with a cp utility that only implements the POSIX
required set of options and not the "-a" option.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
t/t7001-mv.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 215d43d6..c8ff9115 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -308,7 +308,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
(
cd sub &&
rm -f .git &&
- cp -a ../.git/modules/sub .git &&
+ cp -R -P -p ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
@@ -331,7 +331,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
(
cd sub &&
rm -f .git &&
- cp -a ../.git/modules/sub .git &&
+ cp -R -P -p ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
--
tg: (0bc85abb..) t/t7001-posix-cp (depends on: maint)
^ permalink raw reply related [relevance 19%]
* Re: [PATCH] test: fix t7001 cp to use POSIX options
2014-04-11 8:24 19% [PATCH] test: fix t7001 cp to use POSIX options Kyle J. McKay
@ 2014-04-11 11:43 6% ` Jeff King
2014-04-11 13:44 18% ` Kyle J. McKay
2014-04-11 19:23 5% ` Junio C Hamano
0 siblings, 2 replies; 200+ results
From: Jeff King @ 2014-04-11 11:43 UTC (permalink / raw)
To: Kyle J. McKay; +Cc: git, Junio C Hamano, Jens Lehmann
On Fri, Apr 11, 2014 at 01:24:02AM -0700, Kyle J. McKay wrote:
> Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the
> t7001-mv test has used "cp -a" to perform a copy in several of the
> tests.
>
> However, the "-a" option is not required for a POSIX cp utility and
> some platforms' cp utilities do not support it.
>
> The POSIX equivalent of -a is -R -P -p.
>
> Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works
> on systems with a cp utility that only implements the POSIX
> required set of options and not the "-a" option.
I wonder if the "-R" is the part that we actually care about here.
Including the others does not hurt in that case, but using only "-R"
would perhaps make it more obvious to a later reader of the code exactly
what we are trying to do.
-Peff
^ permalink raw reply [relevance 6%]
* Re: [PATCH] test: fix t7001 cp to use POSIX options
2014-04-11 11:43 6% ` Jeff King
@ 2014-04-11 13:44 18% ` Kyle J. McKay
2014-04-11 19:23 5% ` Junio C Hamano
1 sibling, 0 replies; 200+ results
From: Kyle J. McKay @ 2014-04-11 13:44 UTC (permalink / raw)
To: Jeff King; +Cc: git, Junio C Hamano, Jens Lehmann
On Apr 11, 2014, at 04:43, Jeff King wrote:
> On Fri, Apr 11, 2014 at 01:24:02AM -0700, Kyle J. McKay wrote:
>
>> Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the
>> t7001-mv test has used "cp -a" to perform a copy in several of the
>> tests.
>>
>> However, the "-a" option is not required for a POSIX cp utility and
>> some platforms' cp utilities do not support it.
>>
>> The POSIX equivalent of -a is -R -P -p.
>>
>> Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works
>> on systems with a cp utility that only implements the POSIX
>> required set of options and not the "-a" option.
>
> I wonder if the "-R" is the part that we actually care about here.
> Including the others does not hurt in that case, but using only "-R"
> would perhaps make it more obvious to a later reader of the code
> exactly
> what we are trying to do.
I was wondering the same thing myself, but Jens is on the Cc: list and
added both of those, so I'm hoping he'll pipe in here about that. I
did notice that the other test scripts seem to only use -R, so that
would definitely be a more consistent change to match the rest of the
tests.
In any case v2 of the patch with just -R is attached below. It seems
to pass the tests so it's probably fine.
--Kyle
---- 8< ----
Subject: [PATCH v2] test: fix t7001 cp to use POSIX options
Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the
t7001-mv test has used "cp -a" to perform a copy in several of the
tests.
However, the "-a" option is not required for a POSIX cp utility and
some platforms' cp utilities do not support it.
The POSIX equivalent of -a is -R -P -p, but the only option we
actually care about for the test is -R.
Change "cp -a" to "cp -R" so that the t7001-mv test works
on systems with a cp utility that only implements the POSIX
required set of options and not the "-a" option.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
t/t7001-mv.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 215d43d6..675ca5bd 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -308,7 +308,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
(
cd sub &&
rm -f .git &&
- cp -a ../.git/modules/sub .git &&
+ cp -R ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
@@ -331,7 +331,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
(
cd sub &&
rm -f .git &&
- cp -a ../.git/modules/sub .git &&
+ cp -R ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
--
tg: (0bc85abb..) t/t7001-posix-cp (depends on: maint)
^ permalink raw reply related [relevance 18%]
* Re: [PATCH] test: fix t7001 cp to use POSIX options
2014-04-11 11:43 6% ` Jeff King
2014-04-11 13:44 18% ` Kyle J. McKay
@ 2014-04-11 19:23 5% ` Junio C Hamano
2014-04-12 21:52 6% ` Jens Lehmann
1 sibling, 1 reply; 200+ results
From: Junio C Hamano @ 2014-04-11 19:23 UTC (permalink / raw)
To: Jeff King; +Cc: Kyle J. McKay, git, Jens Lehmann
Jeff King <peff@peff.net> writes:
> On Fri, Apr 11, 2014 at 01:24:02AM -0700, Kyle J. McKay wrote:
>
>> Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the
>> t7001-mv test has used "cp -a" to perform a copy in several of the
>> tests.
>>
>> However, the "-a" option is not required for a POSIX cp utility and
>> some platforms' cp utilities do not support it.
>>
>> The POSIX equivalent of -a is -R -P -p.
>>
>> Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works
>> on systems with a cp utility that only implements the POSIX
>> required set of options and not the "-a" option.
>
> I wonder if the "-R" is the part that we actually care about here.
> Including the others does not hurt in that case, but using only "-R"
> would perhaps make it more obvious to a later reader of the code exactly
> what we are trying to do.
These calls to "cp" are about "We know that earlier 'update' created
the GIT_DIR of the submodule in the top-level superproject, because
we are running a modern Git. But we want to make sure the command
we are testing, "git mv", would work correctly if the repository
were made with an older Git that created the GIT_DIR embedded in the
working tree of the submodule, so let's emulate that case." As we
create files and directories in GIT_DIR with explicit permission
bits, we may care about
(1) making sure "git mv" can actually move the directory, with some
paths having mode bits different from the umasked default; and
(2) checking that the GIT_DIR after "git mv" has the permission
bits right.
and if we cared, "-R -p" would be required here, not just "-R".
If core.prefersymlinkrefs is set, GIT_DIR would have a symbolic link
HEAD pointing at the current branch, and "-P" may become relevant,
but manually running "cp -R .git git && ls -l git/HEAD" in such an
old repository tells me that symbolic link HEAD is not dereferenced
without an explicit "-L", so I dunno.
Because we do not check anything inside GIT_DIR of the moved
submodule after "git mv" is done, the more correct use of "cp" is
moot for the purpose of (2), but it could be possible that "git mv"
fails to move a submodule with GIT_DIR created embedded in its
working tree by an older version of Git, while successfully copying
an emulated one, due to differences such as modes and symlinks.
The current implementation just does rename(2) on the whole
submodule working tree and let its contents move together, so I do
not think it matters at the moment for the purpose of (1); use of
flags other than "-R" are purely for future-proofing, I would think.
^ permalink raw reply [relevance 5%]
* What's cooking in git.git (Apr 2014, #03; Fri, 11)
@ 2014-04-11 22:22 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2014-04-11 22:22 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
The number of topics cooking in 'next' has been shrinking, and the
cycle is getting long. Hopefully we will have -rc0 late next week to
close the 'master' branch and a few rounds of -rc iterations until
2.0 final. Other topics under discussion may continue to flow to
'next', as usual, during that time, to be pushed out early in the
next cycle.
You can find the changes described here in the integration branches
of the repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[New Topics]
* nd/index-pack-one-fd-per-thread (2014-04-09) 1 commit
- index-pack: work around thread-unsafe pread()
Enable threaded index-pack on platforms without thread-unsafe
pread() emulation.
Will merge to 'next' and keep it there for the remainder of the cycle.
* tb/unicode-6.3-zero-width (2014-04-09) 1 commit
- utf8.c: partially update to version 6.3
Teach our display-column-counting logic about decomposed umlauts
and friends.
Will merge to 'next'.
* fc/complete-aliased-push (2014-04-09) 1 commit
- completion: fix completing args of aliased "push", "fetch", etc.
Will merge to 'next'.
* fc/remote-helper-fixes (2014-04-09) 4 commits
- remote-bzr: include authors field in pushed commits
- remote-bzr: add support for older versions
- remote-hg: always normalize paths
- remote-helpers: allow all tests running from any dir
Will merge to 'next'.
* fc/publish-vs-upstream (2014-04-11) 8 commits
- sha1_name: add support for @{publish} marks
- sha1_name: simplify track finding
- sha1_name: cleanup interpret_branch_name()
- branch: display publish branch
- push: add --set-publish option
- branch: add --set-publish-to option
- Add concept of 'publish' branch
- t5516 (fetch-push): fix test restoration
Add branch@{publish}; this round v3 hasn't yet seen much reviews
yet.
Seems to have some interactions to break tests when merged to 'pu'.
* ym/fix-opportunistic-index-update-race (2014-04-10) 2 commits
- read-cache.c: verify index file before we opportunistically update it
- wrapper.c: add xpread() similar to xread()
Duy raised a good point that we may need to do the same for the
normal writeout codepath, not just the "opportunistic" update
codepath. While that is true, nobody sane would be running two
simultaneous operations that are clearly write-oriented competing
with each other against the same index file. So in that sense that
can be done as a less urgent follow-up for this topic.
* km/avoid-bs-in-shell-glob (2014-04-11) 1 commit
- test: fix t5560 on FreeBSD
Portability fix.
Will merge to 'next' and to 'master'.
* km/avoid-cp-a (2014-04-11) 1 commit
- test: fix t7001 cp to use POSIX options
Portability fix.
Will merge to 'next' and hopefully to 'master'.
* rs/ref-closer-to-atomic (2014-04-11) 3 commits
- refs.c: change ref_transaction_commit to run the commit loops once all work is finished
- refs.c: split delete_ref_loose() into a separate flag-for-deletion and commit phase
- refs.c: split writing and commiting a ref into two separate functions
(this branch uses mh/ref-transaction.)
Builds on top of Michael's ref-transaction series to shrink the
race window during multiple ref updates.
Appears to break some tests even standalone, and somewhat conflicts
with Michael's mh/lockfile topic when merging to 'pu'.
--------------------------------------------------
[Graduated to "master"]
* ib/rev-parse-parseopt-argh (2014-04-01) 1 commit
(merged to 'next' on 2014-04-01 at 025578d)
+ rev-parse: fix typo in example on manpage
Finishing touch to a new topic scheduled for 2.0
* jc/rev-parse-argh-dashed-multi-words (2014-03-24) 3 commits
(merged to 'next' on 2014-03-31 at 1c48649)
+ parse-options: make sure argh string does not have SP or _
+ update-index: teach --cacheinfo a new syntax "mode,sha1,path"
+ parse-options: multi-word argh should use dash to separate words
Make sure that the help text given to describe the "<param>" part
of the "git cmd --option=<param>" does not contain SP or _,
e.g. "--gpg-sign=<key-id>" option for "git commit" is not spelled
as "--gpg-sign=<key id>".
* jk/commit-dates-parsing-fix (2014-04-01) 2 commits
(merged to 'next' on 2014-04-04 at c16eeb0)
+ t4212: loosen far-in-future test for AIX
+ date: recognize bogus FreeBSD gmtime output
Finishing touches for portability.
* jk/pack-bitmap (2014-04-04) 2 commits
(merged to 'next' on 2014-04-04 at 0306834)
+ pack-objects: do not reuse packfiles without --delta-base-offset
+ add `ignore_missing_links` mode to revwalk
Fixes the pack-bitmap already in 'master'.
* jl/nor-or-nand-and (2014-03-31) 4 commits
(merged to 'next' on 2014-04-04 at b5d1ac5)
+ code and test: fix misuses of "nor"
+ comments: fix misuses of "nor"
+ contrib: fix misuses of "nor"
+ Documentation: fix misuses of "nor"
Eradicate mistaken use of "nor" (that is, essentially "nor" used
not in "neither A nor B" ;-)) from in-code comments, command output
strings, and documentations.
* mh/update-ref-batch-create-fix (2014-04-02) 1 commit
(merged to 'next' on 2014-04-04 at 97e3f12)
+ update-ref: fail create operation over stdin if ref already exists
Requesting "update-ref --stdin" to create a ref that already exists
should have errored out, but didn't.
* mr/msvc-link-with-invalidcontinue (2014-03-28) 1 commit
(merged to 'next' on 2014-03-31 at 051a29e)
+ MSVC: link in invalidcontinue.obj for better POSIX compatibility
* mr/opt-set-ptr (2014-03-31) 3 commits
(merged to 'next' on 2014-04-03 at a26385b)
+ parse-options: remove unused OPT_SET_PTR
+ parse-options: add cast to correct pointer type to OPT_SET_PTR
+ MSVC: fix t0040-parse-options crash
OPT_SET_PTR() implementation was broken on IL32P64 platforms;
it turns out that the macro is not used by any real user.
--------------------------------------------------
[Stalled]
* tr/merge-recursive-index-only (2014-02-05) 3 commits
- merge-recursive: -Xindex-only to leave worktree unchanged
- merge-recursive: internal flag to avoid touching the worktree
- merge-recursive: remove dead conditional in update_stages()
(this branch is used by tr/remerge-diff.)
Will hold.
* tr/remerge-diff (2014-02-26) 5 commits
. log --remerge-diff: show what the conflict resolution changed
. name-hash: allow dir hashing even when !ignore_case
. merge-recursive: allow storing conflict hunks in index
. revision: fold all merge diff variants into an enum merge_diff_mode
. combine-diff: do not pass revs->dense_combined_merges redundantly
(this branch uses tr/merge-recursive-index-only.)
"log -p" output learns a new way to let users inspect a merge
commit by showing the differences between the automerged result
with conflicts the person who recorded the merge would have seen
and the final conflict resolution that was recorded in the merge.
Needs to be rebased, now kb/fast-hashmap topic is in.
* bc/blame-crlf-test (2014-02-18) 1 commit
- blame: add a failing test for a CRLF issue.
I have a feeling that a fix for this should be fairly isolated and
trivial (it should be just the matter of paying attention to the
crlf settings when synthesizing the fake commit)---perhaps somebody
can squash in a fix to this?
* jk/makefile (2014-02-05) 16 commits
- FIXUP
- move LESS/LV pager environment to Makefile
- Makefile: teach scripts to include make variables
- FIXUP
- Makefile: auto-build C strings from make variables
- Makefile: drop *_SQ variables
- FIXUP
- Makefile: add c-quote helper function
- Makefile: introduce sq function for shell-quoting
- Makefile: always create files via make-var
- Makefile: store GIT-* sentinel files in MAKE/
- Makefile: prefer printf to echo for GIT-*
- Makefile: use tempfile/mv strategy for GIT-*
- Makefile: introduce make-var helper function
- Makefile: fix git-instaweb dependency on gitweb
- Makefile: drop USE_GETTEXT_SCHEME from GIT-CFLAGS
Simplify the Makefile rules and macros that exist primarily for
quoting purposes, and make it easier to robustly express the
dependency rules.
Expecting a reroll.
* po/everyday-doc (2014-01-27) 1 commit
- Make 'git help everyday' work
This may make the said command to emit something, but the source is
not meant to be formatted into a manual pages to begin with, and
also its contents are a bit stale. It may be a good first step in
the right direction, but needs more work to at least get the
mark-up right before public consumption.
Will hold.
* jk/branch-at-publish-rebased (2014-01-17) 5 commits
. t1507 (rev-parse-upstream): fix typo in test title
. implement @{publish} shorthand
. branch_get: provide per-branch pushremote pointers
. branch_get: return early on error
. sha1_name: refactor upstream_mark
Give an easier access to the tracking branches from "other" side in
a triangular workflow by introducing B@{publish} that works in a
similar way to how B@{upstream} does.
Meant to be used as a basis for whatever Ram wants to build on.
Ejected from 'pu' to make room for fc/publish-vs-upstream topic.
* rb/merge-prepare-commit-msg-hook (2014-01-10) 4 commits
- merge: drop unused arg from abort_commit method signature
- merge: make prepare_to_commit responsible for write_merge_state
- t7505: ensure cleanup after hook blocks merge
- t7505: add missing &&
Expose more merge states (e.g. $GIT_DIR/MERGE_MODE) to hooks that
run during "git merge". The log message stresses too much on one
hook, prepare-commit-msg, but it would equally apply to other hooks
like post-merge, I think.
Waiting for a reroll.
* jl/submodule-recursive-checkout (2013-12-26) 5 commits
- Teach checkout to recursively checkout submodules
- submodule: teach unpack_trees() to update submodules
- submodule: teach unpack_trees() to repopulate submodules
- submodule: teach unpack_trees() to remove submodule contents
- submodule: prepare for recursive checkout of submodules
Expecting a reroll.
* jc/graph-post-root-gap (2013-12-30) 3 commits
- WIP: document what we want at the end
- graph: remove unused code a bit
- graph: stuff the current commit into graph->columns[]
This was primarily a RFH ($gmane/239580).
* np/pack-v4 (2013-09-18) 90 commits
. packv4-parse.c: add tree offset caching
. t1050: replace one instance of show-index with verify-pack
. index-pack, pack-objects: allow creating .idx v2 with .pack v4
. unpack-objects: decode v4 trees
. unpack-objects: allow to save processed bytes to a buffer
- ...
Nico and Duy advancing the eternal vaporware pack-v4. This is here
primarily for wider distribution of the preview edition.
Needs to be rebased, now the pack-bitmap series is in.
* tg/perf-lib-test-perf-cleanup (2013-09-19) 2 commits
- perf-lib: add test_perf_cleanup target
- perf-lib: split starting the test from the execution
Add test_perf_cleanup shell function to the perf suite, that allows
the script writers to define a test with a clean-up action.
Will hold.
* jc/format-patch (2013-04-22) 2 commits
- format-patch: --inline-single
- format-patch: rename "no_inline" field
A new option to send a single patch to the standard output to be
appended at the bottom of a message. I personally have no need for
this, but it was easy enough to cobble together. Tests, docs and
stripping out more MIMEy stuff are left as exercises to interested
parties.
* jc/show-branch (2014-03-24) 5 commits
- show-branch: use commit slab to represent bitflags of arbitrary width
- show-branch.c: remove "all_mask"
- show-branch.c: abstract out "flags" operation
- show-branch.c: lift all_mask/all_revs to a global static
- show-branch.c: update comment style
Waiting for the final step to lift the hard-limit before sending it out.
--------------------------------------------------
[Cooking]
* jl/status-added-submodule-is-never-ignored (2014-04-07) 2 commits
- commit -m: commit staged submodules regardless of ignore config
- status/commit: show staged submodules regardless of ignore config
* mh/multimail (2014-04-07) 1 commit
- git-multimail: update to version 1.0.0
* mh/lockfile (2014-04-07) 25 commits
- trim_last_path_elm(): replace last_path_elm()
- resolve_symlink(): take a strbuf parameter
- resolve_symlink(): use a strbuf for internal scratch space
- Change lock_file::filename into a strbuf
- commit_lock_file(): use a strbuf to manage temporary space
- try_merge_strategy(): use a statically-allocated lock_file object
- try_merge_strategy(): remove redundant lock_file allocation
- lockfile: avoid transitory invalid states
- commit_lock_file(): make committing an unlocked lockfile a NOP
- commit_lock_file(): inline temporary variable
- remove_lock_file(): call rollback_lock_file()
- lock_file(): exit early if lockfile cannot be opened
- write_packed_entry_fn(): convert cb_data into a (const int *)
- prepare_index(): declare return value to be (const char *)
- delete_ref_loose(): don't muck around in the lock_file's filename
- lockfile: define a constant LOCK_SUFFIX_LEN
- lockfile.c: document the various states of lock_file objects
- struct lock_file: replace on_list field with flags field
- lock_file(): always add lock_file object to lock_file_list
- hold_lock_file_for_append(): release lock on errors
- lockfile: unlock file if lockfile permissions cannot be adjusted
- rollback_lock_file(): set fd to -1
- rollback_lock_file(): do not clear filename redundantly
- unable_to_lock_die(): rename function from unable_to_lock_index_die()
- api-lockfile: expand the documentation
Refactor and fix corner-case bugs in the lockfile API.
* mt/patch-id-stable (2014-03-31) 3 commits
(merged to 'next' on 2014-04-08 at 0188d44)
+ patch-id-test: test --stable and --unstable flags
+ patch-id: document new behaviour
+ patch-id: make it stable against hunk reordering
Introduce a new way to compute patch-id for a patch that is not
affected by the order of the paths that appear in the input.
This changes the generated patch-id unless the users add an extra
option to their command lines, but I deliberately queued the series
to 'next' without reverting that compatibility breakage to see if
people complain. It could be that we do not have to worry about
the default flipping at all. We'll see.
Will keep in 'next' for the remainder of this cycle.
* mh/ref-transaction (2014-04-07) 27 commits
- ref_transaction_commit(): work with transaction->updates in place
- struct ref_update: add a type field
- struct ref_update: add a lock field
- ref_transaction_commit(): simplify code using temporary variables
- struct ref_update: store refname as a FLEX_ARRAY
- struct ref_update: rename field "ref_name" to "refname"
- refs: remove API function update_refs()
- update-ref --stdin: reimplement using reference transactions
- refs: add a concept of a reference transaction
- update-ref --stdin: harmonize error messages
- update-ref --stdin: improve the error message for unexpected EOF
- t1400: test one mistake at a time
- update-ref --stdin -z: deprecate interpreting the empty string as zeros
- update-ref.c: extract a new function, parse_next_sha1()
- t1400: test that stdin -z update treats empty <newvalue> as zeros
- update-ref --stdin: simplify error messages for missing oldvalues
- update-ref --stdin: make error messages more consistent
- update-ref --stdin: improve error messages for invalid values
- update-ref.c: extract a new function, parse_refname()
- parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice
- update-ref --stdin: read the whole input at once
- update_refs(): fix constness
- refs.h: rename the action_on_err constants
- t1400: add some more tests involving quoted arguments
- parse_arg(): really test that argument is properly terminated
- t1400: provide more usual input to the command
- t1400: fix name and expected result of one test
(this branch is used by rs/ref-closer-to-atomic.)
Update "update-ref --stdin [-z]" and then introduce a transactional
support for (multi-)reference updates.
Is this ready to be merged to 'next' for wider exposure?
* jc/apply-ignore-whitespace (2014-03-26) 1 commit
(merged to 'next' on 2014-04-04 at 53779a7)
+ apply --ignore-space-change: lines with and without leading whitespaces do not match
"--ignore-space-change" option of "git apply" ignored the
spaces at the beginning of line too aggressively, which is
inconsistent with the option of the same name "diff" and "git diff"
have.
Will keep in 'next' for the remainder of this cycle.
* as/grep-fullname-config (2014-03-20) 1 commit
(merged to 'next' on 2014-03-28 at 810a076)
+ grep: add grep.fullName config variable
Add a configuration variable to force --full-name to be default for
"git grep".
This may cause regressions on scripted users that do not expect
this new behaviour.
Will keep in 'next' for the remainder of this cycle.
* nd/multiple-work-trees (2014-03-25) 28 commits
- count-objects: report unused files in $GIT_DIR/repos/...
- gc: support prune --repos
- gc: style change -- no SP before closing bracket
- prune: strategies for linked checkouts
- checkout: detach if the branch is already checked out elsewhere
- checkout: clean up half-prepared directories in --to mode
- checkout: support checking out into a new working directory
- use new wrapper write_file() for simple file writing
- wrapper.c: wrapper to open a file, fprintf then close
- setup.c: support multi-checkout repo setup
- setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()
- setup.c: convert check_repository_format_gently to use strbuf
- setup.c: detect $GIT_COMMON_DIR in is_git_directory()
- setup.c: convert is_git_directory() to use strbuf
- git-stash: avoid hardcoding $GIT_DIR/logs/....
- *.sh: avoid hardcoding $GIT_DIR/hooks/...
- git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects
- $GIT_COMMON_DIR: a new environment variable
- commit: use SEQ_DIR instead of hardcoding "sequencer"
- fast-import: use git_path() for accessing .git dir instead of get_git_dir()
- reflog: avoid constructing .lock path with git_path
- *.sh: respect $GIT_INDEX_FILE
- git_path(): be aware of file relocation in $GIT_DIR
- path.c: group git_path(), git_pathdup() and strbuf_git_path() together
- path.c: rename vsnpath() to do_git_path()
- git_snpath(): retire and replace with strbuf_git_path()
- path.c: make get_pathname() call sites return const char *
- path.c: make get_pathname() return strbuf instead of static buffer
A replacement for contrib/workdir/git-new-workdir that does not
rely on symbolic links and make sharing of objects and refs safer
by making the borrowee and borrowers aware of each other.
Will hold.
* ks/tree-diff-nway (2014-04-09) 20 commits
(merged to 'next' on 2014-04-09 at c17228e)
+ mingw: activate alloca
(merged to 'next' on 2014-04-08 at 6b74773)
+ combine-diff: speed it up, by using multiparent diff tree-walker directly
+ tree-diff: rework diff_tree() to generate diffs for multiparent cases as well
+ Portable alloca for Git
(merged to 'next' on 2014-03-31 at 16a7bd4)
+ tree-diff: reuse base str(buf) memory on sub-tree recursion
+ tree-diff: no need to call "full" diff_tree_sha1 from show_path()
+ tree-diff: rework diff_tree interface to be sha1 based
+ tree-diff: diff_tree() should now be static
+ tree-diff: remove special-case diff-emitting code for empty-tree cases
(merged to 'next' on 2014-03-25 at cfcbdac)
+ tree-diff: simplify tree_entry_pathcmp
+ tree-diff: show_path prototype is not needed anymore
+ tree-diff: rename compare_tree_entry -> tree_entry_pathcmp
+ tree-diff: move all action-taking code out of compare_tree_entry()
+ tree-diff: don't assume compare_tree_entry() returns -1,0,1
(merged to 'next' on 2014-03-21 at d872679)
+ tree-diff: consolidate code for emitting diffs and recursion in one place
+ tree-diff: show_tree() is not needed
+ tree-diff: no need to pass match to skip_uninteresting()
+ tree-diff: no need to manually verify that there is no mode change for a path
+ combine-diff: move changed-paths scanning logic into its own function
+ combine-diff: move show_log_first logic/action out of paths scanning
Instead of running N pair-wise diff-trees when inspecting a
N-parent merge, find the set of paths that were touched by walking
N+1 trees in parallel. These set of paths can then be turned into
N pair-wise diff-tree results to be processed through rename
detections and such. And N=2 case nicely degenerates to the usual
2-way diff-tree, which is very nice.
Will keep in 'next' for the remainder of this cycle.
* cc/interpret-trailers (2014-04-07) 12 commits
- trailer: add blank line before the trailers if needed
- Documentation: add documentation for 'git interpret-trailers'
- trailer: add tests for commands in config file
- trailer: execute command from 'trailer.<name>.command'
- trailer: add tests for "git interpret-trailers"
- trailer: add interpret-trailers command
- trailer: put all the processing together and print
- trailer: parse trailers from stdin
- trailer: process command line trailer arguments
- trailer: read and process config information
- trailer: process trailers from stdin and arguments
- trailer: add data structures and basic functions
A new filter to programatically edit the tail end of the commit log
messages.
I was planning to merge it to 'next' and keep it there for the
remainder of this cycle, but it appears that there still will be
another round of reroll, at least for the documentation?
--------------------------------------------------
[Discarded]
* sz/mingw-index-pack-threaded (2014-03-19) 1 commit
. Enable index-pack threading in msysgit.
Queued a different attempt by Duy on nd/index-pack-one-fd-per-thread
^ permalink raw reply [relevance 1%]
* Re: [PATCH] test: fix t7001 cp to use POSIX options
2014-04-11 19:23 5% ` Junio C Hamano
@ 2014-04-12 21:52 6% ` Jens Lehmann
0 siblings, 0 replies; 200+ results
From: Jens Lehmann @ 2014-04-12 21:52 UTC (permalink / raw)
To: Junio C Hamano, Jeff King; +Cc: Kyle J. McKay, git
Am 11.04.2014 21:23, schrieb Junio C Hamano:
> Jeff King <peff@peff.net> writes:
>
>> On Fri, Apr 11, 2014 at 01:24:02AM -0700, Kyle J. McKay wrote:
>>
>>> Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the
>>> t7001-mv test has used "cp -a" to perform a copy in several of the
>>> tests.
>>>
>>> However, the "-a" option is not required for a POSIX cp utility and
>>> some platforms' cp utilities do not support it.
>>>
>>> The POSIX equivalent of -a is -R -P -p.
>>>
>>> Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works
>>> on systems with a cp utility that only implements the POSIX
>>> required set of options and not the "-a" option.
>>
>> I wonder if the "-R" is the part that we actually care about here.
>> Including the others does not hurt in that case, but using only "-R"
>> would perhaps make it more obvious to a later reader of the code exactly
>> what we are trying to do.
>
> These calls to "cp" are about "We know that earlier 'update' created
> the GIT_DIR of the submodule in the top-level superproject, because
> we are running a modern Git. But we want to make sure the command
> we are testing, "git mv", would work correctly if the repository
> were made with an older Git that created the GIT_DIR embedded in the
> working tree of the submodule, so let's emulate that case." As we
> create files and directories in GIT_DIR with explicit permission
> bits, we may care about
>
> (1) making sure "git mv" can actually move the directory, with some
> paths having mode bits different from the umasked default; and
>
> (2) checking that the GIT_DIR after "git mv" has the permission
> bits right.
When writing these tests I didn't care about (2), but - in addition
to the first half of (1) - I had another thing in mind:
(3) "git mv" shouldn't try to update the 'core.worktree' setting
when the GIT_DIR is embedded in the submodule's work tree.
> and if we cared, "-R -p" would be required here, not just "-R".
>
> If core.prefersymlinkrefs is set, GIT_DIR would have a symbolic link
> HEAD pointing at the current branch, and "-P" may become relevant,
> but manually running "cp -R .git git && ls -l git/HEAD" in such an
> old repository tells me that symbolic link HEAD is not dereferenced
> without an explicit "-L", so I dunno.
>
> Because we do not check anything inside GIT_DIR of the moved
> submodule after "git mv" is done, the more correct use of "cp" is
> moot for the purpose of (2), but it could be possible that "git mv"
> fails to move a submodule with GIT_DIR created embedded in its
> working tree by an older version of Git, while successfully copying
> an emulated one, due to differences such as modes and symlinks.
>
> The current implementation just does rename(2) on the whole
> submodule working tree and let its contents move together, so I do
> not think it matters at the moment for the purpose of (1); use of
> flags other than "-R" are purely for future-proofing, I would think.
Thanks for your detailed analysis and sorry to all parties involved
for the hassle caused by my knee-jerk reaction to just use "cp -a"
when I wanted to have an exact copy of 'that' directory 'there'.
Given that all other tests just use "cp -R" too in that situation
I'm all for the second version of Kyle's patch, so an "Acked-by"
from me on that one.
^ permalink raw reply [relevance 6%]
* What's cooking in git.git (Apr 2014, #04; Tue, 15)
@ 2014-04-15 22:12 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2014-04-15 22:12 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
The number of topics cooking in 'next' has been shrinking, and the
cycle is getting long. Hopefully we will have -rc0 late this week to
close the 'master' branch and a few rounds of -rc iterations until
2.0 final. Other topics under discussion may continue to flow to
'next', as usual, during that time, to be pushed out early in the
next cycle.
You can find the changes described here in the integration branches
of the repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[New Topics]
* fc/prompt-zsh-read-from-file (2014-04-14) 1 commit
- prompt: fix missing file errors in zsh
Will merge to 'next' and to 'master'.
* fc/transport-helper-sync-error-fix (2014-04-14) 5 commits
- transport-helper: fix sync issue on crashes
- transport-helper: trivial cleanup
- transport-helper: propagate recvline() error pushing
- remote-helpers: make recvline return an error
- transport-helper: remove barely used xchgline()
Make sure the marks are not written out when the transport helper
did not finish happily, to avoid marks file that is out of sync
with the reality.
As I had to resolve some conflicts with the recent code, will wait
until getting an OK from Felipe on the conflict resolution and then
hopefully can be merged to 'next' and then later to 'master'.
* km/avoid-non-function-return-in-rebase (2014-04-14) 2 commits
- Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"
- rebase: avoid non-function use of "return" on FreeBSD
Work around /bin/sh that does not like "return" at the top-level
of a file that is dot-sourced from inside a function definition.
Will merge to 'next'.
We may want to merge it to 'master' by -rc1 if no regressions are
reported.
* db/make-with-curl (2014-04-15) 2 commits
- Makefile: allow static linking against libcurl
- Makefile: use curl-config to determine curl flags
Ask curl-config how to link with the curl library, instead of
having only a limited configurability knobs in the Makefile.
Will merge to 'next'.
We may want to merge it to 'master' by -rc1 if no regressions are
reported.
--------------------------------------------------
[Stalled]
* tr/merge-recursive-index-only (2014-02-05) 3 commits
- merge-recursive: -Xindex-only to leave worktree unchanged
- merge-recursive: internal flag to avoid touching the worktree
- merge-recursive: remove dead conditional in update_stages()
(this branch is used by tr/remerge-diff.)
Will hold.
* tr/remerge-diff (2014-02-26) 5 commits
. log --remerge-diff: show what the conflict resolution changed
. name-hash: allow dir hashing even when !ignore_case
. merge-recursive: allow storing conflict hunks in index
. revision: fold all merge diff variants into an enum merge_diff_mode
. combine-diff: do not pass revs->dense_combined_merges redundantly
(this branch uses tr/merge-recursive-index-only.)
"log -p" output learns a new way to let users inspect a merge
commit by showing the differences between the automerged result
with conflicts the person who recorded the merge would have seen
and the final conflict resolution that was recorded in the merge.
Needs to be rebased, now kb/fast-hashmap topic is in.
* bc/blame-crlf-test (2014-02-18) 1 commit
- blame: add a failing test for a CRLF issue.
I have a feeling that a fix for this should be fairly isolated and
trivial (it should be just the matter of paying attention to the
crlf settings when synthesizing the fake commit)---perhaps somebody
can squash in a fix to this?
* jk/makefile (2014-02-05) 16 commits
- FIXUP
- move LESS/LV pager environment to Makefile
- Makefile: teach scripts to include make variables
- FIXUP
- Makefile: auto-build C strings from make variables
- Makefile: drop *_SQ variables
- FIXUP
- Makefile: add c-quote helper function
- Makefile: introduce sq function for shell-quoting
- Makefile: always create files via make-var
- Makefile: store GIT-* sentinel files in MAKE/
- Makefile: prefer printf to echo for GIT-*
- Makefile: use tempfile/mv strategy for GIT-*
- Makefile: introduce make-var helper function
- Makefile: fix git-instaweb dependency on gitweb
- Makefile: drop USE_GETTEXT_SCHEME from GIT-CFLAGS
Simplify the Makefile rules and macros that exist primarily for
quoting purposes, and make it easier to robustly express the
dependency rules.
Expecting a reroll.
* po/everyday-doc (2014-01-27) 1 commit
- Make 'git help everyday' work
This may make the said command to emit something, but the source is
not meant to be formatted into a manual pages to begin with, and
also its contents are a bit stale. It may be a good first step in
the right direction, but needs more work to at least get the
mark-up right before public consumption.
Will hold.
* jk/branch-at-publish-rebased (2014-01-17) 5 commits
. t1507 (rev-parse-upstream): fix typo in test title
. implement @{publish} shorthand
. branch_get: provide per-branch pushremote pointers
. branch_get: return early on error
. sha1_name: refactor upstream_mark
Give an easier access to the tracking branches from "other" side in
a triangular workflow by introducing B@{publish} that works in a
similar way to how B@{upstream} does.
Meant to be used as a basis for whatever Ram wants to build on.
Ejected from 'pu' to make room for fc/publish-vs-upstream topic.
* rb/merge-prepare-commit-msg-hook (2014-01-10) 4 commits
- merge: drop unused arg from abort_commit method signature
- merge: make prepare_to_commit responsible for write_merge_state
- t7505: ensure cleanup after hook blocks merge
- t7505: add missing &&
Expose more merge states (e.g. $GIT_DIR/MERGE_MODE) to hooks that
run during "git merge". The log message stresses too much on one
hook, prepare-commit-msg, but it would equally apply to other hooks
like post-merge, I think.
Waiting for a reroll.
* jl/submodule-recursive-checkout (2013-12-26) 5 commits
- Teach checkout to recursively checkout submodules
- submodule: teach unpack_trees() to update submodules
- submodule: teach unpack_trees() to repopulate submodules
- submodule: teach unpack_trees() to remove submodule contents
- submodule: prepare for recursive checkout of submodules
Expecting a reroll.
* jc/graph-post-root-gap (2013-12-30) 3 commits
- WIP: document what we want at the end
- graph: remove unused code a bit
- graph: stuff the current commit into graph->columns[]
This was primarily a RFH ($gmane/239580).
* np/pack-v4 (2013-09-18) 90 commits
. packv4-parse.c: add tree offset caching
. t1050: replace one instance of show-index with verify-pack
. index-pack, pack-objects: allow creating .idx v2 with .pack v4
. unpack-objects: decode v4 trees
. unpack-objects: allow to save processed bytes to a buffer
- ...
Nico and Duy advancing the eternal vaporware pack-v4. This is here
primarily for wider distribution of the preview edition.
Needs to be rebased, now the pack-bitmap series is in.
* tg/perf-lib-test-perf-cleanup (2013-09-19) 2 commits
- perf-lib: add test_perf_cleanup target
- perf-lib: split starting the test from the execution
Add test_perf_cleanup shell function to the perf suite, that allows
the script writers to define a test with a clean-up action.
Will hold.
* jc/format-patch (2013-04-22) 2 commits
- format-patch: --inline-single
- format-patch: rename "no_inline" field
A new option to send a single patch to the standard output to be
appended at the bottom of a message. I personally have no need for
this, but it was easy enough to cobble together. Tests, docs and
stripping out more MIMEy stuff are left as exercises to interested
parties.
* jc/show-branch (2014-03-24) 5 commits
- show-branch: use commit slab to represent bitflags of arbitrary width
- show-branch.c: remove "all_mask"
- show-branch.c: abstract out "flags" operation
- show-branch.c: lift all_mask/all_revs to a global static
- show-branch.c: update comment style
Waiting for the final step to lift the hard-limit before sending it out.
--------------------------------------------------
[Cooking]
* nd/index-pack-one-fd-per-thread (2014-04-09) 1 commit
- index-pack: work around thread-unsafe pread()
Enable threaded index-pack on platforms without thread-unsafe
pread() emulation.
The log message may need to be replaced ($gmane/246176, $gmane/246290).
* tb/unicode-6.3-zero-width (2014-04-09) 1 commit
(merged to 'next' on 2014-04-14 at 72ce72a)
+ utf8.c: partially update to version 6.3
Teach our display-column-counting logic about decomposed umlauts
and friends.
Will merge to 'master'.
* fc/complete-aliased-push (2014-04-09) 1 commit
- completion: fix completing args of aliased "push", "fetch", etc.
Will merge to 'next'.
* fc/remote-helper-fixes (2014-04-14) 5 commits
- remote-bzr: trivial test fix
- remote-bzr: include authors field in pushed commits
- remote-bzr: add support for older versions
- remote-hg: always normalize paths
- remote-helpers: allow all tests running from any dir
Will merge to 'next'.
* fc/publish-vs-upstream (2014-04-11) 8 commits
- sha1_name: add support for @{publish} marks
- sha1_name: simplify track finding
- sha1_name: cleanup interpret_branch_name()
- branch: display publish branch
- push: add --set-publish option
- branch: add --set-publish-to option
- Add concept of 'publish' branch
- t5516 (fetch-push): fix test restoration
Add branch@{publish}; this round v3 hasn't yet seen much reviews
yet.
Seems to have some interactions to break t5516 when merged to 'pu'.
* ym/fix-opportunistic-index-update-race (2014-04-10) 2 commits
- read-cache.c: verify index file before we opportunistically update it
- wrapper.c: add xpread() similar to xread()
Duy raised a good point that we may need to do the same for the
normal writeout codepath, not just the "opportunistic" update
codepath. While that is true, nobody sane would be running two
simultaneous operations that are clearly write-oriented competing
with each other against the same index file. So in that sense that
can be done as a less urgent follow-up for this topic.
Will merge to 'next' and keep it there for the remainder of the cycle.
* km/avoid-bs-in-shell-glob (2014-04-11) 1 commit
(merged to 'next' on 2014-04-14 at a3d9a58)
+ test: fix t5560 on FreeBSD
Portability fix.
Will merge to 'master'.
* km/avoid-cp-a (2014-04-11) 1 commit
(merged to 'next' on 2014-04-14 at be661c4)
+ test: fix t7001 cp to use POSIX options
Portability fix.
Will merge to 'master'.
* jl/status-added-submodule-is-never-ignored (2014-04-07) 2 commits
- commit -m: commit staged submodules regardless of ignore config
- status/commit: show staged submodules regardless of ignore config
There also are a few patches Ronald Weiss and Jens are working on
polishing around this topic, and a patch from Jens each for gitk
and git-gui.
Waiting for the dust to settle until picking them up all.
* mh/multimail (2014-04-07) 1 commit
(merged to 'next' on 2014-04-15 at eaba915)
+ git-multimail: update to version 1.0.0
Will merge to 'master'.
* mh/lockfile (2014-04-15) 25 commits
- trim_last_path_elm(): replace last_path_elm()
- resolve_symlink(): take a strbuf parameter
- resolve_symlink(): use a strbuf for internal scratch space
- change lock_file::filename into a strbuf
- commit_lock_file(): use a strbuf to manage temporary space
- try_merge_strategy(): use a statically-allocated lock_file object
- try_merge_strategy(): remove redundant lock_file allocation
- struct lock_file: declare some fields volatile
- lockfile: avoid transitory invalid states
- commit_lock_file(): die() if called for unlocked lockfile object
- commit_lock_file(): inline temporary variable
- remove_lock_file(): call rollback_lock_file()
- lock_file(): exit early if lockfile cannot be opened
- write_packed_entry_fn(): convert cb_data into a (const int *)
- prepare_index(): declare return value to be (const char *)
- delete_ref_loose(): don't muck around in the lock_file's filename
- cache.h: define constants LOCK_SUFFIX and LOCK_SUFFIX_LEN
- lockfile.c: document the various states of lock_file objects
- lock_file(): always add lock_file object to lock_file_list
- hold_lock_file_for_append(): release lock on errors
- lockfile: unlock file if lockfile permissions cannot be adjusted
- rollback_lock_file(): set fd to -1
- rollback_lock_file(): do not clear filename redundantly
- api-lockfile: expand the documentation
- unable_to_lock_die(): rename function from unable_to_lock_index_die()
Refactor and fix corner-case bugs in the lockfile API, all looked
sensible.
Still being commented on.
* mt/patch-id-stable (2014-03-31) 3 commits
(merged to 'next' on 2014-04-08 at 0188d44)
+ patch-id-test: test --stable and --unstable flags
+ patch-id: document new behaviour
+ patch-id: make it stable against hunk reordering
Introduce a new way to compute patch-id for a patch that is not
affected by the order of the paths that appear in the input.
This changes the generated patch-id unless the users add an extra
option to their command lines, but I deliberately queued the series
to 'next' without reverting that compatibility breakage to see if
people complain. It could be that we do not have to worry about
the default flipping at all. We'll see.
Will keep in 'next' for the remainder of the cycle.
* mh/ref-transaction (2014-04-07) 27 commits
- ref_transaction_commit(): work with transaction->updates in place
- struct ref_update: add a type field
- struct ref_update: add a lock field
- ref_transaction_commit(): simplify code using temporary variables
- struct ref_update: store refname as a FLEX_ARRAY
- struct ref_update: rename field "ref_name" to "refname"
- refs: remove API function update_refs()
- update-ref --stdin: reimplement using reference transactions
- refs: add a concept of a reference transaction
- update-ref --stdin: harmonize error messages
- update-ref --stdin: improve the error message for unexpected EOF
- t1400: test one mistake at a time
- update-ref --stdin -z: deprecate interpreting the empty string as zeros
- update-ref.c: extract a new function, parse_next_sha1()
- t1400: test that stdin -z update treats empty <newvalue> as zeros
- update-ref --stdin: simplify error messages for missing oldvalues
- update-ref --stdin: make error messages more consistent
- update-ref --stdin: improve error messages for invalid values
- update-ref.c: extract a new function, parse_refname()
- parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice
- update-ref --stdin: read the whole input at once
- update_refs(): fix constness
- refs.h: rename the action_on_err constants
- t1400: add some more tests involving quoted arguments
- parse_arg(): really test that argument is properly terminated
- t1400: provide more usual input to the command
- t1400: fix name and expected result of one test
(this branch is used by rs/ref-closer-to-atomic.)
Update "update-ref --stdin [-z]" and then introduce a transactional
support for (multi-)reference updates.
Will merge to 'next' and keep it there for the remainder of the cycle.
* jc/apply-ignore-whitespace (2014-03-26) 1 commit
(merged to 'next' on 2014-04-04 at 53779a7)
+ apply --ignore-space-change: lines with and without leading whitespaces do not match
"--ignore-space-change" option of "git apply" ignored the
spaces at the beginning of line too aggressively, which is
inconsistent with the option of the same name "diff" and "git diff"
have.
Will keep in 'next' for the remainder of the cycle.
* as/grep-fullname-config (2014-03-20) 1 commit
(merged to 'next' on 2014-03-28 at 810a076)
+ grep: add grep.fullName config variable
Add a configuration variable to force --full-name to be default for
"git grep".
This may cause regressions on scripted users that do not expect
this new behaviour.
Will keep in 'next' for the remainder of the cycle.
* nd/multiple-work-trees (2014-03-25) 28 commits
- count-objects: report unused files in $GIT_DIR/repos/...
- gc: support prune --repos
- gc: style change -- no SP before closing bracket
- prune: strategies for linked checkouts
- checkout: detach if the branch is already checked out elsewhere
- checkout: clean up half-prepared directories in --to mode
- checkout: support checking out into a new working directory
- use new wrapper write_file() for simple file writing
- wrapper.c: wrapper to open a file, fprintf then close
- setup.c: support multi-checkout repo setup
- setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()
- setup.c: convert check_repository_format_gently to use strbuf
- setup.c: detect $GIT_COMMON_DIR in is_git_directory()
- setup.c: convert is_git_directory() to use strbuf
- git-stash: avoid hardcoding $GIT_DIR/logs/....
- *.sh: avoid hardcoding $GIT_DIR/hooks/...
- git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects
- $GIT_COMMON_DIR: a new environment variable
- commit: use SEQ_DIR instead of hardcoding "sequencer"
- fast-import: use git_path() for accessing .git dir instead of get_git_dir()
- reflog: avoid constructing .lock path with git_path
- *.sh: respect $GIT_INDEX_FILE
- git_path(): be aware of file relocation in $GIT_DIR
- path.c: group git_path(), git_pathdup() and strbuf_git_path() together
- path.c: rename vsnpath() to do_git_path()
- git_snpath(): retire and replace with strbuf_git_path()
- path.c: make get_pathname() call sites return const char *
- path.c: make get_pathname() return strbuf instead of static buffer
A replacement for contrib/workdir/git-new-workdir that does not
rely on symbolic links and make sharing of objects and refs safer
by making the borrowee and borrowers aware of each other.
Will hold.
* ks/tree-diff-nway (2014-04-09) 20 commits
(merged to 'next' on 2014-04-09 at c17228e)
+ mingw: activate alloca
(merged to 'next' on 2014-04-08 at 6b74773)
+ combine-diff: speed it up, by using multiparent diff tree-walker directly
+ tree-diff: rework diff_tree() to generate diffs for multiparent cases as well
+ Portable alloca for Git
(merged to 'next' on 2014-03-31 at 16a7bd4)
+ tree-diff: reuse base str(buf) memory on sub-tree recursion
+ tree-diff: no need to call "full" diff_tree_sha1 from show_path()
+ tree-diff: rework diff_tree interface to be sha1 based
+ tree-diff: diff_tree() should now be static
+ tree-diff: remove special-case diff-emitting code for empty-tree cases
(merged to 'next' on 2014-03-25 at cfcbdac)
+ tree-diff: simplify tree_entry_pathcmp
+ tree-diff: show_path prototype is not needed anymore
+ tree-diff: rename compare_tree_entry -> tree_entry_pathcmp
+ tree-diff: move all action-taking code out of compare_tree_entry()
+ tree-diff: don't assume compare_tree_entry() returns -1,0,1
(merged to 'next' on 2014-03-21 at d872679)
+ tree-diff: consolidate code for emitting diffs and recursion in one place
+ tree-diff: show_tree() is not needed
+ tree-diff: no need to pass match to skip_uninteresting()
+ tree-diff: no need to manually verify that there is no mode change for a path
+ combine-diff: move changed-paths scanning logic into its own function
+ combine-diff: move show_log_first logic/action out of paths scanning
Instead of running N pair-wise diff-trees when inspecting a
N-parent merge, find the set of paths that were touched by walking
N+1 trees in parallel. These set of paths can then be turned into
N pair-wise diff-tree results to be processed through rename
detections and such. And N=2 case nicely degenerates to the usual
2-way diff-tree, which is very nice.
Will keep in 'next' for the remainder of the cycle.
* cc/interpret-trailers (2014-04-07) 12 commits
- trailer: add blank line before the trailers if needed
- Documentation: add documentation for 'git interpret-trailers'
- trailer: add tests for commands in config file
- trailer: execute command from 'trailer.<name>.command'
- trailer: add tests for "git interpret-trailers"
- trailer: add interpret-trailers command
- trailer: put all the processing together and print
- trailer: parse trailers from stdin
- trailer: process command line trailer arguments
- trailer: read and process config information
- trailer: process trailers from stdin and arguments
- trailer: add data structures and basic functions
A new filter to programatically edit the tail end of the commit log
messages.
I was planning to merge it to 'next' and keep it there for the
remainder of the cycle, but it appears that there still will be
another round of reroll, at least for the documentation?
--------------------------------------------------
[Discarded]
* sz/mingw-index-pack-threaded (2014-03-19) 1 commit
. Enable index-pack threading in msysgit.
Queued a different attempt by Duy on nd/index-pack-one-fd-per-thread
* rs/ref-closer-to-atomic (2014-04-14) 3 commits
. refs.c: change ref_transaction_commit to run the commit loops once all work is finished
. refs.c: split delete_ref_loose() into a separate flag-for-deletion and commit phase
. refs.c: split writing and commiting a ref into two separate functions
(this branch uses mh/ref-transaction.)
Builds on top of Michael's ref-transaction series to shrink the
race window during multiple ref updates.
Deferred to be rerolled ($gmane/246289).
^ permalink raw reply [relevance 1%]
* What's cooking in git.git (Apr 2014, #05; Thu, 17)
@ 2014-04-17 21:01 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2014-04-17 21:01 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
Hopefully we can merge a few more topics slated for 'master' before
cutting an early preview release -rc0 tomorrow. Many of the topics
that are in 'next' have sizable impact on the codebase and I'd feel
safer to keep them cooking for the remainder of the cycle.
Also I am still waiting for acks for a few topics before merging
them to 'next'. I would feel it would be good if we can merge them
early to 'next' for wider and longer exposure and some of them may
even deserve to be in -rc1, but as none of them is a regression fix,
it is also OK to wait until 2.0 final.
You can find the changes described here in the integration branches
of the repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[Graduated to "master"]
* km/avoid-bs-in-shell-glob (2014-04-11) 1 commit
(merged to 'next' on 2014-04-14 at a3d9a58)
+ test: fix t5560 on FreeBSD
Portability fix.
May want to merge to 'maint' later.
* km/avoid-cp-a (2014-04-11) 1 commit
(merged to 'next' on 2014-04-14 at be661c4)
+ test: fix t7001 cp to use POSIX options
Portability fix.
May want to merge to 'maint' later.
* mh/multimail (2014-04-07) 1 commit
(merged to 'next' on 2014-04-15 at eaba915)
+ git-multimail: update to version 1.0.0
* tb/unicode-6.3-zero-width (2014-04-09) 1 commit
(merged to 'next' on 2014-04-14 at 72ce72a)
+ utf8.c: partially update to version 6.3
Teach our display-column-counting logic about decomposed umlauts
and friends.
--------------------------------------------------
[New Topics]
* jl/git-gui-show-added-submodule-changes (2014-04-15) 1 commit
- git-gui: show staged submodules regardless of ignore config
Tentatively queued what I expect to receive via Pat Thoyts.
* jl/gitk-show-added-submodule-changes (2014-04-15) 3 commits
- gitk: show staged submodules regardless of ignore config
- gitk: Merge branch 'new' of https://github.com/vnwildman/gitk
- l10n: Init Vietnamese translation
Tentatively queued what I expect to receive via Paul Mackerras.
* bg/rebase-off-of-previous-branch (2014-04-16) 1 commit
- git-rebase: print name of rev when using shorthand
Teach "git rebase -" to report the concrete name of the branch
(i.e. the previous one).
But it stops short and does not do the same for "git rebase @{-1}".
* ef/send-email-absolute-path-to-the-command (2014-04-16) 1 commit
- send-email: recognize absolute path on Windows
* jk/config-die-bad-number-noreturn (2014-04-16) 1 commit
(merged to 'next' on 2014-04-16 at 4d49036)
+ config.c: mark die_bad_number as NORETURN
Squelch a false compiler warning from older gcc.
Will merge to 'master'.
* ep/shell-command-substitution (2014-04-17) 14 commits
- t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitution
- t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitution
- git-tag.sh: use the $( ... ) construct for command substitution
- git-revert.sh: use the $( ... ) construct for command substitution
- git-resolve.sh: use the $( ... ) construct for command substitution
- git-repack.sh: use the $( ... ) construct for command substitution
- git-merge.sh: use the $( ... ) construct for command substitution
- git-ls-remote.sh: use the $( ... ) construct for command substitution
- git-fetch.sh: use the $( ... ) construct for command substitution
- git-commit.sh: use the $( ... ) construct for command substitution
- git-clone.sh: use the $( ... ) construct for command substitution
- git-checkout.sh: use the $( ... ) construct for command substitution
- install-webdoc.sh: use the $( ... ) construct for command substitution
- howto-index.sh: use the $( ... ) construct for command substitution
Will merge to 'next' and perhaps to 'master'.
* jh/submodule-tests (2014-04-17) 1 commit
- t7410: 210 tests for various 'git submodule update' scenarios
* jx/i18n (2014-04-17) 3 commits
- i18n: only extract comments marked with "TRANSLATORS:"
- i18n: remove obsolete comments for translators in diffstat generation
- i18n: fix uncatchable comments for translators in date.c
The tip one is somewhat unfortunate to force us deviate from our
multi-line comment formatting convention when writing comments for
translators.
* rs/ref-update-check-errors-early (2014-04-17) 2 commits
- commit.c: check for lock error and return early
- sequencer.c: check for lock failure and bail early in fast_forward_to
* sk/svn-parse-datestamp (2014-04-17) 1 commit
- SVN.pm::parse_svn_date: allow timestamps with a single-digit hour
--------------------------------------------------
[Stalled]
* fc/publish-vs-upstream (2014-04-11) 8 commits
- sha1_name: add support for @{publish} marks
- sha1_name: simplify track finding
- sha1_name: cleanup interpret_branch_name()
- branch: display publish branch
- push: add --set-publish option
- branch: add --set-publish-to option
- Add concept of 'publish' branch
- t5516 (fetch-push): fix test restoration
Add branch@{publish}; it seems that this is somewhat different from
Ram and Peff started working on. There are still many discussion
messages going back and forth but not updates to the patches.
Seems to have some interactions to break t5516 when merged to 'pu'.
* tr/merge-recursive-index-only (2014-02-05) 3 commits
- merge-recursive: -Xindex-only to leave worktree unchanged
- merge-recursive: internal flag to avoid touching the worktree
- merge-recursive: remove dead conditional in update_stages()
(this branch is used by tr/remerge-diff.)
Will hold.
* tr/remerge-diff (2014-02-26) 5 commits
. log --remerge-diff: show what the conflict resolution changed
. name-hash: allow dir hashing even when !ignore_case
. merge-recursive: allow storing conflict hunks in index
. revision: fold all merge diff variants into an enum merge_diff_mode
. combine-diff: do not pass revs->dense_combined_merges redundantly
(this branch uses tr/merge-recursive-index-only.)
"log -p" output learns a new way to let users inspect a merge
commit by showing the differences between the automerged result
with conflicts the person who recorded the merge would have seen
and the final conflict resolution that was recorded in the merge.
Needs to be rebased, now kb/fast-hashmap topic is in.
* bc/blame-crlf-test (2014-02-18) 1 commit
- blame: add a failing test for a CRLF issue.
I have a feeling that a fix for this should be fairly isolated and
trivial (it should be just the matter of paying attention to the
crlf settings when synthesizing the fake commit)---perhaps somebody
can squash in a fix to this?
* jk/makefile (2014-02-05) 16 commits
- FIXUP
- move LESS/LV pager environment to Makefile
- Makefile: teach scripts to include make variables
- FIXUP
- Makefile: auto-build C strings from make variables
- Makefile: drop *_SQ variables
- FIXUP
- Makefile: add c-quote helper function
- Makefile: introduce sq function for shell-quoting
- Makefile: always create files via make-var
- Makefile: store GIT-* sentinel files in MAKE/
- Makefile: prefer printf to echo for GIT-*
- Makefile: use tempfile/mv strategy for GIT-*
- Makefile: introduce make-var helper function
- Makefile: fix git-instaweb dependency on gitweb
- Makefile: drop USE_GETTEXT_SCHEME from GIT-CFLAGS
Simplify the Makefile rules and macros that exist primarily for
quoting purposes, and make it easier to robustly express the
dependency rules.
Expecting a reroll.
* po/everyday-doc (2014-01-27) 1 commit
- Make 'git help everyday' work
This may make the said command to emit something, but the source is
not meant to be formatted into a manual pages to begin with, and
also its contents are a bit stale. It may be a good first step in
the right direction, but needs more work to at least get the
mark-up right before public consumption.
Will hold.
* jk/branch-at-publish-rebased (2014-01-17) 5 commits
. t1507 (rev-parse-upstream): fix typo in test title
. implement @{publish} shorthand
. branch_get: provide per-branch pushremote pointers
. branch_get: return early on error
. sha1_name: refactor upstream_mark
Give an easier access to the tracking branches from "other" side in
a triangular workflow by introducing B@{publish} that works in a
similar way to how B@{upstream} does.
Meant to be used as a basis for whatever Ram wants to build on.
Ejected from 'pu' to make room for fc/publish-vs-upstream topic.
* rb/merge-prepare-commit-msg-hook (2014-01-10) 4 commits
- merge: drop unused arg from abort_commit method signature
- merge: make prepare_to_commit responsible for write_merge_state
- t7505: ensure cleanup after hook blocks merge
- t7505: add missing &&
Expose more merge states (e.g. $GIT_DIR/MERGE_MODE) to hooks that
run during "git merge". The log message stresses too much on one
hook, prepare-commit-msg, but it would equally apply to other hooks
like post-merge, I think.
Waiting for a reroll.
* jl/submodule-recursive-checkout (2013-12-26) 5 commits
- Teach checkout to recursively checkout submodules
- submodule: teach unpack_trees() to update submodules
- submodule: teach unpack_trees() to repopulate submodules
- submodule: teach unpack_trees() to remove submodule contents
- submodule: prepare for recursive checkout of submodules
An RFCv2 exists ($gmane/241455) with sizable review comments.
Expecting a reroll.
* jc/graph-post-root-gap (2013-12-30) 3 commits
- WIP: document what we want at the end
- graph: remove unused code a bit
- graph: stuff the current commit into graph->columns[]
This was primarily a RFH ($gmane/239580).
* np/pack-v4 (2013-09-18) 90 commits
. packv4-parse.c: add tree offset caching
. t1050: replace one instance of show-index with verify-pack
. index-pack, pack-objects: allow creating .idx v2 with .pack v4
. unpack-objects: decode v4 trees
. unpack-objects: allow to save processed bytes to a buffer
- ...
Nico and Duy advancing the eternal vaporware pack-v4. This is here
primarily for wider distribution of the preview edition.
Needs to be rebased, now the pack-bitmap series is in.
* tg/perf-lib-test-perf-cleanup (2013-09-19) 2 commits
- perf-lib: add test_perf_cleanup target
- perf-lib: split starting the test from the execution
Add test_perf_cleanup shell function to the perf suite, that allows
the script writers to define a test with a clean-up action.
Will hold.
* jc/format-patch (2013-04-22) 2 commits
- format-patch: --inline-single
- format-patch: rename "no_inline" field
A new option to send a single patch to the standard output to be
appended at the bottom of a message. I personally have no need for
this, but it was easy enough to cobble together. Tests, docs and
stripping out more MIMEy stuff are left as exercises to interested
parties.
* jc/show-branch (2014-03-24) 5 commits
- show-branch: use commit slab to represent bitflags of arbitrary width
- show-branch.c: remove "all_mask"
- show-branch.c: abstract out "flags" operation
- show-branch.c: lift all_mask/all_revs to a global static
- show-branch.c: update comment style
Waiting for the final step to lift the hard-limit before sending it out.
--------------------------------------------------
[Cooking]
* fc/prompt-zsh-read-from-file (2014-04-14) 1 commit
(merged to 'next' on 2014-04-16 at 0e5fec0)
+ prompt: fix missing file errors in zsh
Will merge to 'master'.
* fc/transport-helper-sync-error-fix (2014-04-14) 5 commits
- transport-helper: fix sync issue on crashes
- transport-helper: trivial cleanup
- transport-helper: propagate recvline() error pushing
- remote-helpers: make recvline return an error
- transport-helper: remove barely used xchgline()
Make sure the marks are not written out when the transport helper
did not finish happily, to avoid marks file that is out of sync
with the reality.
As I had to resolve some conflicts with the recent code, will wait
until getting an OK from Felipe on the conflict resolution and then
hopefully can be merged to 'next' and then later to 'master'.
* km/avoid-non-function-return-in-rebase (2014-04-17) 2 commits
- Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"
- rebase: avoid non-function use of "return" on FreeBSD
Work around /bin/sh that does not like "return" at the top-level
of a file that is dot-sourced from inside a function definition.
Will merge to 'next' after the discussion on in-code comment settles.
We may want to merge it to 'master' by -rc1 if no regressions are
reported.
* db/make-with-curl (2014-04-15) 2 commits
(merged to 'next' on 2014-04-16 at b9c8527)
+ Makefile: allow static linking against libcurl
+ Makefile: use curl-config to determine curl flags
Ask curl-config how to link with the curl library, instead of
having only a limited configurability knobs in the Makefile.
Will merge to 'master' by -rc1 if no regressions are reported.
* nd/index-pack-one-fd-per-thread (2014-04-16) 1 commit
(merged to 'next' on 2014-04-16 at b38d5a9)
+ index-pack: work around thread-unsafe pread()
Enable threaded index-pack on platforms without thread-unsafe
pread() emulation.
Will keep in 'next' for the remainder of the cycle.
* fc/complete-aliased-push (2014-04-09) 1 commit
(merged to 'next' on 2014-04-16 at ab798d1)
+ completion: fix completing args of aliased "push", "fetch", etc.
Will merge to 'master'.
* fc/remote-helper-fixes (2014-04-14) 5 commits
(merged to 'next' on 2014-04-16 at 180482e)
+ remote-bzr: trivial test fix
+ remote-bzr: include authors field in pushed commits
+ remote-bzr: add support for older versions
+ remote-hg: always normalize paths
+ remote-helpers: allow all tests running from any dir
Will merge to 'master'.
* ym/fix-opportunistic-index-update-race (2014-04-10) 2 commits
(merged to 'next' on 2014-04-16 at cb92f4f)
+ read-cache.c: verify index file before we opportunistically update it
+ wrapper.c: add xpread() similar to xread()
Read-only operations such as "git status" that internally refreshes
the index write out the refreshed index to the disk to optimize
future accesses to the working tree, but this could race with a
"read-write" operation that modify the index while it is running.
Detect such a race and avoid overwriting the index.
Duy raised a good point that we may need to do the same for the
normal writeout codepath, not just the "opportunistic" update
codepath. While that is true, nobody sane would be running two
simultaneous operations that are clearly write-oriented competing
with each other against the same index file. So in that sense that
can be done as a less urgent follow-up for this topic.
Will keep in 'next' for the remainder of the cycle.
* jl/status-added-submodule-is-never-ignored (2014-04-07) 2 commits
- commit -m: commit staged submodules regardless of ignore config
- status/commit: show staged submodules regardless of ignore config
There also are a few patches Ronald Weiss and Jens are working on
polishing around this topic, and a patch from Jens each for gitk
and git-gui.
Waiting for the dust to settle until picking them up all.
* mh/lockfile (2014-04-15) 25 commits
- trim_last_path_elm(): replace last_path_elm()
- resolve_symlink(): take a strbuf parameter
- resolve_symlink(): use a strbuf for internal scratch space
- change lock_file::filename into a strbuf
- commit_lock_file(): use a strbuf to manage temporary space
- try_merge_strategy(): use a statically-allocated lock_file object
- try_merge_strategy(): remove redundant lock_file allocation
- struct lock_file: declare some fields volatile
- lockfile: avoid transitory invalid states
- commit_lock_file(): die() if called for unlocked lockfile object
- commit_lock_file(): inline temporary variable
- remove_lock_file(): call rollback_lock_file()
- lock_file(): exit early if lockfile cannot be opened
- write_packed_entry_fn(): convert cb_data into a (const int *)
- prepare_index(): declare return value to be (const char *)
- delete_ref_loose(): don't muck around in the lock_file's filename
- cache.h: define constants LOCK_SUFFIX and LOCK_SUFFIX_LEN
- lockfile.c: document the various states of lock_file objects
- lock_file(): always add lock_file object to lock_file_list
- hold_lock_file_for_append(): release lock on errors
- lockfile: unlock file if lockfile permissions cannot be adjusted
- rollback_lock_file(): set fd to -1
- rollback_lock_file(): do not clear filename redundantly
- api-lockfile: expand the documentation
- unable_to_lock_die(): rename function from unable_to_lock_index_die()
Refactor and fix corner-case bugs in the lockfile API, all looked
sensible.
Expecting a reroll.
* mt/patch-id-stable (2014-03-31) 3 commits
(merged to 'next' on 2014-04-08 at 0188d44)
+ patch-id-test: test --stable and --unstable flags
+ patch-id: document new behaviour
+ patch-id: make it stable against hunk reordering
Introduce a new way to compute patch-id for a patch that is not
affected by the order of the paths that appear in the input.
This changes the generated patch-id unless the users add an extra
option to their command lines, but I deliberately queued the series
to 'next' without reverting that compatibility breakage to see if
people complain. It could be that we do not have to worry about
the default flipping at all. We'll see.
Will keep in 'next' for the remainder of the cycle.
* mh/ref-transaction (2014-04-07) 27 commits
(merged to 'next' on 2014-04-16 at a99f84d)
+ ref_transaction_commit(): work with transaction->updates in place
+ struct ref_update: add a type field
+ struct ref_update: add a lock field
+ ref_transaction_commit(): simplify code using temporary variables
+ struct ref_update: store refname as a FLEX_ARRAY
+ struct ref_update: rename field "ref_name" to "refname"
+ refs: remove API function update_refs()
+ update-ref --stdin: reimplement using reference transactions
+ refs: add a concept of a reference transaction
+ update-ref --stdin: harmonize error messages
+ update-ref --stdin: improve the error message for unexpected EOF
+ t1400: test one mistake at a time
+ update-ref --stdin -z: deprecate interpreting the empty string as zeros
+ update-ref.c: extract a new function, parse_next_sha1()
+ t1400: test that stdin -z update treats empty <newvalue> as zeros
+ update-ref --stdin: simplify error messages for missing oldvalues
+ update-ref --stdin: make error messages more consistent
+ update-ref --stdin: improve error messages for invalid values
+ update-ref.c: extract a new function, parse_refname()
+ parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice
+ update-ref --stdin: read the whole input at once
+ update_refs(): fix constness
+ refs.h: rename the action_on_err constants
+ t1400: add some more tests involving quoted arguments
+ parse_arg(): really test that argument is properly terminated
+ t1400: provide more usual input to the command
+ t1400: fix name and expected result of one test
Update "update-ref --stdin [-z]" and then introduce a transactional
support for (multi-)reference updates.
Will keep in 'next' for the remainder of the cycle.
* jc/apply-ignore-whitespace (2014-03-26) 1 commit
(merged to 'next' on 2014-04-04 at 53779a7)
+ apply --ignore-space-change: lines with and without leading whitespaces do not match
"--ignore-space-change" option of "git apply" ignored the
spaces at the beginning of line too aggressively, which is
inconsistent with the option of the same name "diff" and "git diff"
have.
Will keep in 'next' for the remainder of the cycle.
* as/grep-fullname-config (2014-03-20) 1 commit
(merged to 'next' on 2014-03-28 at 810a076)
+ grep: add grep.fullName config variable
Add a configuration variable to force --full-name to be default for
"git grep".
This may cause regressions on scripted users that do not expect
this new behaviour.
Will keep in 'next' for the remainder of the cycle.
* nd/multiple-work-trees (2014-03-25) 28 commits
- count-objects: report unused files in $GIT_DIR/repos/...
- gc: support prune --repos
- gc: style change -- no SP before closing bracket
- prune: strategies for linked checkouts
- checkout: detach if the branch is already checked out elsewhere
- checkout: clean up half-prepared directories in --to mode
- checkout: support checking out into a new working directory
- use new wrapper write_file() for simple file writing
- wrapper.c: wrapper to open a file, fprintf then close
- setup.c: support multi-checkout repo setup
- setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()
- setup.c: convert check_repository_format_gently to use strbuf
- setup.c: detect $GIT_COMMON_DIR in is_git_directory()
- setup.c: convert is_git_directory() to use strbuf
- git-stash: avoid hardcoding $GIT_DIR/logs/....
- *.sh: avoid hardcoding $GIT_DIR/hooks/...
- git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects
- $GIT_COMMON_DIR: a new environment variable
- commit: use SEQ_DIR instead of hardcoding "sequencer"
- fast-import: use git_path() for accessing .git dir instead of get_git_dir()
- reflog: avoid constructing .lock path with git_path
- *.sh: respect $GIT_INDEX_FILE
- git_path(): be aware of file relocation in $GIT_DIR
- path.c: group git_path(), git_pathdup() and strbuf_git_path() together
- path.c: rename vsnpath() to do_git_path()
- git_snpath(): retire and replace with strbuf_git_path()
- path.c: make get_pathname() call sites return const char *
- path.c: make get_pathname() return strbuf instead of static buffer
A replacement for contrib/workdir/git-new-workdir that does not
rely on symbolic links and make sharing of objects and refs safer
by making the borrowee and borrowers aware of each other.
Will hold.
* ks/tree-diff-nway (2014-04-09) 20 commits
(merged to 'next' on 2014-04-09 at c17228e)
+ mingw: activate alloca
(merged to 'next' on 2014-04-08 at 6b74773)
+ combine-diff: speed it up, by using multiparent diff tree-walker directly
+ tree-diff: rework diff_tree() to generate diffs for multiparent cases as well
+ Portable alloca for Git
(merged to 'next' on 2014-03-31 at 16a7bd4)
+ tree-diff: reuse base str(buf) memory on sub-tree recursion
+ tree-diff: no need to call "full" diff_tree_sha1 from show_path()
+ tree-diff: rework diff_tree interface to be sha1 based
+ tree-diff: diff_tree() should now be static
+ tree-diff: remove special-case diff-emitting code for empty-tree cases
(merged to 'next' on 2014-03-25 at cfcbdac)
+ tree-diff: simplify tree_entry_pathcmp
+ tree-diff: show_path prototype is not needed anymore
+ tree-diff: rename compare_tree_entry -> tree_entry_pathcmp
+ tree-diff: move all action-taking code out of compare_tree_entry()
+ tree-diff: don't assume compare_tree_entry() returns -1,0,1
(merged to 'next' on 2014-03-21 at d872679)
+ tree-diff: consolidate code for emitting diffs and recursion in one place
+ tree-diff: show_tree() is not needed
+ tree-diff: no need to pass match to skip_uninteresting()
+ tree-diff: no need to manually verify that there is no mode change for a path
+ combine-diff: move changed-paths scanning logic into its own function
+ combine-diff: move show_log_first logic/action out of paths scanning
Instead of running N pair-wise diff-trees when inspecting a
N-parent merge, find the set of paths that were touched by walking
N+1 trees in parallel. These set of paths can then be turned into
N pair-wise diff-tree results to be processed through rename
detections and such. And N=2 case nicely degenerates to the usual
2-way diff-tree, which is very nice.
Will keep in 'next' for the remainder of the cycle.
* cc/interpret-trailers (2014-04-07) 12 commits
- trailer: add blank line before the trailers if needed
- Documentation: add documentation for 'git interpret-trailers'
- trailer: add tests for commands in config file
- trailer: execute command from 'trailer.<name>.command'
- trailer: add tests for "git interpret-trailers"
- trailer: add interpret-trailers command
- trailer: put all the processing together and print
- trailer: parse trailers from stdin
- trailer: process command line trailer arguments
- trailer: read and process config information
- trailer: process trailers from stdin and arguments
- trailer: add data structures and basic functions
A new filter to programatically edit the tail end of the commit log
messages.
I was planning to merge it to 'next' and keep it there for the
remainder of the cycle, but it appears that there still will be
another round of reroll, at least for the documentation?
^ permalink raw reply [relevance 1%]
* [ANNOUNCE] Git v2.0.0-rc0
@ 2014-04-18 19:37 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2014-04-18 19:37 UTC (permalink / raw)
To: git; +Cc: Linux Kernel
An early preview release Git v2.0.0-rc0 is now available for
testing at the usual places.
A major version bump between v1.x.x series and the upcoming v2.0.0
means there are a handful of backward incompatible UI improvements,
but for most people, all the tricky preparation for the transition
would have been already done for you and the upcoming release just
flips the default. Unless you were living in a cave and have stayed
with an ancient version of Git (e.g. one before 1.8.2 that was
released more than a year ago) for all these times, that is---those
of you may want to double check the backward compatibility notes
section at the beginning of the draft release notes.
The tarballs are found at:
https://www.kernel.org/pub/software/scm/git/testing/
The following public repositories all have a copy of the 'v2.0.0-rc0'
tag and the 'master' branch that the tag points at:
url = https://kernel.googlesource.com/pub/scm/git/git
url = git://repo.or.cz/alt-git.git
url = https://code.google.com/p/git-core/
url = git://git.sourceforge.jp/gitroot/git-core/git.git
url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
url = https://github.com/gitster/git
Git v2.0 Release Notes (draft)
==============================
Backward compatibility notes
----------------------------
When "git push [$there]" does not say what to push, we have used the
traditional "matching" semantics so far (all your branches were sent
to the remote as long as there already are branches of the same name
over there). In Git 2.0, the default is now the "simple" semantics,
which pushes:
- only the current branch to the branch with the same name, and only
when the current branch is set to integrate with that remote
branch, if you are pushing to the same remote as you fetch from; or
- only the current branch to the branch with the same name, if you
are pushing to a remote that is not where you usually fetch from.
You can use the configuration variable "push.default" to change
this. If you are an old-timer who wants to keep using the
"matching" semantics, you can set the variable to "matching", for
example. Read the documentation for other possibilities.
When "git add -u" and "git add -A" are run inside a subdirectory
without specifying which paths to add on the command line, they
operate on the entire tree for consistency with "git commit -a" and
other commands (these commands used to operate only on the current
subdirectory). Say "git add -u ." or "git add -A ." if you want to
limit the operation to the current directory.
"git add <path>" is the same as "git add -A <path>" now, so that
"git add dir/" will notice paths you removed from the directory and
record the removal. In older versions of Git, "git add <path>" used
to ignore removals. You can say "git add --ignore-removal <path>" to
add only added or modified paths in <path>, if you really want to.
The "-q" option to "git diff-files", which does *NOT* mean "quiet",
has been removed (it told Git to ignore deletion, which you can do
with "git diff-files --diff-filter=d").
"git request-pull" lost a few "heuristics" that often led to mistakes.
Updates since v1.9 series
-------------------------
UI, Workflows & Features
* The "multi-mail" post-receive hook (in contrib/) has been updated
to a more recent version from the upstream.
* "git gc --aggressive" learned "--depth" option and
"gc.aggressiveDepth" configuration variable to allow use of a less
insane depth than the built-in default value of 250.
* "git log" learned the "--show-linear-break" option to show where a
single strand-of-pearls is broken in its output.
* The "rev-parse --parseopt" mechanism used by scripted Porcelains to
parse command line options and to give help text learned to take
the argv-help (the placeholder string for an option parameter,
e.g. "key-id" in "--gpg-sign=<key-id>").
* The pattern to find where the function begins in C/C++ used in
"diff" and "grep -p" have been updated to help C++ source better.
* "git rebase" learned to interpret a lone "-" as "@{-1}", the
branch that we were previously on.
* "git commit --cleanup=<mode>" learned a new mode, scissors.
* "git tag --list" output can be sorted using "version sort" with
"--sort=version:refname".
* Discard the accumulated "heuristics" to guess from which branch the
result wants to be pulled from and make sure what the end user
specified is not second-guessed by "git request-pull", to avoid
mistakes. When you pushed out your 'master' branch to your public
repository as 'for-linus', use the new "master:for-linus" syntax to
denote the branch to be pulled.
* "git grep" learned to behave in a way similar to native grep when
"-h" (no header) and "-c" (count) options are given.
* transport-helper, fast-import and fast-export have been updated to
allow the ref mapping and ref deletion in a way similar to the
natively supported transports.
* The "simple" mode is the default for "git push".
* "git add -u" and "git add -A", when run without any pathspec, is a
tree-wide operation even when run inside a subdirectory of a
working tree.
* "git add <path> is the same as "git add -A <path>" now.
* "core.statinfo" configuration variable, which is a
never-advertised synonym to "core.checkstat", has been removed.
* The "-q" option to "git diff-files", which does *NOT* mean
"quiet", has been removed (it told Git to ignore deletion, which
you can do with "git diff-files --diff-filter=d").
* Server operators can loosen the "tips of refs only" restriction for
the remote archive service with the uploadarchive.allowUnreachable
configuration option.
* The progress indicators from various time-consuming commands have
been marked for i18n/l10n.
* "git notes -C <blob>" diagnoses an attempt to use an object that
is not a blob as an error.
* "git config" learned to read from the standard input when "-" is
given as the value to its "--file" parameter (attempting an
operation to update the configuration in the standard input of
course is rejected).
* Trailing whitespaces in .gitignore files, unless they are quoted
for fnmatch(3), e.g. "path\ ", are warned and ignored. Strictly
speaking, this is a backward incompatible change, but very unlikely
to bite any sane user and adjusting should be obvious and easy.
* Many commands that create commits, e.g. "pull", "rebase",
learned to take the --gpg-sign option on the command line.
* "git commit" can be told to always GPG sign the resulting commit
by setting "commit.gpgsign" configuration variable to true (the
command line option --no-gpg-sign should override it).
* "git pull" can be told to only accept fast-forward by setting the
new "pull.ff" configuration.
* "git reset" learned "-N" option, which does not reset the index
fully for paths the index knows about but the tree-ish the command
resets to does not (these paths are kept as intend-to-add entries).
Performance, Internal Implementation, etc.
* The compilation options to port to AIX and to MSVC have been
updated.
* We started using wildmatch() in place of fnmatch(3) a few releases
ago; complete the process and stop using fnmatch(3).
* Uses of curl's "multi" interface and "easy" interface do not mix
well when we attempt to reuse outgoing connections. Teach the RPC
over http code, used in the smart HTTP transport, not to use the
"easy" interface.
* The bitmap-index feature from JGit has been ported, which should
significantly improve performance when serving objects form a
repository that uses it.
* The way "git log --cc" shows a combined diff against multiple
parents have been optimized.
* The prefixcmp() and suffixcmp() functions are gone. Use
starts_with() and ends_with(), and also consider if skip_prefix()
suits your needs better when using the former.
Also contains various documentation updates and code clean-ups. Many
of them came from flurry of activities as GSoC candidate microproject
exercises.
Fixes since v1.9 series
-----------------------
Unless otherwise noted, all the fixes since v1.9 in the maintenance
track are contained in this release (see the maintenance releases'
notes for details).
* zsh prompt (in contrib/) leaked unnecessary error messages.
* bash completion (in contrib/) did not complete the refs and remotes
correctly given "git pu<TAB>" when "pu" is aliased to "push".
* Some more Unicode codepoints defined in Unicode 6.3 as having zero
width have been taught to our display column counting logic.
(merge d813ab9 tb/unicode-6.3-zero-width later to maint).
* Some tests used shell constructs that did not work well on FreeBSD
(merge ff7a1c6 km/avoid-bs-in-shell-glob later to maint).
(merge 00764ca km/avoid-cp-a later to maint).
* "git update-ref --stdin" did not fail a request to create a ref
when the ref already existed.
(merge b9d56b5 mh/update-ref-batch-create-fix later to maint).
* "git diff --no-index -Mq a b" fell into an infinite loop.
(merge ad1c3fb jc/fix-diff-no-index-diff-opt-parse later to maint).
* "git fetch --prune", when the right-hand-side of multiple fetch
refspecs overlap (e.g. storing "refs/heads/*" to
"refs/remotes/origin/*", while storing "refs/frotz/*" to
"refs/remotes/origin/fr/*"), aggressively thought that lack of
"refs/heads/fr/otz" on the origin site meant we should remove
"refs/remotes/origin/fr/otz" from us, without checking their
"refs/frotz/otz" first.
Note that such a configuration is inherently unsafe (think what
should happen when "refs/heads/fr/otz" does appear on the origin
site), but that is not a reason not to be extra careful.
(merge e6f6371 cn/fetch-prune-overlapping-destination later to maint).
* "git status --porcelain --branch" showed its output with labels
"ahead/behind/gone" translated to the user's locale.
(merge 7a76c28 mm/status-porcelain-format-i18n-fix later to maint).
* A stray environment variable $prefix could have leaked into and
affected the behaviour of the "subtree" script (in contrib/).
* When it is not necessary to edit a commit log message (e.g. "git
commit -m" is given a message without specifying "-e"), we used to
disable the spawning of the editor by overriding GIT_EDITOR, but
this means all the uses of the editor, other than to edit the
commit log message, are also affected.
(merge b549be0 bp/commit-p-editor later to maint).
* "git mv" that moves a submodule forgot to adjust the array that
uses to keep track of which submodules were to be moved to update
its configuration.
(merge fb8a4e8 jk/mv-submodules-fix later to maint).
* Length limit for the pathname used when removing a path in a deep
subdirectory has been removed to avoid buffer overflows.
(merge 2f29e0c mh/remove-subtree-long-pathname-fix later to maint).
* The test helper lib-terminal always run an actual test_expect_*
when included, which screwed up with the use of skil-all that may
have to be done later.
(merge 7e27173 jk/lib-terminal-lazy later to maint).
* "git index-pack" used a wrong variable to name the keep-file in an
error message when the file cannot be written or closed.
(merge de983a0 nd/index-pack-error-message later to maint).
* "rebase -i" produced a broken insn sheet when the title of a commit
happened to contain '\n' (or ended with '\c') due to a careless use
of 'echo'.
(merge cb1aefd us/printf-not-echo later to maint).
* There were a few instances of 'git-foo' remaining in the
documentation that should have been spelled 'git foo'.
(merge 3c3e6f5 rr/doc-merge-strategies later to maint).
* Serving objects from a shallow repository needs to write a
new file to hold the temporary shallow boundaries but it was not
cleaned when we exit due to die() or a signal.
(merge 7839632 jk/shallow-update-fix later to maint).
* When "git stash pop" stops after failing to apply the stash
(e.g. due to conflicting changes), the stash is not dropped. State
that explicitly in the output to let the users know.
(merge 2d4c993 jc/stash-pop-not-popped later to maint).
* The labels in "git status" output that describe the nature of
conflicts (e.g. "both deleted") were limited to 20 bytes, which was
too short for some l10n (e.g. fr).
(merge c7cb333 jn/wt-status later to maint).
* "git clean -d pathspec" did not use the given pathspec correctly
and ended up cleaning too much.
(merge 1f2e108 jk/clean-d-pathspec later to maint).
* "git difftool" misbehaved when the repository is bound to the
working tree with the ".git file" mechanism, where a textual file
".git" tells us where it is.
(merge fcfec8b da/difftool-git-files later to maint).
* "git push" did not pay attention to branch.*.pushremote if it is
defined earlier than remote.pushdefault; the order of these two
variables in the configuration file should not matter, but it did
by mistake.
(merge 98b406f jk/remote-pushremote-config-reading later to maint).
* Codepaths that parse timestamps in commit objects have been
tightened.
(merge f80d1f9 jk/commit-dates-parsing-fix later to maint).
* "git diff --external-diff" incorrectly fed the submodule directory
in the working tree to the external diff driver when it knew it is
the same as one of the versions being compared.
(merge aba4727 tr/diff-submodule-no-reuse-worktree later to maint).
* "git reset" needs to refresh the index when working in a working
tree (it can also be used to match the index to the HEAD in an
otherwise bare repository), but it failed to set up the working
tree properly, causing GIT_WORK_TREE to be ignored.
(merge b7756d4 nd/reset-setup-worktree later to maint).
* "git check-attr" when working on a repository with a working tree
did not work well when the working tree was specified via the
--work-tree (and obviously with --git-dir) option.
(merge cdbf623 jc/check-attr-honor-working-tree later to maint).
* "merge-recursive" was broken in 1.7.7 era and stopped working in
an empty (temporary) working tree, when there are renames
involved. This has been corrected.
(merge 6e2068a bk/refresh-missing-ok-in-merge-recursive later to maint.)
* "git rev-parse" was loose in rejecting command line arguments
that do not make sense, e.g. "--default" without the required
value for that option.
(merge a43219f ds/rev-parse-required-args later to maint.)
* include.path variable (or any variable that expects a path that
can use ~username expansion) in the configuration file is not a
boolean, but the code failed to check it.
(merge 67beb60 jk/config-path-include-fix later to maint.)
* Commands that take pathspecs on the command line misbehaved when
the pathspec is given as an absolute pathname (which is a
practice not particularly encouraged) that points at a symbolic
link in the working tree.
(merge later 655ee9e mw/symlinks to maint.)
* "git diff --quiet -- pathspec1 pathspec2" sometimes did not return
correct status value.
(merge f34b205 nd/diff-quiet-stat-dirty later to maint.)
* Attempting to deepen a shallow repository by fetching over smart
HTTP transport failed in the protocol exchange, when no-done
extension was used. The fetching side waited for the list of
shallow boundary commits after the sending end stopped talking to
it.
(merge 0232852 nd/http-fetch-shallow-fix later to maint.)
* Allow "git cmd path/", when the 'path' is where a submodule is
bound to the top-level working tree, to match 'path', despite the
extra and unnecessary trailing slash (such a slash is often
given by command line completion).
(merge 2e70c01 nd/submodule-pathspec-ending-with-slash later to maint.)
* Documentation and in-code comments had many instances of mistaken
use of "nor", which have been corrected.
(merge 235e8d5 jl/nor-or-nand-and later to maint).
----------------------------------------------------------------
Changes since v1.9.2 are as follows:
Adam (1):
branch.c: install_branch_config: simplify if chain
Albert L. Lash, IV (4):
docs/merge-strategies: remove hyphen from mis-merges
docs/git-remote: capitalize first word of initial blurb
docs/git-clone: clarify use of --no-hardlinks option
docs/git-blame: explain more clearly the example pickaxe use
Andrew Keller (1):
gitweb: Avoid overflowing page body frame with large images
Astril Hayato (1):
Documentation/gitk: document the location of the configulation file
Benoit Sigoure (1):
git-compat-util.h: #undef (v)snprintf before #define them
Brian Bourn (2):
diff-no-index: rename read_directory()
diff-no-index: replace manual "."/".." check with is_dot_or_dotdot()
Brian Gesiak (3):
t3200-branch: test setting branch as own upstream
branch: use skip_prefix() in install_branch_config()
rebase: allow "-" short-hand for the previous branch
Charles Bailey (2):
dir.c: make git_fnmatch() not inline
tests: don't rely on strerror text when testing rmdir failure
Chris Angelico (1):
config.txt: third-party tools may and do use their own variables
Chris Packham (2):
Documentation/git-am: Document supported --patch-format options
Documentation/git-am: typofix
Christian Couder (1):
strbuf: remove prefixcmp() and suffixcmp()
David Aguilar (2):
pull: add pull.ff configuration
pull: add --ff-only to the help text
David Kastrup (6):
builtin/blame.c: struct blame_entry does not need a prev link
builtin/blame.c: eliminate same_suspect()
builtin/blame.c::prepare_lines: fix allocation size of sb->lineno
blame.c: prepare_lines should not call xrealloc for every line
builtin/blame.c::find_copy_in_blob: no need to scan for region end
skip_prefix(): scan prefix only once
David Tran (1):
tests: use "env" to run commands with temporary env-var settings
Dirk Wallenstein (1):
doc: status, remove leftover statement about '#' prefix
Dmitry Marakasov (1):
configure.ac: link with -liconv for locale_charset()
Dmitry S. Dolzhenko (15):
commit.c: use the generic "sha1_pos" function for lookup
builtin/pack-objects.c: use ALLOC_GROW() in check_pbase_path()
bundle.c: use ALLOC_GROW() in add_to_ref_list()
cache-tree.c: use ALLOC_GROW() in find_subtree()
commit.c: use ALLOC_GROW() in register_commit_graft()
diff.c: use ALLOC_GROW()
diffcore-rename.c: use ALLOC_GROW()
patch-ids.c: use ALLOC_GROW() in add_commit()
replace_object.c: use ALLOC_GROW() in register_replace_object()
reflog-walk.c: use ALLOC_GROW()
dir.c: use ALLOC_GROW() in create_simplify()
attr.c: use ALLOC_GROW() in handle_attr_line()
builtin/mktree.c: use ALLOC_GROW() in append_to_tree()
read-cache.c: use ALLOC_GROW() in add_index_entry()
sha1_file.c: use ALLOC_GROW() in pretend_sha1_file()
Elia Pinto (9):
bisect.c: reduce scope of variable
builtin/apply.c: reduce scope of variables
builtin/blame.c: reduce scope of variables
builtin/clean.c: reduce scope of variable
builtin/commit.c: reduce scope of variables
builtin/fetch.c: reduce scope of variable
builtin/gc.c: reduce scope of variables
check-builtins.sh: use the $(...) construct for command substitution
git-am.sh: use the $(...) construct for command substitution
Eric Sunshine (2):
name-hash: retire unused index_name_exists()
sh-i18n--envsubst: retire unused string_list_member()
Fabian Ruch (1):
add: use struct argv_array in run_add_interactive()
Felipe Contreras (10):
transport-helper: mismerge fix
transport-helper: don't update refs in dry-run
transport-helper: add 'force' to 'export' helpers
transport-helper: check for 'forced update' message
remote-helpers: allow all tests running from any dir
remote-hg: always normalize paths
remote-bzr: add support for older versions
completion: fix completing args of aliased "push", "fetch", etc.
remote-bzr: trivial test fix
prompt: fix missing file errors in zsh
Hiroyuki Sano (1):
fsck: use bitwise-or assignment operator to set flag
Ilya Bobyr (1):
rev-parse --parseopt: option argument name hints
Jacopo Notarstefano (2):
git-bisect.sh: fix a few style issues
branch.c: delete size check of newly tracked branch names
Jeff King (43):
pack-objects: split add_object_entry
repack: stop using magic number for ARRAY_SIZE(exts)
repack: turn exts array into array-of-struct
repack: handle optional files created by pack-objects
t: add basic bitmap functionality tests
t/perf: add tests for pack bitmaps
cat-file: refactor error handling of batch_objects
cat-file: fix a minor memory leak in batch_objects
do not discard revindex when re-preparing packfiles
block-sha1: factor out get_be and put_be wrappers
read-cache: use get_be32 instead of hand-rolled ntoh_l
tests: auto-set git-daemon port
ewah: unconditionally ntohll ewah data
tests: turn on network daemon tests by default
http: never use curl_easy_perform
config: disallow relative include paths from blobs
docs: clarify remote restrictions for git-upload-archive
CodingGuidelines: mention C whitespace rules
repack: add `repack.packKeptObjects` config var
docs: mark info/grafts as outdated
match_explicit: hoist refspec lhs checks into their own function
match_explicit_lhs: allow a "verify only" mode
push: detect local refspec errors early
cat-file: restore warn_on_object_refname_ambiguity flag
rev-list: disable object/refname ambiguity check with --stdin
pack-objects: show progress for reused packfiles
pack-objects: show reused packfile objects in "Counting objects"
pack-objects: turn off bitmaps when skipping objects
subtree: initialize "prefix" variable
t/Makefile: stop setting GIT_CONFIG
t/test-lib: drop redundant unset of GIT_CONFIG
t: drop useless sane_unset GIT_* calls
t: stop using GIT_CONFIG to cross repo boundaries
t: prefer "git config --file" to GIT_CONFIG with test_must_fail
t: prefer "git config --file" to GIT_CONFIG
t0001: make symlink reinit test more careful
t0001: use test_path_is_*
t0001: use test_config_global
t0001: use test_must_fail
t0001: drop useless subshells
t0001: drop subshells just for "cd"
pack-objects: do not reuse packfiles without --delta-base-offset
config.c: mark die_bad_number as NORETURN
Jens Lehmann (2):
submodule: don't access the .gitmodules cache entry after removing it
submodule update: consistently document the '--checkout' option
Johan Herland (1):
notes: disallow reusing non-blob as a note object
Johannes Sixt (11):
t0008: skip trailing space test on Windows
userdiff: support C++ ->* and .* operators in the word regexp
userdiff: support unsigned and long long suffixes of integer constants
t4018: an infrastructure to test hunk headers
t4018: convert perl pattern tests to the new infrastructure
t4018: convert java pattern test to the new infrastructure
t4018: convert custom pattern test to the new infrastructure
t4018: reduce test files for pattern compilation tests
t4018: test cases for the built-in cpp pattern
t4018: test cases showing that the cpp pattern misses many anchor points
userdiff: have 'cpp' hunk header pattern catch more C++ anchor points
John Keeping (4):
notes-utils: handle boolean notes.rewritemode correctly
utf8: fix iconv error detection
utf8: use correct type for values in interval table
builtin/mv: don't use memory after free
John Marshall (1):
stash doc: mention short form -k in save description
Jonathan Nieder (3):
am doc: add a pointer to relevant hooks
.gitignore: test-hashmap is a generated file
test-hashmap.c: drop unnecessary #includes
Junio C Hamano (35):
git add <pathspec>... defaults to "-A"
git add: -u/-A now affects the entire working tree
core.statinfo: remove as promised in Git 2.0
push: switch default from "matching" to "simple"
diff: remove "diff-files -q" in a version of Git in a distant future
push: switch default from "matching" to "simple"
t3004: add test for ls-files on symlinks via absolute paths
open_istream(): do not dereference NULL in the error case
combine-diff: simplify intersect_paths() further
commit-tree: add and document --no-gpg-sign
request-pull: pick up tag message as before
request-pull: test updates
request-pull: resurrect "pretty refname" feature
*.sh: drop useless use of "env"
tag: grok "--with" as synonym to "--contains"
Start preparing for Git 2.0
request-pull: documentation updates
Update draft release notes to Git 2.0
Update draft release notes to Git 2.0
Update draft release notes to 2.0
t1502: protect runs of SPs used in the indentation
parse-options: multi-word argh should use dash to separate words
update-index: teach --cacheinfo a new syntax "mode,sha1,path"
parse-options: make sure argh string does not have SP or _
Update draft release notes to 2.0
Update draft release notes to 2.0
parse-options: add cast to correct pointer type to OPT_SET_PTR
Update draft release notes to 2.0
Revert "Merge branch 'wt/doc-submodule-name-path-confusion-2'"
Revert "submodule: explicit local branch creation in module_clone"
Revert part of 384364b (Start preparing for Git 2.0, 2014-03-07)
Update draft release notes to 2.0
Update draft release notes to 2.0
Update draft release notes for 2.0
Git 2.0-rc0
Karsten Blees (14):
add a hashtable implementation that supports O(1) removal
buitin/describe.c: use new hash map implementation
diffcore-rename.c: move code around to prepare for the next patch
diffcore-rename.c: simplify finding exact renames
diffcore-rename.c: use new hash map implementation
name-hash.c: use new hash map implementation for directories
name-hash.c: remove unreferenced directory entries
name-hash.c: use new hash map implementation for cache entries
name-hash.c: remove cache entries instead of marking them CE_UNHASHED
remove old hash.[ch] implementation
fix 'git update-index --verbose --again' output
builtin/update-index.c: cleanup update_one
read-cache.c: fix memory leaks caused by removed cache entries
hashmap.h: use 'unsigned int' for hash-codes everywhere
Kirill A. Shutemov (3):
builtin/config.c: rename check_blob_write() -> check_write()
config: change git_config_with_options() interface
config: teach "git config --file -" to read from the standard input
Kirill Smelkov (10):
tree-diff: allow diff_tree_sha1 to accept NULL sha1
tree-diff: convert diff_root_tree_sha1() to just call diff_tree_sha1 with old=NULL
line-log: convert to using diff_tree_sha1()
revision: convert to using diff_tree_sha1()
tree-walk: finally switch over tree descriptors to contain a pre-parsed entry
diffcore-order: export generic ordering interface
diff test: add tests for combine-diff with orderfile
combine-diff: optimize combine_diff_path sets intersection
combine-diff: combine_diff_path.len is not needed anymore
tests: add checking that combine-diff emits only correct paths
Kyle J. McKay (2):
test: fix t7001 cp to use POSIX options
test: fix t5560 on FreeBSD
Lars Gullik Bjønnes (1):
git-contacts: do not fail parsing of good diffs
Linus Torvalds (2):
request-pull: more strictly match local/remote branches
request-pull: allow "local:remote" to specify names on both ends
Marat Radchenko (5):
MSVC: allow linking with the cURL library
MSVC: link in invalidcontinue.obj for better POSIX compatibility
MSVC: fix t0040-parse-options crash
parse-options: remove unused OPT_SET_PTR
MSVC: allow using ExtUtils::MakeMaker
Martin Erik Werner (5):
t0060: add test for prefix_path on symlinks via absolute paths
t0060: add test for prefix_path when path == work tree
t0060: add tests for prefix_path when path begins with work tree
setup: add abspath_part_inside_repo() function
setup: don't dereference in-tree symlinks for absolute paths
Max Horn (2):
transport-helper.c: do not overwrite forced bit
remote-hg: do not fail on invalid bookmarks
Michael Haggerty (14):
rename read_replace_refs to check_replace_refs
replace_object: use struct members instead of an array
find_pack_entry(): document last_found_pack
sha1_file_name(): declare to return a const string
sha1_file.c: document a bunch of functions defined in the file
Add docstrings for lookup_replace_object() and do_lookup_replace_object()
Document some functions defined in object.c
cache_tree_find(): remove redundant checks
cache_tree_find(): find the end of path component using strchrnul()
cache_tree_find(): fix comment formatting
cache_tree_find(): remove redundant check
cache_tree_find(): remove early return
cache_tree_find(): use path variable when passing over slashes
git-multimail: update to version 1.0.0
Nguyễn Thái Ngọc Duy (24):
count-objects: recognize .bitmap in garbage-checking
t7101, t7014: rename test files to indicate what that file is for
reset: support "--mixed --intent-to-add" mode
daemon: move daemonize() to libgit.a
gc: config option for running --auto in background
dir: warn about trailing spaces in exclude patterns
dir: ignore trailing spaces in exclude patterns
wt-status.c: make cut_line[] const to shrink .data section a bit
wt-status.c: move cut-line print code out to wt_status_add_cut_line
use wildmatch() directly without fnmatch() wrapper
Revert "test-wildmatch: add "perf" command to compare wildmatch and fnmatch"
stop using fnmatch (either native or compat)
actually remove compat fnmatch source code
sha1_file: fix delta_stack memory leak in unpack_entry
i18n: mark all progress lines for translation
commit: add --cleanup=scissors
tag: support --sort=<spec>
strbuf: style fix -- top opening bracket on a separate line
upload-pack: send shallow info over stdin to pack-objects
connect.c: SP after "}", not TAB
object.h: centralize object flag allocation
log: add --show-linear-break to help see non-linear history
gc --aggressive: make --depth configurable
environment.c: fix constness for odb_pack_keep()
Nicolas Vigier (10):
cherry-pick, revert: add the --gpg-sign option
git-sh-setup.sh: add variable to use the stuck-long mode
am: parse options in stuck-long mode
am: add the --gpg-sign option
rebase: remove useless arguments check
rebase: don't try to match -M option
rebase: parse options in stuck-long mode
rebase: add the --gpg-sign option
commit-tree: add the commit.gpgsign option to sign all commits
test the commit.gpgsign config option
Ralf Thielow (1):
help.c: rename function "pretty_print_string_list"
René Scharfe (13):
t7810: add missing variables to tests in loop
grep: support -h (no header) with --count
t4209: set up expectations up front
t4209: factor out helper function test_log()
t4209: factor out helper function test_log_icase()
t4209: use helper functions to test --grep
t4209: use helper functions to test --author
pickaxe: honor -i when used with -S and --pickaxe-regex
pickaxe: merge diffcore_pickaxe_grep() and diffcore_pickaxe_count() into diffcore_pickaxe()
pickaxe: move pickaxe() after pickaxe_match()
pickaxe: call strlen only when necessary in diffcore_pickaxe_count()
pickaxe: simplify kwset loop in contains()
rev-parse: fix typo in example on manpage
Richard Hansen (2):
test-hg.sh: tests are now expected to pass
remote-bzr: support the new 'force' option
Richard Lowe (1):
diffcore.h: be explicit about the signedness of is_binary
Roberto Tyley (1):
Documentation: fix documentation AsciiDoc links for external urls
Rohit Mani (1):
use strchrnul() in place of strchr() and strlen()
Scott J. Goldman (1):
add uploadarchive.allowUnreachable option
Sebastian Schuberth (1):
t5510: Do not use $(pwd) when fetching / pushing / pulling via rsync
Simon Ruderich (2):
git-config: document interactive.singlekey requires Term::ReadKey
git-add--interactive: warn if module for interactive.singlekey is missing
Sun He (3):
write_pack_file: use correct variable in diagnostic
finish_tmp_packfile():use strbuf for pathname construction
Use hashcpy() when copying object names
Sup Yut Sum (1):
completion: teach --recurse-submodules to fetch, pull and push
Tanay Abhra (1):
commit.c: use skip_prefix() instead of starts_with()
Tay Ray Chuan (1):
demonstrate git-commit --dry-run exit code behaviour
Thomas Gummerer (3):
introduce GIT_INDEX_VERSION environment variable
test-lib: allow setting the index format version
read-cache: add index.version config variable
Torsten Bögershausen (1):
utf8.c: partially update to version 6.3
Vicent Marti (16):
revindex: export new APIs
pack-objects: refactor the packing list
pack-objects: factor out name_hash
revision: allow setting custom limiter function
sha1_file: export `git_open_noatime`
compat: add endianness helpers
ewah: compressed bitmap implementation
documentation: add documentation for the bitmap format
pack-bitmap: add support for bitmap indexes
pack-objects: use bitmaps when packing objects
rev-list: add bitmap mode to speed up object lists
pack-objects: implement bitmap writing
repack: consider bitmaps when performing repacks
pack-bitmap: implement optional name_hash cache
ewah: support platforms that require aligned reads
add `ignore_missing_links` mode to revwalk
Vlad Dogaru (1):
git-p4: explicitly specify that HEAD is a revision
W. Trevor King (6):
submodule: make 'checkout' update_module mode more explicit
submodule: document module_clone arguments in comments
submodule: explicit local branch creation in module_clone
Documentation: describe 'submodule update --remote' use case
doc: submodule.* config are keyed by submodule names
doc: submodule.*.branch config is keyed by name
Yuxuan Shui (2):
fsck.c:fsck_ident(): ident points at a const string
fsck.c:fsck_commit(): use skip_prefix() to verify and skip constant
brian m. carlson (1):
pull: add the --gpg-sign option.
dequis (1):
remote-bzr: include authors field in pushed commits
Дилян Палаузов (1):
Makefile: describe CHARSET_LIB better
^ permalink raw reply [relevance 1%]
* [ANNOUNCE] Git v1.9.3
@ 2014-05-09 20:00 4% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2014-05-09 20:00 UTC (permalink / raw)
To: git; +Cc: Linux Kernel
The latest maintenance release Git v1.9.3 is now available at
the usual places.
The tarballs are found at:
https://www.kernel.org/pub/software/scm/git/testing/
The following public repositories will all have a copy of the
'v1.9.3' tag and the 'maint' branch that the tag points at:
url = https://kernel.googlesource.com/pub/scm/git/git
url = git://repo.or.cz/alt-git.git
url = https://code.google.com/p/git-core/
url = git://git.sourceforge.jp/gitroot/git-core/git.git
url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
url = https://github.com/gitster/git
but I am cutting 2.0.0-rc3 today, so you may have to wait for a bit
until these repositories are updated.
Git v1.9.3 Release Notes
========================
Fixes since v1.9.2
------------------
* "git p4" dealing with changes in binary files were broken by a
change in 1.9 release.
* The shell prompt script (in contrib/), when using the PROMPT_COMMAND
interface, used an unsafe construct when showing the branch name in
$PS1.
* "git rebase" used a POSIX shell construct FreeBSD /bin/sh does not
work well with.
* Some more Unicode codepoints defined in Unicode 6.3 as having
zero width have been taught to our display column counting logic.
* Some tests used shell constructs that did not work well on
FreeBSD.
----------------------------------------------------------------
Changes since v1.9.2 are as follows:
Jonathan Nieder (1):
shell doc: remove stray "+" in example
Junio C Hamano (2):
Start preparing for 1.9.3
Git 1.9.3
Kyle J. McKay (4):
test: fix t7001 cp to use POSIX options
test: fix t5560 on FreeBSD
rebase: avoid non-function use of "return" on FreeBSD
Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"
Richard Hansen (1):
git-prompt.sh: don't put unsanitized branch names in $PS1
Tolga Ceylan (1):
git-p4: format-patch to diff-tree change breaks binary patches
Torsten Bögershausen (1):
utf8.c: partially update to version 6.3
^ permalink raw reply [relevance 4%]
* Please pull the patch series "use the $( ... ) construct for command substitution"
@ 2014-05-14 15:23 3% Elia Pinto
0 siblings, 0 replies; 200+ results
From: Elia Pinto @ 2014-05-14 15:23 UTC (permalink / raw)
To: git@vger.kernel.org; +Cc: Matthieu Moy
The following changes since commit 6308767f0bb58116cb405e1f4f77f5dfc1589920:
Merge branch 'fc/prompt-zsh-read-from-file' (2014-05-13 11:53:14 -0700)
are available in the git repository at:
https://github.com/devzero2000/git-core.git ep/shell-command-substitution-v4
for you to fetch changes up to 8c8883150c391fae33c122228af937594142600e:
test-lib-functions.sh: use the $( ... ) construct for command
substitution (2014-05-14 05:34:52 -0700)
----------------------------------------------------------------
I have re-created a branch with these patches based on a previous
observation made here
http://www.spinics.net/lists/git/msg230236.html
Thanks very much to the people (Matthieu i think)
that will make the reviews, I understand it's boring
----------------------------------------------------------------
Elia Pinto (83):
t5003-archive-zip.sh: use the $( ... ) construct for command substitution
t5517-push-mirror.sh: use the $( ... ) construct for command substitution
t6002-rev-list-bisect.sh: use the $( ... ) construct for command
substitution
t7700-repack.sh: use the $( ... ) construct for command substitution
t5100-mailinfo.sh: use the $( ... ) construct for command substitution
t5520-pull.sh: use the $( ... ) construct for command substitution
t6015-rev-list-show-all-parents.sh: use the $( ... ) construct
for command substitution
t8003-blame-corner-cases.sh: use the $( ... ) construct for
command substitution
t5300-pack-object.sh: use the $( ... ) construct for command substitution
t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
t6032-merge-large-rename.sh: use the $( ... ) construct for
command substitution
t5301-sliding-window.sh: use the $( ... ) construct for command
substitution
t5530-upload-pack-error.sh: use the $( ... ) construct for
command substitution
t6034-merge-rename-nocruft.sh: use the $( ... ) construct for
command substitution
t9100-git-svn-basic.sh: use the $( ... ) construct for command
substitution
t5302-pack-index.sh: use the $( ... ) construct for command substitution
t5537-fetch-shallow.sh: use the $( ... ) construct for command
substitution
t6132-pathspec-exclude.sh: use the $( ... ) construct for
command substitution
t9101-git-svn-props.sh: use the $( ... ) construct for command
substitution
t5303-pack-corruption-resilience.sh: use the $( ... ) construct
for command substitution
t5538-push-shallow.sh: use the $( ... ) construct for command substitution
t7001-mv.sh: use the $( ... ) construct for command substitution
t9104-git-svn-follow-parent.sh: use the $( ... ) construct for
command substitution
t5304-prune.sh: use the $( ... ) construct for command substitution
t5550-http-fetch-dumb.sh: use the $( ... ) construct for command
substitution
t7003-filter-branch.sh: use the $( ... ) construct for command
substitution
t9105-git-svn-commit-diff.sh: use the $( ... ) construct for
command substitution
t5305-include-tag.sh: use the $( ... ) construct for command substitution
t5551-http-fetch-smart.sh: use the $( ... ) construct for
command substitution
t7004-tag.sh: use the $( ... ) construct for command substitution
t9107-git-svn-migrate.sh: use the $( ... ) construct for command
substitution
t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
t5570-git-daemon.sh: use the $( ... ) construct for command substitution
t7006-pager.sh: use the $( ... ) construct for command substitution
t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution
t5505-remote.sh: use the $( ... ) construct for command substitution
t5601-clone.sh: use the $( ... ) construct for command substitution
t7103-reset-bare.sh: use the $( ... ) construct for command substitution
t9109-git-svn-multi-glob.sh: use the $( ... ) construct for
command substitution
t5506-remote-groups.sh: use the $( ... ) construct for command
substitution
t5700-clone-reference.sh: use the $( ... ) construct for command
substitution
t7406-submodule-update.sh: use the $( ... ) construct for
command substitution
t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for
command substitution
t5510-fetch.sh: use the $( ... ) construct for command substitution
t5710-info-alternate.sh: use the $( ... ) construct for command
substitution
t7408-submodule-reference.sh: use the $( ... ) construct for
command substitution
t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for
command substitution
t5515-fetch-merge-logic.sh: use the $( ... ) construct for
command substitution
t5900-repo-selection.sh: use the $( ... ) construct for command
substitution
t7504-commit-msg-hook.sh: use the $( ... ) construct for command
substitution
t5516-fetch-push.sh: use the $( ... ) construct for command substitution
t6001-rev-list-graft.sh: use the $( ... ) construct for command
substitution
t7602-merge-octopus-many.sh: use the $( ... ) construct for
command substitution
unimplemented.sh: use the $( ... ) construct for command substitution
t1100-commit-tree-options.sh: use the $( ... ) construct for
command substitution
t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
t1410-reflog.sh: use the $( ... ) construct for command substitution
t1511-rev-parse-caret.sh: use the $( ... ) construct for command
substitution
t1512-rev-parse-disambiguation.sh: use the $( ... ) construct
for command substitution
t2102-update-index-symlinks.sh: use the $( ... ) construct for
command substitution
t3030-merge-recursive.sh: use the $( ... ) construct for command
substitution
t3100-ls-tree-restrict.sh: use the $( ... ) construct for
command substitution
t3101-ls-tree-dirname.sh: use the $( ... ) construct for command
substitution
t3210-pack-refs.sh: use the $( ... ) construct for command substitution
t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
t3511-cherry-pick-x.sh: use the $( ... ) construct for command
substitution
t3600-rm.sh: use the $( ... ) construct for command substitution
t3700-add.sh: use the $( ... ) construct for command substitution
t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for
command substitution
t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct
for command substitution
t9119-git-svn-info.sh: use the $( ... ) construct for command substitution
t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct
for command substitution
t9130-git-svn-authors-file.sh: use the $( ... ) construct for
command substitution
t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for
command substitution
t9137-git-svn-dcommit-clobber-series.sh: use the $( ... )
construct for command substitution
t9138-git-svn-authors-prog.sh: use the $( ... ) construct for
command substitution
t9145-git-svn-master-branch.sh: use the $( ... ) construct for
command substitution
t9150-svk-mergetickets.sh: use the $( ... ) construct for
command substitution
t9300-fast-import.sh: use the $( ... ) construct for command substitution
t9350-fast-export.sh: use the $( ... ) construct for command substitution
t9501-gitweb-standalone-http-status.sh: use the $( ... )
construct for command substitution
t9901-git-web--browse.sh: use the $( ... ) construct for command
substitution
test-lib-functions.sh: use the $( ... ) construct for command substitution
t/t1100-commit-tree-options.sh | 4 ++--
t/t1401-symbolic-ref.sh | 2 +-
t/t1410-reflog.sh | 24 ++++++++++++------------
t/t1511-rev-parse-caret.sh | 4 ++--
t/t1512-rev-parse-disambiguation.sh | 8 ++++----
t/t2102-update-index-symlinks.sh | 2 +-
t/t3030-merge-recursive.sh | 2 +-
t/t3100-ls-tree-restrict.sh | 2 +-
t/t3101-ls-tree-dirname.sh | 2 +-
t/t3210-pack-refs.sh | 2 +-
t/t3403-rebase-skip.sh | 2 +-
t/t3511-cherry-pick-x.sh | 14 +++++++-------
t/t3600-rm.sh | 4 ++--
t/t3700-add.sh | 16 ++++++++--------
t/t5003-archive-zip.sh | 2 +-
t/t5100-mailinfo.sh | 12 ++++++------
t/t5300-pack-object.sh | 18 +++++++++---------
t/t5301-sliding-window.sh | 14 +++++++-------
t/t5302-pack-index.sh | 34
+++++++++++++++++-----------------
t/t5303-pack-corruption-resilience.sh | 8 ++++----
t/t5304-prune.sh | 2 +-
t/t5305-include-tag.sh | 8 ++++----
t/t5500-fetch-pack.sh | 16 ++++++++--------
t/t5505-remote.sh | 2 +-
t/t5506-remote-groups.sh | 2 +-
t/t5510-fetch.sh | 10 +++++-----
t/t5515-fetch-merge-logic.sh | 4 ++--
t/t5516-fetch-push.sh | 4 ++--
t/t5517-push-mirror.sh | 2 +-
t/t5520-pull.sh | 10 +++++-----
t/t5522-pull-symlink.sh | 2 +-
t/t5530-upload-pack-error.sh | 2 +-
t/t5537-fetch-shallow.sh | 4 ++--
t/t5538-push-shallow.sh | 4 ++--
t/t5550-http-fetch-dumb.sh | 8 ++++----
t/t5551-http-fetch-smart.sh | 2 +-
t/t5570-git-daemon.sh | 8 ++++----
t/t5601-clone.sh | 2 +-
t/t5700-clone-reference.sh | 2 +-
t/t5710-info-alternate.sh | 2 +-
t/t5900-repo-selection.sh | 2 +-
t/t6001-rev-list-graft.sh | 12 ++++++------
t/t6002-rev-list-bisect.sh | 6 +++---
t/t6015-rev-list-show-all-parents.sh | 6 +++---
t/t6032-merge-large-rename.sh | 2 +-
t/t6034-merge-rename-nocruft.sh | 2 +-
t/t6132-pathspec-exclude.sh | 2 +-
t/t7001-mv.sh | 4 ++--
t/t7003-filter-branch.sh | 6 +++---
t/t7004-tag.sh | 16 ++++++++--------
t/t7006-pager.sh | 2 +-
t/t7103-reset-bare.sh | 2 +-
t/t7406-submodule-update.sh | 4 ++--
t/t7408-submodule-reference.sh | 2 +-
t/t7504-commit-msg-hook.sh | 2 +-
t/t7505-prepare-commit-msg-hook.sh | 32
++++++++++++++++----------------
t/t7602-merge-octopus-many.sh | 8 ++++----
t/t7700-repack.sh | 4 ++--
t/t8003-blame-corner-cases.sh | 4 ++--
t/t9100-git-svn-basic.sh | 24 ++++++++++++------------
t/t9101-git-svn-props.sh | 30 +++++++++++++++---------------
t/t9104-git-svn-follow-parent.sh | 48
++++++++++++++++++++++++------------------------
t/t9105-git-svn-commit-diff.sh | 4 ++--
t/t9107-git-svn-migrate.sh | 16 ++++++++--------
t/t9108-git-svn-glob.sh | 20 ++++++++++----------
t/t9109-git-svn-multi-glob.sh | 32
++++++++++++++++----------------
t/t9110-git-svn-use-svm-props.sh | 2 +-
t/t9114-git-svn-dcommit-merge.sh | 12 ++++++------
t/t9118-git-svn-funky-branch-names.sh | 2 +-
t/t9119-git-svn-info.sh | 2 +-
t/t9129-git-svn-i18n-commitencoding.sh | 4 ++--
t/t9130-git-svn-authors-file.sh | 12 ++++++------
t/t9132-git-svn-broken-symlink.sh | 4 ++--
t/t9137-git-svn-dcommit-clobber-series.sh | 24 ++++++++++++------------
t/t9138-git-svn-authors-prog.sh | 2 +-
t/t9145-git-svn-master-branch.sh | 4 ++--
t/t9150-svk-mergetickets.sh | 2 +-
t/t9300-fast-import.sh | 68
++++++++++++++++++++++++++++++++++----------------------------------
t/t9350-fast-export.sh | 6 +++---
t/t9501-gitweb-standalone-http-status.sh | 6 +++---
t/t9901-git-web--browse.sh | 2 +-
t/test-lib-functions.sh | 8 ++++----
unimplemented.sh | 2 +-
83 files changed, 363 insertions(+), 363 deletions(-)
^ permalink raw reply [relevance 3%]
* Re: [PATCH 0/3] fix test suite with mingw-unicode patches
@ 2014-07-15 22:52 4% ` Karsten Blees
2014-07-16 9:29 0% ` Stepan Kasal
0 siblings, 1 reply; 200+ results
From: Karsten Blees @ 2014-07-15 22:52 UTC (permalink / raw)
To: Junio C Hamano, Stepan Kasal; +Cc: Johannes Sixt, GIT Mailing-list, msysGit
Am 15.07.2014 20:20, schrieb Junio C Hamano:
> Stepan Kasal <kasal@ucw.cz> writes:
>
>> Hello Hannes,
>> attached please find the patches that Karsten pointed out:
>>
>> 1) The unicode file name support was omitted from his unicode patch
>> series; my mistake, sorry. There is still big part missing: support
>> for unicode environment; I can only hope the tests would choke on
>> that.
>>
>> 2) Windows cannot pass non-UTF parameters (commit messages in this
>> case): original patch by Pat Thoyts was extended to apply to other
>> similar cases: the commit msg is passed through stdin.
>>
>> If there are still problems remaining, please tell us.
>>
>> Thanks,
>> Stepan
>>
>> Karsten Blees (2):
>> Win32: Unicode file name support (except dirent)
>> Win32: Unicode file name support (dirent)
>>
>> Pat Thoyts and Stepan Kasal(1):
>> tests: do not pass iso8859-1 encoded parameter
>
> Thanks. I'll queue these and wait for Windows folks to respond.
> With favourable feedback they can go directly from pu to master, I
> would think.
>
Looking good. After fixing the ELOOP and fchmod issues (see followup
patches), there are 9 test failures left. Only one of these is
environment related, and for the rest we have fixes in the msysgit
fork:
* t0081-line-buffer: 1
Using file descriptor other than 0, 1, 2.
https://github.com/msysgit/git/commit/4940c51a
* t0110-urlmatch-normalization: 1
Passing binary data on the command line...would have to teach test-urlmatch-normalization.c to read from stdin or file.
https://github.com/msysgit/git/commit/be0d6dee
* t4036-format-patch-signer-mime: 1
not ok 4 - format with non ASCII signer name
#
# GIT_COMMITTER_NAME="はまの ふにおう" \
# git format-patch -s --stdout -1 >output &&
# grep Content-Type output
#
Passing non-ASCII by environment variable, will be fixed by Unicode environment support.
* t4201-shortlog: 3
Passing binary data on the command line ('git-commit -m').
https://github.com/msysgit/git/commit/3717ce1b
* t4210-log-i18n: 2
Passing binary data on the command line ('git log --grep=$latin1_e').
https://github.com/msysgit/git/commit/dd2defa3
* t7001-mv: 6
cp -P fails in MinGW - perhaps use the long option forms (--no-dereference)?
https://github.com/msysgit/git/commit/00764ca1
* t8001-annotate/t8002-blame: 5
Msys.dll thinks '-L/regex/' is an absolute path and expands to '-LC:/msysgit/regex/'.
https://github.com/msysgit/git/commit/2d52168a
* t8005-blame-i18n: 4
Passing binary data on the command line ('git-commit --author -m').
https://github.com/msysgit/git/commit/3717ce1b
* t9902-completion: 2
Must use 'pwd -W' to get Windows-style absolute paths.
https://github.com/msysgit/git/commit/9b612448
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [relevance 4%]
* Re: [PATCH 0/3] fix test suite with mingw-unicode patches
2014-07-15 22:52 4% ` Karsten Blees
@ 2014-07-16 9:29 0% ` Stepan Kasal
2014-07-16 11:01 0% ` Thomas Braun
0 siblings, 1 reply; 200+ results
From: Stepan Kasal @ 2014-07-16 9:29 UTC (permalink / raw)
To: Karsten Blees; +Cc: Junio C Hamano, Johannes Sixt, GIT Mailing-list, msysGit
Hello Karsten,
thanks for your analysis. Most of the patches you refer to are simply
switching off tests for MINGW; let me comment on the remaining ones:
> * t0110-urlmatch-normalization: 1
>
> Passing binary data on the command line...would have to
> teach test-urlmatch-normalization.c to read from stdin or file.
> https://github.com/msysgit/git/commit/be0d6dee
Indeed, that would be better solution. For now, I'm going to submit the
switch-off patch you mention.
> * t4036-format-patch-signer-mime: 1
>
> Passing non-ASCII by environment variable, will be fixed by Unicode
> environment support.
Will submit that patch series soon.
> * t7001-mv: 6
> cp -P fails in MinGW - perhaps use the long option forms (--no-dereference)?
"cp -P" fails with our 2001-edition of cp, so msysgit had to revert:
https://github.com/msysgit/git/commit/6d3e23d4
But I was ashamed to mention that upstream; and I hope mingwGitDevEnv is
going to solve that.
> * t8001-annotate/t8002-blame: 5
>
> Msys.dll thinks '-L/regex/' is an absolute path and expands to '-LC:/msysgit/regex/'.
> https://github.com/msysgit/git/commit/2d52168a
Nice! But I'm afraid the patch cannot be submitted upstream as it is.
I think the hack could be automated by processing options "-L*" this way:
sed 'sX\(^-L\|,\)\^\?/X&\\;*Xg'
Then it would become only few lines at the top of the script, executed
on mingw only.
I hope to submit the patch in this form soon.
Have a nice day,
Stepan
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [relevance 0%]
* Re: [PATCH 0/3] fix test suite with mingw-unicode patches
2014-07-16 9:29 0% ` Stepan Kasal
@ 2014-07-16 11:01 0% ` Thomas Braun
0 siblings, 0 replies; 200+ results
From: Thomas Braun @ 2014-07-16 11:01 UTC (permalink / raw)
To: Stepan Kasal, Karsten Blees
Cc: Junio C Hamano, Johannes Sixt, GIT Mailing-list, msysGit
Am 16.07.2014 11:29, schrieb Stepan Kasal:
>> * t7001-mv: 6
>> cp -P fails in MinGW - perhaps use the long option forms (--no-dereference)?
>
> "cp -P" fails with our 2001-edition of cp, so msysgit had to revert:
> https://github.com/msysgit/git/commit/6d3e23d4
>
> But I was ashamed to mention that upstream; and I hope mingwGitDevEnv is
> going to solve that.
Yes it does. cp in mingwGitDevEnv is from coreutils 5.97 and knows about -P.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [relevance 0%]
* Re: [PATCH 00/13] mingw unicode environment
@ 2014-07-17 18:09 4% ` Karsten Blees
0 siblings, 0 replies; 200+ results
From: Karsten Blees @ 2014-07-17 18:09 UTC (permalink / raw)
To: Stepan Kasal, GIT Mailing-list; +Cc: msysGit
Am 17.07.2014 17:37, schrieb Stepan Kasal:
> Hello,
>
> this is the remainder of Karsten's unicode branch, that is a time
> proven part of msysGit. (If this code is accepted, only one patch
> would only remain: gitk and git-gui fixes.)
>
Thank you so much!
I had to add '#include "../cache.h"' to compile, due to use of
ALLOC_GROW and alloc_nr in some of the patches. In the msysgit HEAD,
Erik's hideDotFile patch does that [1].
[1] https://github.com/msysgit/git/commit/d85d2b75
After that (and applying your mingw test fixes), only t7001 fails
(the 'cp -P' issue).
> When rebasing Karsten's work, I have eliminated two commits:
> https://github.com/msysgit/git/commit/f967550
> https://github.com/msysgit/git/commit/290bf81
>
> These commits only moved code down and up; this was not necessary, one
> forward declaration was all I needed.
>
I believe we prefer moving code to the right place over forward
declarations (IIRC I got bashed for the latter in one of the first rounds
of this patch series). If only to justify 'git-blame -M' :-D
> One of the patches differs from the original version: "Enable color..."
> Following Karsten's suggestion, I have changed the value of env. var.
> TERM from "winterm" to "cygwin". This is because the subprocesses see
> the variable and may try to find it in (their copy of) termcap.
>
Good! One more step towards getting rid of the git-wrapper.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [relevance 4%]
* Re: What's cooking in git.git (Jul 2014, #04; Tue, 22)
@ 2014-07-23 14:17 6% ` Karsten Blees
2014-07-23 18:24 0% ` Junio C Hamano
2014-07-25 12:30 0% ` Duy Nguyen
0 siblings, 2 replies; 200+ results
From: Karsten Blees @ 2014-07-23 14:17 UTC (permalink / raw)
To: Junio C Hamano, git
Am 22.07.2014 23:44, schrieb Junio C Hamano:
>
> * sk/mingw-uni-fix-more (2014-07-21) 14 commits
> - Win32: enable color output in Windows cmd.exe
> - Win32: patch Windows environment on startup
> - Win32: keep the environment sorted
> - Win32: use low-level memory allocation during initialization
> - Win32: reduce environment array reallocations
> - Win32: don't copy the environment twice when spawning child processes
> - Win32: factor out environment block creation
> - Win32: unify environment function names
> - Win32: unify environment case-sensitivity
> - Win32: fix environment memory leaks
> - Win32: Unicode environment (incoming)
> - Win32: Unicode environment (outgoing)
> - Revert "Windows: teach getenv to do a case-sensitive search"
> - tests: do not pass iso8859-1 encoded parameter
>
> Most of these are battle-tested in msysgit and are needed to
> complete what has been merged to 'master' already.
>
> A fix has been squashed into "Unicode environ (outgoing)"; is this
> now ready to go?
>
>
> * sk/mingw-tests-workaround (2014-07-21) 6 commits
> - t800[12]: work around MSys limitation
> - t9902: mingw-specific fix for gitfile link files
> - t4210: skip command-line encoding tests on mingw
> - MinGW: disable legacy encoding tests
> - t0110/MinGW: skip tests that pass arbitrary bytes on the command line
> - MinGW: Skip test redirecting to fd 4
> (this branch is used by jc/not-mingw-cygwin.)
>
> Make tests pass on msysgit by mostly disabling ones that are
> infeasible on that platform.
>
> The t0110 one has been replaced; is this now ready to go?
>
Yes, I think both series are ready.
Compiles with msysgit and MSVC (with NO_CURL=1).
With the version in pu, three tests fail. t7001 is fixed with a newer 'cp'.
The other two are unrelated (introduced by nd/multiple-work-trees topic).
* t1501-worktree: failed 1
As of 5bbcb072 "setup.c: support multi-checkout repo setup"
Using $TRASH_DIRECTORY doesn't work on Windows.
* t2026-prune-linked-checkouts: failed 1
As of 404a45f1 "prune: strategies for linked checkouts"
Dito.
* t7001-mv: failed 6
'cp -P' doesn't work due to outdated cp.exe.
^ permalink raw reply [relevance 6%]
* Re: What's cooking in git.git (Jul 2014, #04; Tue, 22)
2014-07-23 14:17 6% ` Karsten Blees
@ 2014-07-23 18:24 0% ` Junio C Hamano
2014-07-25 12:30 0% ` Duy Nguyen
1 sibling, 0 replies; 200+ results
From: Junio C Hamano @ 2014-07-23 18:24 UTC (permalink / raw)
To: Karsten Blees; +Cc: git
Karsten Blees <karsten.blees@gmail.com> writes:
> Am 22.07.2014 23:44, schrieb Junio C Hamano:
>>
>> * sk/mingw-uni-fix-more (2014-07-21) 14 commits
>> ...
>> * sk/mingw-tests-workaround (2014-07-21) 6 commits
>> ...
>
> Yes, I think both series are ready.
>
> Compiles with msysgit and MSVC (with NO_CURL=1).
Thanks.
> With the version in pu, three tests fail. t7001 is fixed with a newer 'cp'.
It seems that the only use of the "copy symlinks as-is" in that test
are to move trash/submodule/.git to trash/.git/modules/submodule;
as the longer-term direction is not to rely on symlinks in .git/
(and we have got rid of HEAD -> refs/heads/master long time ago),
perhaps we do not even want to have "-P" there?
> The other two are unrelated (introduced by nd/multiple-work-trees topic).
>
> * t1501-worktree: failed 1
> As of 5bbcb072 "setup.c: support multi-checkout repo setup"
> Using $TRASH_DIRECTORY doesn't work on Windows.
>
> * t2026-prune-linked-checkouts: failed 1
> As of 404a45f1 "prune: strategies for linked checkouts"
> Dito.
>
> * t7001-mv: failed 6
> 'cp -P' doesn't work due to outdated cp.exe.
^ permalink raw reply [relevance 0%]
* Re: What's cooking in git.git (Jul 2014, #04; Tue, 22)
2014-07-23 14:17 6% ` Karsten Blees
2014-07-23 18:24 0% ` Junio C Hamano
@ 2014-07-25 12:30 0% ` Duy Nguyen
2014-07-29 19:43 0% ` [RFC/PATCH] Windows tests: let $TRASH_DIRECTORY point to native Windows path Karsten Blees
1 sibling, 1 reply; 200+ results
From: Duy Nguyen @ 2014-07-25 12:30 UTC (permalink / raw)
To: Karsten Blees; +Cc: Junio C Hamano, Git Mailing List
On Wed, Jul 23, 2014 at 9:17 PM, Karsten Blees <karsten.blees@gmail.com> wrote:
> With the version in pu, three tests fail. t7001 is fixed with a newer 'cp'.
> The other two are unrelated (introduced by nd/multiple-work-trees topic).
>
> * t1501-worktree: failed 1
> As of 5bbcb072 "setup.c: support multi-checkout repo setup"
> Using $TRASH_DIRECTORY doesn't work on Windows.
>
> * t2026-prune-linked-checkouts: failed 1
> As of 404a45f1 "prune: strategies for linked checkouts"
> Dito.
I need your help here. Would saving $(pwd) to a variable and using it
instead of $TRASH_DIRECTORY work? Some tests "cd" around and $(pwd)
may not be the same as $TRASH_DIRECTORY.
--
Duy
^ permalink raw reply [relevance 0%]
* [RFC/PATCH] Windows tests: let $TRASH_DIRECTORY point to native Windows path
2014-07-25 12:30 0% ` Duy Nguyen
@ 2014-07-29 19:43 0% ` Karsten Blees
2014-08-27 13:08 0% ` Duy Nguyen
0 siblings, 1 reply; 200+ results
From: Karsten Blees @ 2014-07-29 19:43 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Junio C Hamano, Git Mailing List, msysGit
MSYS programs typically understand native Windows paths (e.g C:/git), but
native Windows programs (including MinGW) don't understand MSYS paths (e.g.
/c/git).
On Windows, set TRASH_DIRECTORY to the absolute native path so that it can
be used more easily in tests.
MSYS 'tar -f' interprets everything before ':' as hostname, not as drive
letter. Change respective tests to use stdin / stdout instead of '-f'. Also
use $TAR from GIT-BUILD-OPTIONS rather than hardcoded tar.
Signed-off-by: Karsten Blees <blees@dcon.de>
---
Am 25.07.2014 14:30, schrieb Duy Nguyen:
> On Wed, Jul 23, 2014 at 9:17 PM, Karsten Blees <karsten.blees@gmail.com> wrote:
>> With the version in pu, three tests fail. t7001 is fixed with a newer 'cp'.
>> The other two are unrelated (introduced by nd/multiple-work-trees topic).
>>
>> * t1501-worktree: failed 1
>> As of 5bbcb072 "setup.c: support multi-checkout repo setup"
>> Using $TRASH_DIRECTORY doesn't work on Windows.
>>
>> * t2026-prune-linked-checkouts: failed 1
>> As of 404a45f1 "prune: strategies for linked checkouts"
>> Dito.
>
> I need your help here. Would saving $(pwd) to a variable and using it
> instead of $TRASH_DIRECTORY work? Some tests "cd" around and $(pwd)
> may not be the same as $TRASH_DIRECTORY.
>
Yes, that would work.
(Actually, you'd only need to change 'echo "$TRASH_DIR..."' in two places (both
before cd'ing away). The other instances are parameters to non-msys programs and
are thus automatically mangled by msys.dll.)
However, I wonder why we don't set up TRASH_DIRECTORY to the native Windows path.
I believe we'd get much fewer 'special' cases that way. Ideally, you shouldn't
have to worry about the intricacies of MSYS path mangling when writing tests...
[CCing msysgit for opinions]
t/t3513-revert-submodule.sh | 4 ++--
t/t6041-bisect-submodule.sh | 4 ++--
t/test-lib.sh | 1 +
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/t/t3513-revert-submodule.sh b/t/t3513-revert-submodule.sh
index a1c4e02..4a44dd6 100755
--- a/t/t3513-revert-submodule.sh
+++ b/t/t3513-revert-submodule.sh
@@ -14,11 +14,11 @@ test_description='revert can handle submodules'
git_revert () {
git status -su >expect &&
ls -1pR * >>expect &&
- tar czf "$TRASH_DIRECTORY/tmp.tgz" * &&
+ "$TAR" cz * >"$TRASH_DIRECTORY/tmp.tgz" &&
git checkout "$1" &&
git revert HEAD &&
rm -rf * &&
- tar xzf "$TRASH_DIRECTORY/tmp.tgz" &&
+ "$TAR" xz <"$TRASH_DIRECTORY/tmp.tgz" &&
git status -su >actual &&
ls -1pR * >>actual &&
test_cmp expect actual &&
diff --git a/t/t6041-bisect-submodule.sh b/t/t6041-bisect-submodule.sh
index c6b7aa6..0de614f 100755
--- a/t/t6041-bisect-submodule.sh
+++ b/t/t6041-bisect-submodule.sh
@@ -8,7 +8,7 @@ test_description='bisect can handle submodules'
git_bisect () {
git status -su >expect &&
ls -1pR * >>expect &&
- tar czf "$TRASH_DIRECTORY/tmp.tgz" * &&
+ "$TAR" cz * > "$TRASH_DIRECTORY/tmp.tgz" &&
GOOD=$(git rev-parse --verify HEAD) &&
git checkout "$1" &&
echo "foo" >bar &&
@@ -20,7 +20,7 @@ git_bisect () {
git bisect start &&
git bisect good $GOOD &&
rm -rf * &&
- tar xzf "$TRASH_DIRECTORY/tmp.tgz" &&
+ "$TAR" xz <"$TRASH_DIRECTORY/tmp.tgz" &&
git status -su >actual &&
ls -1pR * >>actual &&
test_cmp expect actual &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 5102340..5f6397b 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -868,6 +868,7 @@ case $(uname -s) in
md5sum "$@"
}
# git sees Windows-style pwd
+ TRASH_DIRECTORY=$(pwd -W)
pwd () {
builtin pwd -W
}
--
2.0.2.897.g7f80809.dirty
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [relevance 0%]
* Re: [RFC/PATCH] Windows tests: let $TRASH_DIRECTORY point to native Windows path
2014-07-29 19:43 0% ` [RFC/PATCH] Windows tests: let $TRASH_DIRECTORY point to native Windows path Karsten Blees
@ 2014-08-27 13:08 0% ` Duy Nguyen
0 siblings, 0 replies; 200+ results
From: Duy Nguyen @ 2014-08-27 13:08 UTC (permalink / raw)
To: Git Mailing List, msysGit; +Cc: Junio C Hamano, Karsten Blees
Ping...
On Wed, Jul 30, 2014 at 2:43 AM, Karsten Blees <karsten.blees@gmail.com> wrote:
> MSYS programs typically understand native Windows paths (e.g C:/git), but
> native Windows programs (including MinGW) don't understand MSYS paths (e.g.
> /c/git).
>
> On Windows, set TRASH_DIRECTORY to the absolute native path so that it can
> be used more easily in tests.
>
> MSYS 'tar -f' interprets everything before ':' as hostname, not as drive
> letter. Change respective tests to use stdin / stdout instead of '-f'. Also
> use $TAR from GIT-BUILD-OPTIONS rather than hardcoded tar.
>
> Signed-off-by: Karsten Blees <blees@dcon.de>
> ---
>
> Am 25.07.2014 14:30, schrieb Duy Nguyen:
>> On Wed, Jul 23, 2014 at 9:17 PM, Karsten Blees <karsten.blees@gmail.com> wrote:
>>> With the version in pu, three tests fail. t7001 is fixed with a newer 'cp'.
>>> The other two are unrelated (introduced by nd/multiple-work-trees topic).
>>>
>>> * t1501-worktree: failed 1
>>> As of 5bbcb072 "setup.c: support multi-checkout repo setup"
>>> Using $TRASH_DIRECTORY doesn't work on Windows.
>>>
>>> * t2026-prune-linked-checkouts: failed 1
>>> As of 404a45f1 "prune: strategies for linked checkouts"
>>> Dito.
>>
>> I need your help here. Would saving $(pwd) to a variable and using it
>> instead of $TRASH_DIRECTORY work? Some tests "cd" around and $(pwd)
>> may not be the same as $TRASH_DIRECTORY.
>>
>
> Yes, that would work.
>
> (Actually, you'd only need to change 'echo "$TRASH_DIR..."' in two places (both
> before cd'ing away). The other instances are parameters to non-msys programs and
> are thus automatically mangled by msys.dll.)
>
> However, I wonder why we don't set up TRASH_DIRECTORY to the native Windows path.
> I believe we'd get much fewer 'special' cases that way. Ideally, you shouldn't
> have to worry about the intricacies of MSYS path mangling when writing tests...
>
> [CCing msysgit for opinions]
>
>
> t/t3513-revert-submodule.sh | 4 ++--
> t/t6041-bisect-submodule.sh | 4 ++--
> t/test-lib.sh | 1 +
> 3 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/t/t3513-revert-submodule.sh b/t/t3513-revert-submodule.sh
> index a1c4e02..4a44dd6 100755
> --- a/t/t3513-revert-submodule.sh
> +++ b/t/t3513-revert-submodule.sh
> @@ -14,11 +14,11 @@ test_description='revert can handle submodules'
> git_revert () {
> git status -su >expect &&
> ls -1pR * >>expect &&
> - tar czf "$TRASH_DIRECTORY/tmp.tgz" * &&
> + "$TAR" cz * >"$TRASH_DIRECTORY/tmp.tgz" &&
> git checkout "$1" &&
> git revert HEAD &&
> rm -rf * &&
> - tar xzf "$TRASH_DIRECTORY/tmp.tgz" &&
> + "$TAR" xz <"$TRASH_DIRECTORY/tmp.tgz" &&
> git status -su >actual &&
> ls -1pR * >>actual &&
> test_cmp expect actual &&
> diff --git a/t/t6041-bisect-submodule.sh b/t/t6041-bisect-submodule.sh
> index c6b7aa6..0de614f 100755
> --- a/t/t6041-bisect-submodule.sh
> +++ b/t/t6041-bisect-submodule.sh
> @@ -8,7 +8,7 @@ test_description='bisect can handle submodules'
> git_bisect () {
> git status -su >expect &&
> ls -1pR * >>expect &&
> - tar czf "$TRASH_DIRECTORY/tmp.tgz" * &&
> + "$TAR" cz * > "$TRASH_DIRECTORY/tmp.tgz" &&
> GOOD=$(git rev-parse --verify HEAD) &&
> git checkout "$1" &&
> echo "foo" >bar &&
> @@ -20,7 +20,7 @@ git_bisect () {
> git bisect start &&
> git bisect good $GOOD &&
> rm -rf * &&
> - tar xzf "$TRASH_DIRECTORY/tmp.tgz" &&
> + "$TAR" xz <"$TRASH_DIRECTORY/tmp.tgz" &&
> git status -su >actual &&
> ls -1pR * >>actual &&
> test_cmp expect actual &&
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 5102340..5f6397b 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -868,6 +868,7 @@ case $(uname -s) in
> md5sum "$@"
> }
> # git sees Windows-style pwd
> + TRASH_DIRECTORY=$(pwd -W)
> pwd () {
> builtin pwd -W
> }
> --
> 2.0.2.897.g7f80809.dirty
>
--
Duy
^ permalink raw reply [relevance 0%]
* [PATCH v21 0/19] rs/ref-transaction (Re: Transaction patch series overview)
@ 2014-09-11 3:03 2% ` Jonathan Nieder
2014-09-11 3:04 10% ` [PATCH 01/19] mv test: recreate mod/ directory instead of relying on stale copy Jonathan Nieder
2014-10-02 1:48 1% ` [PATCH v22 0/24] rs/ref-transaction Jonathan Nieder
0 siblings, 2 replies; 200+ results
From: Jonathan Nieder @ 2014-09-11 3:03 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: git@vger.kernel.org, Michael Haggerty
Jonathan Nieder wrote:
> The next series from Ronnie's collection is available at
> https://code-review.googlesource.com/#/q/topic:ref-transaction in case
> someone wants a fresh series to look at.
Here is the outcome of that review. It could use another set of eyes
(hint, hint) but should be mostly ready. Interdiff below. This is meant
to replace rs/ref-transaction in 'pu' and I'd prefer to wait a little
for more comments before merging to 'next'.
These patches are also available from the git repository at
git://repo.or.cz/git/jrn.git tags/rs/ref-transaction
"Use ref transactions", part 3
Ronnie explains:
This is the third and final part of the original 48 patch
series for basic transaction support. This version implements
some changes suggested by mhagger for the warn_if_unremovable
changes. It also adds a new patch "fix handling of badly
named refs" that repairs the handling of badly named refs.
This includes some improvements to the transaction API (in
particular allowing different reflog messages per ref update in
a transaction), some cleanups and consistency improvements, and
preparation for an implementation of ref renaming in terms of
the transaction API.
It also improves handling of refs with invalid names. Today "git
branch --list" and "git for-each-ref" do not provide a way to discover
refs with invalid names and "git branch -d" and "git update-ref -d"
cannot delete them. After this series, such bad refs will be
discoverable and deletable again as in olden times.
Jonathan Nieder (5):
mv test: recreate mod/ directory instead of relying on stale copy
branch -d: avoid repeated symref resolution
refs.c: do not permit err == NULL
lockfile: remove unable_to_lock_error
ref_transaction_commit: bail out on failure to remove a ref
Ronnie Sahlberg (14):
wrapper.c: remove/unlink_or_warn: simplify, treat ENOENT as success
wrapper.c: add a new function unlink_or_msg
refs.c: add an err argument to delete_ref_loose
refs.c: pass the ref log message to _create/delete/update instead of
_commit
rename_ref: don't ask read_ref_full where the ref came from
refs.c: move the check for valid refname to lock_ref_sha1_basic
refs.c: call lock_ref_sha1_basic directly from commit
refs.c: pass a skip list to name_conflict_fn
refs.c: ref_transaction_commit: distinguish name conflicts from other
errors
fetch.c: change s_update_ref to use a ref transaction
refs.c: make write_ref_sha1 static
refs.c: change resolve_ref_unsafe reading argument to be a flags field
refs.c: fix handling of badly named refs
for-each-ref.c: improve message before aborting on broken ref
branch.c | 6 +-
builtin/blame.c | 2 +-
builtin/branch.c | 19 ++-
builtin/checkout.c | 6 +-
builtin/clone.c | 2 +-
builtin/commit.c | 6 +-
builtin/fetch.c | 34 +++--
builtin/fmt-merge-msg.c | 2 +-
builtin/for-each-ref.c | 12 +-
builtin/fsck.c | 2 +-
builtin/log.c | 3 +-
builtin/merge.c | 2 +-
builtin/notes.c | 2 +-
builtin/receive-pack.c | 9 +-
builtin/remote.c | 5 +-
builtin/replace.c | 5 +-
builtin/show-branch.c | 6 +-
builtin/symbolic-ref.c | 2 +-
builtin/tag.c | 4 +-
builtin/update-ref.c | 16 ++-
bundle.c | 2 +-
cache.h | 31 +++--
fast-import.c | 8 +-
git-compat-util.h | 16 ++-
http-backend.c | 3 +-
lockfile.c | 10 --
notes-merge.c | 2 +-
reflog-walk.c | 5 +-
refs.c | 321 ++++++++++++++++++++++++++++++--------------
refs.h | 18 ++-
remote.c | 10 +-
sequencer.c | 8 +-
t/t1400-update-ref.sh | 16 +++
t/t1402-check-ref-format.sh | 48 +++++++
t/t3200-branch.sh | 9 ++
t/t7001-mv.sh | 15 ++-
transport-helper.c | 4 +-
transport.c | 5 +-
upload-pack.c | 2 +-
walker.c | 5 +-
wrapper.c | 28 ++--
wt-status.c | 2 +-
42 files changed, 487 insertions(+), 226 deletions(-)
---
Changes since last appearance:
diff --git c/branch.c w/branch.c
index 76a8ec9..ba3e1c1 100644
--- c/branch.c
+++ w/branch.c
@@ -186,7 +186,7 @@ int validate_new_branchname(const char *name, struct strbuf *ref,
const char *head;
unsigned char sha1[20];
- head = resolve_ref_unsafe("HEAD", sha1, 0, NULL);
+ head = resolve_ref_unsafe("HEAD", sha1, NULL, 0);
if (!is_bare_repository() && head && !strcmp(head, ref->buf))
die(_("Cannot force update the current branch."));
}
diff --git c/builtin/blame.c w/builtin/blame.c
index 1568bd8..b8bec0a 100644
--- c/builtin/blame.c
+++ w/builtin/blame.c
@@ -2292,7 +2292,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
commit->object.type = OBJ_COMMIT;
parent_tail = &commit->parents;
- if (!resolve_ref_unsafe("HEAD", head_sha1, RESOLVE_REF_READING, NULL))
+ if (!resolve_ref_unsafe("HEAD", head_sha1, NULL, RESOLVE_REF_READING))
die("no such ref: HEAD");
parent_tail = append_parent(parent_tail, head_sha1);
diff --git c/builtin/branch.c w/builtin/branch.c
index 5c95656..5d5bc56 100644
--- c/builtin/branch.c
+++ w/builtin/branch.c
@@ -130,7 +130,7 @@ static int branch_merged(int kind, const char *name,
branch->merge[0]->dst &&
(reference_name = reference_name_to_free =
resolve_refdup(branch->merge[0]->dst, sha1,
- RESOLVE_REF_READING, NULL)) != NULL)
+ NULL, RESOLVE_REF_READING)) != NULL)
reference_rev = lookup_commit_reference(sha1);
}
if (!reference_rev)
@@ -234,10 +234,13 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
free(name);
name = mkpathdup(fmt, bname.buf);
- target = resolve_ref_unsafe(name, sha1,
- RESOLVE_REF_ALLOW_BAD_NAME, &flags);
+ target = resolve_ref_unsafe(name, sha1, &flags,
+ RESOLVE_REF_READING
+ | RESOLVE_REF_NODEREF
+ | RESOLVE_REF_ALLOW_BAD_NAME);
if (!target ||
- (!(flags & REF_ISSYMREF) && is_null_sha1(sha1))) {
+ (!(flags & (REF_ISSYMREF|REF_ISBROKEN)) &&
+ is_null_sha1(sha1))) {
error(remote_branch
? _("remote branch '%s' not found.")
: _("branch '%s' not found."), bname.buf);
@@ -245,14 +248,14 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
continue;
}
- if (!(flags & REF_ISSYMREF) &&
+ if (!(flags & (REF_ISSYMREF|REF_ISBROKEN)) &&
check_branch_commit(bname.buf, name, sha1, head_rev, kinds,
force)) {
ret = 1;
continue;
}
- if (delete_ref(name, sha1, REF_NODEREF)) {
+ if (delete_ref(name, sha1, REF_NODEREF|REF_BADNAMEOK)) {
error(remote_branch
? _("Error deleting remote branch '%s'")
: _("Error deleting branch '%s'"),
@@ -298,7 +301,7 @@ static char *resolve_symref(const char *src, const char *prefix)
int flag;
const char *dst, *cp;
- dst = resolve_ref_unsafe(src, sha1, 0, &flag);
+ dst = resolve_ref_unsafe(src, sha1, &flag, 0);
if (!(dst && (flag & REF_ISSYMREF)))
return NULL;
if (prefix && (cp = skip_prefix(dst, prefix)))
@@ -864,7 +867,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
track = git_branch_track;
- head = resolve_refdup("HEAD", head_sha1, 0, NULL);
+ head = resolve_refdup("HEAD", head_sha1, NULL, 0);
if (!head)
die(_("Failed to resolve HEAD as a valid ref."));
if (!strcmp(head, "HEAD")) {
diff --git c/builtin/checkout.c w/builtin/checkout.c
index f1dc56e..64af1f7 100644
--- c/builtin/checkout.c
+++ w/builtin/checkout.c
@@ -356,7 +356,7 @@ static int checkout_paths(const struct checkout_opts *opts,
commit_locked_index(lock_file))
die(_("unable to write new index file"));
- read_ref_full("HEAD", rev, 0, &flag);
+ read_ref_full("HEAD", rev, &flag, 0);
head = lookup_commit_reference_gently(rev, 1);
errs |= post_checkout_hook(head, head, 0);
@@ -771,7 +771,7 @@ static int switch_branches(const struct checkout_opts *opts,
unsigned char rev[20];
int flag, writeout_error = 0;
memset(&old, 0, sizeof(old));
- old.path = path_to_free = resolve_refdup("HEAD", rev, 0, &flag);
+ old.path = path_to_free = resolve_refdup("HEAD", rev, &flag, 0);
old.commit = lookup_commit_reference_gently(rev, 1);
if (!(flag & REF_ISSYMREF))
old.path = NULL;
@@ -1068,7 +1068,7 @@ static int checkout_branch(struct checkout_opts *opts,
unsigned char rev[20];
int flag;
- if (!read_ref_full("HEAD", rev, 0, &flag) &&
+ if (!read_ref_full("HEAD", rev, &flag, 0) &&
(flag & REF_ISSYMREF) && is_null_sha1(rev))
return switch_unborn_to_new_branch(opts);
}
diff --git c/builtin/clone.c w/builtin/clone.c
index f7307e6..12a78e1 100644
--- c/builtin/clone.c
+++ w/builtin/clone.c
@@ -622,7 +622,7 @@ static int checkout(void)
if (option_no_checkout)
return 0;
- head = resolve_refdup("HEAD", sha1, RESOLVE_REF_READING, NULL);
+ head = resolve_refdup("HEAD", sha1, NULL, RESOLVE_REF_READING);
if (!head) {
warning(_("remote HEAD refers to nonexistent ref, "
"unable to checkout.\n"));
diff --git c/builtin/commit.c w/builtin/commit.c
index d23e876..3536330 100644
--- c/builtin/commit.c
+++ w/builtin/commit.c
@@ -1468,7 +1468,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1,
rev.diffopt.break_opt = 0;
diff_setup_done(&rev.diffopt);
- head = resolve_ref_unsafe("HEAD", junk_sha1, 0, NULL);
+ head = resolve_ref_unsafe("HEAD", junk_sha1, NULL, 0);
printf("[%s%s ",
starts_with(head, "refs/heads/") ?
head + 11 :
diff --git c/builtin/fetch.c w/builtin/fetch.c
index 52f1ebc..2e3bc73 100644
--- c/builtin/fetch.c
+++ w/builtin/fetch.c
@@ -398,6 +398,7 @@ static int s_update_ref(const char *action,
goto fail;
ref_transaction_free(transaction);
+ strbuf_release(&err);
return 0;
fail:
ref_transaction_free(transaction);
@@ -686,9 +687,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
}
}
}
+
if (rc & STORE_REF_ERROR_DF_CONFLICT)
error(_("some local refs could not be updated; try running\n"
- "'git remote prune %s' to remove any old, conflicting "
+ " 'git remote prune %s' to remove any old, conflicting "
"branches"), remote_name);
abort:
diff --git c/builtin/fmt-merge-msg.c w/builtin/fmt-merge-msg.c
index d8ab177..b2355ad 100644
--- c/builtin/fmt-merge-msg.c
+++ w/builtin/fmt-merge-msg.c
@@ -602,7 +602,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
/* get current branch */
current_branch = current_branch_to_free =
- resolve_refdup("HEAD", head_sha1, RESOLVE_REF_READING, NULL);
+ resolve_refdup("HEAD", head_sha1, NULL, RESOLVE_REF_READING);
if (!current_branch)
die("No current branch");
if (starts_with(current_branch, "refs/heads/"))
diff --git c/builtin/for-each-ref.c w/builtin/for-each-ref.c
index 7c5b479..090390c 100644
--- c/builtin/for-each-ref.c
+++ w/builtin/for-each-ref.c
@@ -650,7 +650,7 @@ static void populate_value(struct refinfo *ref)
if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) {
unsigned char unused1[20];
ref->symref = resolve_refdup(ref->refname, unused1,
- RESOLVE_REF_READING, NULL);
+ NULL, RESOLVE_REF_READING);
if (!ref->symref)
ref->symref = "";
}
@@ -709,7 +709,7 @@ static void populate_value(struct refinfo *ref)
unsigned char sha1[20];
head = resolve_ref_unsafe("HEAD", sha1,
- RESOLVE_REF_READING, NULL);
+ NULL, RESOLVE_REF_READING);
if (!strcmp(ref->refname, head))
v->s = "*";
else
@@ -853,6 +853,12 @@ static int grab_single_ref(const char *refname, const unsigned char *sha1, int f
struct refinfo *ref;
int cnt;
+ if ((flag & REF_ISBROKEN) &&
+ check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
+ warning("ignoring ref with broken name %s", refname);
+ return 0;
+ }
+
if (*cb->grab_pattern) {
const char **pattern;
int namelen = strlen(refname);
diff --git c/builtin/fsck.c w/builtin/fsck.c
index fc150c8..506e32b 100644
--- c/builtin/fsck.c
+++ w/builtin/fsck.c
@@ -560,7 +560,7 @@ static int fsck_head_link(void)
if (verbose)
fprintf(stderr, "Checking HEAD link\n");
- head_points_at = resolve_ref_unsafe("HEAD", head_sha1, 0, &flag);
+ head_points_at = resolve_ref_unsafe("HEAD", head_sha1, &flag, 0);
if (!head_points_at)
return error("Invalid HEAD");
if (!strcmp(head_points_at, "HEAD"))
diff --git c/builtin/log.c w/builtin/log.c
index 92db809..230a9ef 100644
--- c/builtin/log.c
+++ w/builtin/log.c
@@ -1395,8 +1395,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (check_head) {
unsigned char sha1[20];
const char *ref;
- ref = resolve_ref_unsafe("HEAD", sha1,
- RESOLVE_REF_READING, NULL);
+ ref = resolve_ref_unsafe("HEAD", sha1, NULL,
+ RESOLVE_REF_READING);
if (ref && starts_with(ref, "refs/heads/"))
branch_name = xstrdup(ref + strlen("refs/heads/"));
else
diff --git c/builtin/merge.c w/builtin/merge.c
index 428ca24..d262279 100644
--- c/builtin/merge.c
+++ w/builtin/merge.c
@@ -1108,7 +1108,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* Check if we are _not_ on a detached HEAD, i.e. if there is a
* current branch.
*/
- branch = branch_to_free = resolve_refdup("HEAD", head_sha1, 0, &flag);
+ branch = branch_to_free = resolve_refdup("HEAD", head_sha1, &flag, 0);
if (branch && starts_with(branch, "refs/heads/"))
branch += 11;
if (!branch || is_null_sha1(head_sha1))
diff --git c/builtin/notes.c w/builtin/notes.c
index 820c341..16df78c 100644
--- c/builtin/notes.c
+++ w/builtin/notes.c
@@ -703,7 +703,7 @@ static int merge_commit(struct notes_merge_options *o)
init_notes(t, "NOTES_MERGE_PARTIAL", combine_notes_overwrite, 0);
o->local_ref = local_ref_to_free =
- resolve_refdup("NOTES_MERGE_REF", sha1, 0, NULL);
+ resolve_refdup("NOTES_MERGE_REF", sha1, NULL, 0);
if (!o->local_ref)
die("Failed to resolve NOTES_MERGE_REF");
diff --git c/builtin/receive-pack.c w/builtin/receive-pack.c
index d1f4cf7..555a4a6 100644
--- c/builtin/receive-pack.c
+++ w/builtin/receive-pack.c
@@ -656,7 +656,7 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
int flag;
strbuf_addf(&buf, "%s%s", get_git_namespace(), cmd->ref_name);
- dst_name = resolve_ref_unsafe(buf.buf, sha1, 0, &flag);
+ dst_name = resolve_ref_unsafe(buf.buf, sha1, &flag, 0);
strbuf_release(&buf);
if (!(flag & REF_ISSYMREF))
@@ -817,7 +817,7 @@ static void execute_commands(struct command *commands,
check_aliased_updates(commands);
free(head_name_to_free);
- head_name = head_name_to_free = resolve_refdup("HEAD", sha1, 0, NULL);
+ head_name = head_name_to_free = resolve_refdup("HEAD", sha1, NULL, 0);
checked_connectivity = 1;
for (cmd = commands; cmd; cmd = cmd->next) {
diff --git c/builtin/remote.c w/builtin/remote.c
index be8ebac..6eaeee7 100644
--- c/builtin/remote.c
+++ w/builtin/remote.c
@@ -568,8 +568,8 @@ static int read_remote_branches(const char *refname,
strbuf_addf(&buf, "refs/remotes/%s/", rename->old);
if (starts_with(refname, buf.buf)) {
item = string_list_append(rename->remote_branches, xstrdup(refname));
- symref = resolve_ref_unsafe(refname, orig_sha1,
- RESOLVE_REF_READING, &flag);
+ symref = resolve_ref_unsafe(refname, orig_sha1, &flag,
+ RESOLVE_REF_READING);
if (flag & REF_ISSYMREF)
item->util = xstrdup(symref);
else
@@ -705,7 +705,7 @@ static int mv(int argc, const char **argv)
int flag = 0;
unsigned char sha1[20];
- read_ref_full(item->string, sha1, RESOLVE_REF_READING, &flag);
+ read_ref_full(item->string, sha1, &flag, RESOLVE_REF_READING);
if (!(flag & REF_ISSYMREF))
continue;
if (delete_ref(item->string, NULL, REF_NODEREF))
diff --git c/builtin/replace.c w/builtin/replace.c
index df060f8..9d03b84 100644
--- c/builtin/replace.c
+++ w/builtin/replace.c
@@ -170,7 +170,7 @@ static int replace_object_sha1(const char *object_ref,
transaction = ref_transaction_begin(&err);
if (!transaction ||
ref_transaction_update(transaction, ref, repl, prev,
- 0, !is_null_sha1(prev), NULL, &err) ||
+ 0, 1, NULL, &err) ||
ref_transaction_commit(transaction, &err))
die("%s", err.buf);
diff --git c/builtin/show-branch.c w/builtin/show-branch.c
index a9a5eb3..ef6ea52 100644
--- c/builtin/show-branch.c
+++ w/builtin/show-branch.c
@@ -727,8 +727,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
if (ac == 0) {
static const char *fake_av[2];
- fake_av[0] = resolve_refdup("HEAD", sha1,
- RESOLVE_REF_READING, NULL);
+ fake_av[0] = resolve_refdup("HEAD", sha1, NULL,
+ RESOLVE_REF_READING);
fake_av[1] = NULL;
av = fake_av;
ac = 1;
@@ -790,8 +790,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
}
}
- head_p = resolve_ref_unsafe("HEAD", head_sha1,
- RESOLVE_REF_READING, NULL);
+ head_p = resolve_ref_unsafe("HEAD", head_sha1, NULL,
+ RESOLVE_REF_READING);
if (head_p) {
head_len = strlen(head_p);
memcpy(head, head_p, head_len + 1);
diff --git c/builtin/symbolic-ref.c w/builtin/symbolic-ref.c
index b6a711d..1dd04af 100644
--- c/builtin/symbolic-ref.c
+++ w/builtin/symbolic-ref.c
@@ -13,7 +13,7 @@ static int check_symref(const char *HEAD, int quiet, int shorten, int print)
{
unsigned char sha1[20];
int flag;
- const char *refname = resolve_ref_unsafe(HEAD, sha1, 0, &flag);
+ const char *refname = resolve_ref_unsafe(HEAD, sha1, &flag, 0);
if (!refname)
die("No such ref: %s", HEAD);
diff --git c/builtin/update-ref.c w/builtin/update-ref.c
index 6c9be05..e379fdd 100644
--- c/builtin/update-ref.c
+++ w/builtin/update-ref.c
@@ -419,7 +419,8 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
if (no_deref)
flags = REF_NODEREF;
if (delete)
- return delete_ref(refname, oldval ? oldsha1 : NULL, flags);
+ return delete_ref(refname, oldval ? oldsha1 : NULL,
+ flags|REF_BADNAMEOK);
else
return update_ref(msg, refname, sha1, oldval ? oldsha1 : NULL,
flags, UPDATE_REFS_DIE_ON_ERR);
diff --git c/bundle.c w/bundle.c
index 8aaf5f8..32dd2f7 100644
--- c/bundle.c
+++ w/bundle.c
@@ -311,7 +311,7 @@ int create_bundle(struct bundle_header *header, const char *path,
continue;
if (dwim_ref(e->name, strlen(e->name), sha1, &ref) != 1)
continue;
- if (read_ref_full(e->name, sha1, RESOLVE_REF_READING, &flag))
+ if (read_ref_full(e->name, sha1, &flag, RESOLVE_REF_READING))
flag = 0;
display_ref = (flag & REF_ISSYMREF) ? e->name : ref;
diff --git c/cache.h w/cache.h
index 3a4b087..995729f 100644
--- c/cache.h
+++ w/cache.h
@@ -558,7 +558,6 @@ struct lock_file {
};
#define LOCK_DIE_ON_ERROR 1
#define LOCK_NODEREF 2
-extern int unable_to_lock_error(const char *path, int err);
extern void unable_to_lock_message(const char *path, int err,
struct strbuf *buf);
extern NORETURN void unable_to_lock_index_die(const char *path, int err);
@@ -948,7 +947,7 @@ extern int get_sha1_hex(const char *hex, unsigned char *sha1);
extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */
extern int read_ref_full(const char *refname, unsigned char *sha1,
- int flags, int *ref_flag);
+ int *flags, int resolve_flags);
extern int read_ref(const char *refname, unsigned char *sha1);
/*
@@ -970,21 +969,27 @@ extern int read_ref(const char *refname, unsigned char *sha1);
* "writing" to the ref, the return value is the name of the ref
* that will actually be created or changed.
*
- * If ref_flag is non-NULL, set the value that it points to the
+ * If flags is non-NULL, set the value that it points to the
* combination of REF_ISPACKED (if the reference was found among the
- * packed references) and REF_ISSYMREF (if the initial reference was a
- * symbolic reference).
+ * packed references), REF_ISSYMREF (if the initial reference was a
+ * symbolic reference) and REF_ISBROKEN (if the ref is malformed).
*
* If ref is not a properly-formatted, normalized reference, return
* NULL. If more than MAXDEPTH recursive symbolic lookups are needed,
* give up and return NULL.
*
- * errno is set to something meaningful on error.
+ * RESOLVE_REF_ALLOW_BAD_NAME disables most of the ref name checking except
+ * for names that are absolute paths or contain ".." components. For both
+ * these cases the function will return NULL and set errno to EINVAL.
+ * If the name is bad then the function will set the REF_ISBROKEN flag and
+ * return the name, if the ref exists, or NULL, if it does not.
+ * When this flag is set, any badly named refs will resolve to nullsha1.
*/
-#define RESOLVE_REF_READING 0x01
-#define RESOLVE_REF_ALLOW_BAD_NAME 0x02
-extern const char *resolve_ref_unsafe(const char *ref, unsigned char *sha1, int flags, int *ref_flag);
-extern char *resolve_refdup(const char *ref, unsigned char *sha1, int flags, int *ref_flag);
+#define RESOLVE_REF_READING 0x01
+#define RESOLVE_REF_NODEREF 0x02
+#define RESOLVE_REF_ALLOW_BAD_NAME 0x04
+extern const char *resolve_ref_unsafe(const char *ref, unsigned char *sha1, int *flags, int resolve_flags);
+extern char *resolve_refdup(const char *ref, unsigned char *sha1, int *flags, int resolve_flags);
extern int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref);
extern int dwim_log(const char *str, int len, unsigned char *sha1, char **ref);
diff --git c/git-compat-util.h w/git-compat-util.h
index 426bc98..5ee140c 100644
--- c/git-compat-util.h
+++ w/git-compat-util.h
@@ -307,6 +307,8 @@ extern char *gitbasename(char *);
#include "wildmatch.h"
+struct strbuf;
+
/* General helper functions */
extern void vreportf(const char *prefix, const char *err, va_list params);
extern void vwritef(int fd, const char *prefix, const char *err, va_list params);
@@ -704,19 +706,23 @@ void git_qsort(void *base, size_t nmemb, size_t size,
#endif
#endif
-#include "strbuf.h"
-
/*
* Preserves errno, prints a message, but gives no warning for ENOENT.
- * Always returns the return value of unlink(2).
+ * Returns 0 on success which includes trying to unlink an object that does
+ * not exist.
*/
int unlink_or_warn(const char *path);
-/*
- * Like unlink_or_warn but populates a strbuf
- */
+ /*
+ * Tries to unlink file. Returns 0 if unlink succeeded
+ * or the file already didn't exist. Returns -1 and
+ * appends a message to err suitable for
+ * 'error("%s", err->buf)' on error.
+ */
int unlink_or_msg(const char *file, struct strbuf *err);
/*
- * Likewise for rmdir(2).
+ * Preserves errno, prints a message, but gives no warning for ENOENT.
+ * Returns 0 on success which includes trying to remove a directory that does
+ * not exist.
*/
int rmdir_or_warn(const char *path);
/*
diff --git c/http-backend.c w/http-backend.c
index 059f790..8f94f9b 100644
--- c/http-backend.c
+++ w/http-backend.c
@@ -418,7 +418,7 @@ static int show_head_ref(const char *refname, const unsigned char *sha1,
if (flag & REF_ISSYMREF) {
unsigned char unused[20];
const char *target = resolve_ref_unsafe(refname, unused,
- RESOLVE_REF_READING, NULL);
+ NULL, RESOLVE_REF_READING);
const char *target_nons = strip_namespace(target);
strbuf_addf(buf, "ref: %s\n", target_nons);
diff --git c/lockfile.c w/lockfile.c
index a921d77..dbd4101 100644
--- c/lockfile.c
+++ w/lockfile.c
@@ -176,16 +176,6 @@ void unable_to_lock_message(const char *path, int err, struct strbuf *buf)
absolute_path(path), strerror(err));
}
-int unable_to_lock_error(const char *path, int err)
-{
- struct strbuf buf = STRBUF_INIT;
-
- unable_to_lock_message(path, err, &buf);
- error("%s", buf.buf);
- strbuf_release(&buf);
- return -1;
-}
-
NORETURN void unable_to_lock_index_die(const char *path, int err)
{
struct strbuf buf = STRBUF_INIT;
diff --git c/notes-merge.c w/notes-merge.c
index 94a1a8a..ffca602 100644
--- c/notes-merge.c
+++ w/notes-merge.c
@@ -549,7 +549,7 @@ int notes_merge(struct notes_merge_options *o,
o->local_ref, o->remote_ref);
/* Dereference o->local_ref into local_sha1 */
- if (read_ref_full(o->local_ref, local_sha1, 0, NULL))
+ if (read_ref_full(o->local_ref, local_sha1, NULL, 0))
die("Failed to resolve local notes ref '%s'", o->local_ref);
else if (!check_refname_format(o->local_ref, 0) &&
is_null_sha1(local_sha1))
diff --git c/reflog-walk.c w/reflog-walk.c
index d80a42a..feeaf0a 100644
--- c/reflog-walk.c
+++ w/reflog-walk.c
@@ -48,8 +48,8 @@ static struct complete_reflogs *read_complete_reflog(const char *ref)
unsigned char sha1[20];
const char *name;
void *name_to_free;
- name = name_to_free = resolve_refdup(ref, sha1,
- RESOLVE_REF_READING, NULL);
+ name = name_to_free = resolve_refdup(ref, sha1, NULL,
+ RESOLVE_REF_READING);
if (name) {
for_each_reflog_ent(name, read_one_reflog, reflogs);
free(name_to_free);
@@ -175,7 +175,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
if (*branch == '\0') {
unsigned char sha1[20];
free(branch);
- branch = resolve_refdup("HEAD", sha1, 0, NULL);
+ branch = resolve_refdup("HEAD", sha1, NULL, 0);
if (!branch)
die ("No current branch");
diff --git c/refs.c w/refs.c
index b14bbf0..3b27758 100644
--- c/refs.c
+++ w/refs.c
@@ -281,11 +281,15 @@ static struct ref_dir *get_ref_dir(struct ref_entry *entry)
}
static struct ref_entry *create_ref_entry(const char *refname,
- const unsigned char *sha1, int flag)
+ const unsigned char *sha1, int flag,
+ int check_name)
{
int len;
struct ref_entry *ref;
+ if (check_name &&
+ check_refname_format(refname, REFNAME_ALLOW_ONELEVEL|REFNAME_DOT_COMPONENT))
+ die("Reference has invalid format: '%s'", refname);
len = strlen(refname) + 1;
ref = xmalloc(sizeof(struct ref_entry) + len);
hashcpy(ref->u.value.sha1, sha1);
@@ -798,17 +802,16 @@ static int names_conflict(const char *refname1, const char *refname2)
struct name_conflict_cb {
const char *refname;
const char *conflicting_refname;
- const char **skip;
- int skipnum;
+ struct string_list *skiplist;
};
static int name_conflict_fn(struct ref_entry *entry, void *cb_data)
{
struct name_conflict_cb *data = (struct name_conflict_cb *)cb_data;
- int i;
- for (i = 0; i < data->skipnum; i++)
- if (!strcmp(entry->name, data->skip[i]))
- return 0;
+
+ if (data->skiplist &&
+ string_list_has_string(data->skiplist, entry->name))
+ return 0;
if (names_conflict(data->refname, entry->name)) {
data->conflicting_refname = entry->name;
return 1;
@@ -821,18 +824,17 @@ static int name_conflict_fn(struct ref_entry *entry, void *cb_data)
* conflicting with the name of an existing reference in dir. If
* oldrefname is non-NULL, ignore potential conflicts with oldrefname
* (e.g., because oldrefname is scheduled for deletion in the same
- * operation). skip contains a list of refs we want to skip checking for
- * conflicts with.
+ * operation). skiplist contains a list of refs we want to skip checking for
+ * conflicts with. skiplist must be sorted.
*/
static int is_refname_available(const char *refname,
struct ref_dir *dir,
- const char **skip, int skipnum)
+ struct string_list *skiplist)
{
struct name_conflict_cb data;
data.refname = refname;
data.conflicting_refname = NULL;
- data.skip = skip;
- data.skipnum = skipnum;
+ data.skiplist = skiplist;
sort_ref_dir(dir);
if (do_for_each_entry_in_dir(dir, 0, name_conflict_fn, &data)) {
@@ -1062,8 +1064,9 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir)
if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL|REFNAME_DOT_COMPONENT)) {
flag |= REF_ISBROKEN;
+ hashclr(sha1);
}
- last = create_ref_entry(refname, sha1, flag);
+ last = create_ref_entry(refname, sha1, flag, 0);
if (peeled == PEELED_FULLY ||
(peeled == PEELED_TAGS && starts_with(refname, "refs/tags/")))
last->flag |= REF_KNOWS_PEELED;
@@ -1136,10 +1139,8 @@ void add_packed_ref(const char *refname, const unsigned char *sha1)
if (!packed_ref_cache->lock)
die("internal error: packed refs not locked");
- if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL|REFNAME_DOT_COMPONENT))
- die("Reference has invalid format: '%s'", refname);
add_ref(get_packed_ref_dir(packed_ref_cache),
- create_ref_entry(refname, sha1, REF_ISPACKED));
+ create_ref_entry(refname, sha1, REF_ISPACKED, 1));
}
/*
@@ -1197,17 +1198,19 @@ static void read_loose_refs(const char *dirname, struct ref_dir *dir)
hashclr(sha1);
flag |= REF_ISBROKEN;
}
- } else if (read_ref_full(refname.buf, sha1,
- RESOLVE_REF_READING, &flag)) {
+ } else if (read_ref_full(refname.buf, sha1, &flag,
+ RESOLVE_REF_READING)) {
hashclr(sha1);
flag |= REF_ISBROKEN;
}
- if (check_refname_format(refname.buf, REFNAME_ALLOW_ONELEVEL|REFNAME_DOT_COMPONENT)) {
+ if (check_refname_format(refname.buf,
+ REFNAME_ALLOW_ONELEVEL|
+ REFNAME_DOT_COMPONENT)) {
hashclr(sha1);
flag |= REF_ISBROKEN;
}
add_entry_to_dir(dir,
- create_ref_entry(refname.buf, sha1, flag));
+ create_ref_entry(refname.buf, sha1, flag, 0));
}
strbuf_setlen(&refname, dirnamelen);
}
@@ -1353,21 +1356,40 @@ static const char *handle_missing_loose_ref(const char *refname,
}
}
+static int escapes_cwd(const char *path) {
+ char *buf;
+ int result;
+
+ if (is_absolute_path(path))
+ return 1;
+ buf = xmalloc(strlen(path) + 1);
+ result = normalize_path_copy(buf, path);
+ free(buf);
+ return result;
+}
+
/* This function needs to return a meaningful errno on failure */
-const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int flags, int *ref_flag)
+const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int *flags, int resolve_flags)
{
int depth = MAXDEPTH;
ssize_t len;
char buffer[256];
static char refname_buffer[256];
+ int bad_name = 0;
- if (ref_flag)
- *ref_flag = 0;
+ if (flags)
+ *flags = 0;
- if (!(flags & RESOLVE_REF_ALLOW_BAD_NAME) &&
- check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
- errno = EINVAL;
- return NULL;
+ if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
+ if (!(resolve_flags & RESOLVE_REF_ALLOW_BAD_NAME) ||
+ escapes_cwd(refname)) {
+ errno = EINVAL;
+ return NULL;
+ }
+ hashclr(sha1);
+ if (flags)
+ *flags |= REF_ISBROKEN;
+ bad_name = 1;
}
for (;;) {
char path[PATH_MAX];
@@ -1395,8 +1417,8 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int fla
if (lstat(path, &st) < 0) {
if (errno == ENOENT)
return handle_missing_loose_ref(refname, sha1,
- flags & RESOLVE_REF_READING,
- ref_flag);
+ resolve_flags & RESOLVE_REF_READING,
+ flags);
else
return NULL;
}
@@ -1416,8 +1438,12 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int fla
!check_refname_format(buffer, 0)) {
strcpy(refname_buffer, buffer);
refname = refname_buffer;
- if (ref_flag)
- *ref_flag |= REF_ISSYMREF;
+ if (flags)
+ *flags |= REF_ISSYMREF;
+ if (resolve_flags & RESOLVE_REF_NODEREF) {
+ hashclr(sha1);
+ return refname;
+ }
continue;
}
}
@@ -1462,31 +1488,37 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int fla
*/
if (get_sha1_hex(buffer, sha1) ||
(buffer[40] != '\0' && !isspace(buffer[40]))) {
- if (ref_flag)
- *ref_flag |= REF_ISBROKEN;
+ if (flags)
+ *flags |= REF_ISBROKEN;
errno = EINVAL;
return NULL;
}
+ if (bad_name)
+ hashclr(sha1);
return refname;
}
- if (ref_flag)
- *ref_flag |= REF_ISSYMREF;
+ if (flags)
+ *flags |= REF_ISSYMREF;
buf = buffer + 4;
while (isspace(*buf))
buf++;
if (check_refname_format(buf, REFNAME_ALLOW_ONELEVEL)) {
- if (ref_flag)
- *ref_flag |= REF_ISBROKEN;
+ if (flags)
+ *flags |= REF_ISBROKEN;
errno = EINVAL;
return NULL;
}
refname = strcpy(refname_buffer, buf);
+ if (resolve_flags & RESOLVE_REF_NODEREF) {
+ hashclr(sha1);
+ return refname;
+ }
}
}
-char *resolve_refdup(const char *ref, unsigned char *sha1, int flags, int *ref_flag)
+char *resolve_refdup(const char *ref, unsigned char *sha1, int *flags, int resolve_flags)
{
- const char *ret = resolve_ref_unsafe(ref, sha1, flags, ref_flag);
+ const char *ret = resolve_ref_unsafe(ref, sha1, flags, resolve_flags);
return ret ? xstrdup(ret) : NULL;
}
@@ -1497,22 +1529,22 @@ struct ref_filter {
void *cb_data;
};
-int read_ref_full(const char *refname, unsigned char *sha1, int flags, int *ref_flag)
+int read_ref_full(const char *refname, unsigned char *sha1, int *flags, int resolve_flags)
{
- if (resolve_ref_unsafe(refname, sha1, flags, ref_flag))
+ if (resolve_ref_unsafe(refname, sha1, flags, resolve_flags))
return 0;
return -1;
}
int read_ref(const char *refname, unsigned char *sha1)
{
- return read_ref_full(refname, sha1, RESOLVE_REF_READING, NULL);
+ return read_ref_full(refname, sha1, NULL, RESOLVE_REF_READING);
}
int ref_exists(const char *refname)
{
unsigned char sha1[20];
- return !!resolve_ref_unsafe(refname, sha1, RESOLVE_REF_READING, NULL);
+ return !!resolve_ref_unsafe(refname, sha1, NULL, RESOLVE_REF_READING);
}
static int filter_refs(const char *refname, const unsigned char *sha1, int flags,
@@ -1626,7 +1658,7 @@ int peel_ref(const char *refname, unsigned char *sha1)
return 0;
}
- if (read_ref_full(refname, base, RESOLVE_REF_READING, &flag))
+ if (read_ref_full(refname, base, &flag, RESOLVE_REF_READING))
return -1;
/*
@@ -1667,7 +1699,7 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha
if (!(flags & REF_ISSYMREF))
return 0;
- resolves_to = resolve_ref_unsafe(refname, junk, 0, NULL);
+ resolves_to = resolve_ref_unsafe(refname, junk, NULL, 0);
if (!resolves_to
|| (d->refname
? strcmp(resolves_to, d->refname)
@@ -1792,7 +1824,7 @@ static int do_head_ref(const char *submodule, each_ref_fn fn, void *cb_data)
return 0;
}
- if (!read_ref_full("HEAD", sha1, RESOLVE_REF_READING, &flag))
+ if (!read_ref_full("HEAD", sha1, &flag, RESOLVE_REF_READING))
return fn("HEAD", sha1, flag, cb_data);
return 0;
@@ -1872,7 +1904,7 @@ int head_ref_namespaced(each_ref_fn fn, void *cb_data)
int flag;
strbuf_addf(&buf, "%sHEAD", get_git_namespace());
- if (!read_ref_full(buf.buf, sha1, RESOLVE_REF_READING, &flag))
+ if (!read_ref_full(buf.buf, sha1, &flag, RESOLVE_REF_READING))
ret = fn(buf.buf, sha1, flag, cb_data);
strbuf_release(&buf);
@@ -1967,8 +1999,8 @@ int refname_match(const char *abbrev_name, const char *full_name)
static struct ref_lock *verify_lock(struct ref_lock *lock,
const unsigned char *old_sha1, int mustexist)
{
- if (read_ref_full(lock->ref_name, lock->old_sha1,
- mustexist ? RESOLVE_REF_READING : 0, NULL)) {
+ if (read_ref_full(lock->ref_name, lock->old_sha1, NULL,
+ mustexist ? RESOLVE_REF_READING : 0)) {
int save_errno = errno;
error("Can't verify ref %s", lock->ref_name);
unlock_ref(lock);
@@ -2041,8 +2073,8 @@ int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref)
this_result = refs_found ? sha1_from_ref : sha1;
mksnpath(fullref, sizeof(fullref), *p, len, str);
- r = resolve_ref_unsafe(fullref, this_result,
- RESOLVE_REF_READING, &flag);
+ r = resolve_ref_unsafe(fullref, this_result, &flag,
+ RESOLVE_REF_READING);
if (r) {
if (!refs_found++)
*ref = xstrdup(r);
@@ -2071,7 +2103,7 @@ int dwim_log(const char *str, int len, unsigned char *sha1, char **log)
const char *ref, *it;
mksnpath(path, sizeof(path), *p, len, str);
- ref = resolve_ref_unsafe(path, hash, RESOLVE_REF_READING, NULL);
+ ref = resolve_ref_unsafe(path, hash, NULL, RESOLVE_REF_READING);
if (!ref)
continue;
if (reflog_exists(path))
@@ -2097,8 +2129,8 @@ int dwim_log(const char *str, int len, unsigned char *sha1, char **log)
*/
static struct ref_lock *lock_ref_sha1_basic(const char *refname,
const unsigned char *old_sha1,
- int flags, int *type_p,
- const char **skip, int skipnum)
+ struct string_list *skiplist,
+ int flags, int *type_p)
{
char *ref_file;
const char *orig_refname = refname;
@@ -2106,22 +2138,23 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
int last_errno = 0;
int type, lflags;
int mustexist = (old_sha1 && !is_null_sha1(old_sha1));
- int resolve_flags;
+ int resolve_flags = 0;
int missing = 0;
int attempts_remaining = 3;
- int bad_refname;
lock = xcalloc(1, sizeof(struct ref_lock));
lock->lock_fd = -1;
- bad_refname = check_refname_format(refname, REFNAME_ALLOW_ONELEVEL);
+ if (flags & REF_BADNAMEOK)
+ resolve_flags |= RESOLVE_REF_ALLOW_BAD_NAME;
- resolve_flags = RESOLVE_REF_ALLOW_BAD_NAME;
if (mustexist)
resolve_flags |= RESOLVE_REF_READING;
+ if (flags & REF_NODEREF)
+ resolve_flags |= RESOLVE_REF_NODEREF;
- refname = resolve_ref_unsafe(refname, lock->old_sha1, resolve_flags,
- &type);
+ refname = resolve_ref_unsafe(refname, lock->old_sha1, &type,
+ resolve_flags);
if (!refname && errno == EISDIR) {
/* we are trying to lock foo but we used to
* have foo/bar which now does not exist;
@@ -2135,7 +2168,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
goto error_return;
}
refname = resolve_ref_unsafe(orig_refname, lock->old_sha1,
- resolve_flags, &type);
+ &type, resolve_flags);
}
if (type_p)
*type_p = type;
@@ -2153,7 +2186,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
*/
if (missing &&
!is_refname_available(refname, get_packed_refs(&ref_cache),
- skip, skipnum)) {
+ skiplist)) {
last_errno = ENOTDIR;
goto error_return;
}
@@ -2199,8 +2232,6 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
else
unable_to_lock_index_die(ref_file, errno);
}
- if (bad_refname)
- return lock;
return old_sha1 ? verify_lock(lock, old_sha1, mustexist) : lock;
error_return:
@@ -2213,7 +2244,7 @@ struct ref_lock *lock_any_ref_for_update(const char *refname,
const unsigned char *old_sha1,
int flags, int *type_p)
{
- return lock_ref_sha1_basic(refname, old_sha1, flags, type_p, NULL, 0);
+ return lock_ref_sha1_basic(refname, old_sha1, NULL, flags, type_p);
}
/*
@@ -2364,9 +2395,8 @@ static int pack_if_possible_fn(struct ref_entry *entry, void *cb_data)
packed_entry->flag = REF_ISPACKED | REF_KNOWS_PEELED;
hashcpy(packed_entry->u.value.sha1, entry->u.value.sha1);
} else {
- packed_entry = create_ref_entry(entry->name,
- entry->u.value.sha1,
- REF_ISPACKED | REF_KNOWS_PEELED);
+ packed_entry = create_ref_entry(entry->name, entry->u.value.sha1,
+ REF_ISPACKED | REF_KNOWS_PEELED, 0);
add_ref(cb->packed_refs, packed_entry);
}
hashcpy(packed_entry->u.value.peeled, entry->u.value.peeled);
@@ -2491,7 +2521,7 @@ static int curate_packed_ref_fn(struct ref_entry *entry, void *cb_data)
unsigned char sha1[20];
int flags;
- if (read_ref_full(entry->name, sha1, 0, &flags))
+ if (read_ref_full(entry->name, sha1, &flags, 0))
/* We should at least have found the packed ref. */
die("Internal error");
if ((flags & REF_ISSYMREF) || !(flags & REF_ISPACKED)) {
@@ -2530,6 +2560,8 @@ int repack_without_refs(const char **refnames, int n, struct strbuf *err)
struct string_list_item *ref_to_delete;
int i, ret, removed = 0;
+ assert(err);
+
/* Look for a packed ref */
for (i = 0; i < n; i++)
if (get_packed_ref(refnames[i]))
@@ -2540,13 +2572,8 @@ int repack_without_refs(const char **refnames, int n, struct strbuf *err)
return 0; /* no refname exists in packed refs */
if (lock_packed_refs(0)) {
- if (err) {
- unable_to_lock_message(git_path("packed-refs"), errno,
- err);
- return -1;
- }
- unable_to_lock_error(git_path("packed-refs"), errno);
- return error("cannot delete '%s' from packed refs", refnames[i]);
+ unable_to_lock_message(git_path("packed-refs"), errno, err);
+ return -1;
}
packed = get_packed_refs(&ref_cache);
@@ -2572,7 +2599,7 @@ int repack_without_refs(const char **refnames, int n, struct strbuf *err)
/* Write what remains */
ret = commit_packed_refs();
- if (ret && err)
+ if (ret)
strbuf_addf(err, "unable to overwrite old ref-pack file: %s",
strerror(errno));
return ret;
@@ -2580,6 +2607,8 @@ int repack_without_refs(const char **refnames, int n, struct strbuf *err)
static int delete_ref_loose(struct ref_lock *lock, int flag, struct strbuf *err)
{
+ assert(err);
+
if (!(flag & REF_ISPACKED) || flag & REF_ISSYMREF) {
/* loose */
int res, i = strlen(lock->lk->filename) - 5; /* .lock */
@@ -2678,25 +2707,31 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
struct stat loginfo;
int log = !lstat(git_path("logs/%s", oldrefname), &loginfo);
const char *symref = NULL;
+ struct string_list skiplist = STRING_LIST_INIT_NODUP;
if (log && S_ISLNK(loginfo.st_mode))
return error("reflog for %s is a symlink", oldrefname);
- symref = resolve_ref_unsafe(oldrefname, orig_sha1,
- RESOLVE_REF_READING, &flag);
+ symref = resolve_ref_unsafe(oldrefname, orig_sha1, &flag,
+ RESOLVE_REF_READING);
if (flag & REF_ISSYMREF)
return error("refname %s is a symbolic ref, renaming it is not supported",
oldrefname);
if (!symref)
return error("refname %s not found", oldrefname);
+ string_list_insert(&skiplist, oldrefname);
if (!is_refname_available(newrefname, get_packed_refs(&ref_cache),
- &oldrefname, 1))
+ &skiplist)) {
+ string_list_clear(&skiplist, 0);
return 1;
-
+ }
if (!is_refname_available(newrefname, get_loose_refs(&ref_cache),
- &oldrefname, 1))
+ &skiplist)) {
+ string_list_clear(&skiplist, 0);
return 1;
+ }
+ string_list_clear(&skiplist, 0);
if (log && rename(git_path("logs/%s", oldrefname), git_path(TMP_RENAMED_LOG)))
return error("unable to move logfile logs/%s to "TMP_RENAMED_LOG": %s",
@@ -2707,7 +2742,7 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
goto rollback;
}
- if (!read_ref_full(newrefname, sha1, RESOLVE_REF_READING, NULL) &&
+ if (!read_ref_full(newrefname, sha1, NULL, RESOLVE_REF_READING) &&
delete_ref(newrefname, sha1, REF_NODEREF)) {
if (errno==EISDIR) {
if (remove_empty_directories(git_path("%s", newrefname))) {
@@ -2725,7 +2760,7 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
logmoved = log;
- lock = lock_ref_sha1_basic(newrefname, NULL, 0, NULL, NULL, 0);
+ lock = lock_ref_sha1_basic(newrefname, NULL, NULL, 0, NULL);
if (!lock) {
error("unable to lock %s for update", newrefname);
goto rollback;
@@ -2740,7 +2775,7 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
return 0;
rollback:
- lock = lock_ref_sha1_basic(oldrefname, NULL, 0, NULL, NULL, 0);
+ lock = lock_ref_sha1_basic(oldrefname, NULL, NULL, 0, NULL);
if (!lock) {
error("unable to lock %s for rollback", oldrefname);
goto rollbacklog;
@@ -2985,8 +3020,8 @@ static int write_ref_sha1(struct ref_lock *lock,
unsigned char head_sha1[20];
int head_flag;
const char *head_ref;
- head_ref = resolve_ref_unsafe("HEAD", head_sha1,
- RESOLVE_REF_READING, &head_flag);
+ head_ref = resolve_ref_unsafe("HEAD", head_sha1, &head_flag,
+ RESOLVE_REF_READING);
if (head_ref && (head_flag & REF_ISSYMREF) &&
!strcmp(head_ref, lock->ref_name))
log_ref_write("HEAD", lock->old_sha1, sha1, logmsg);
@@ -3353,7 +3388,7 @@ static int do_for_each_reflog(struct strbuf *name, each_ref_fn fn, void *cb_data
retval = do_for_each_reflog(name, fn, cb_data);
} else {
unsigned char sha1[20];
- if (read_ref_full(name->buf, sha1, 0, NULL))
+ if (read_ref_full(name->buf, sha1, NULL, 0))
retval = error("bad ref for %s", name->buf);
else
retval = fn(name->buf, sha1, 0, cb_data);
@@ -3423,6 +3458,8 @@ struct ref_transaction {
struct ref_transaction *ref_transaction_begin(struct strbuf *err)
{
+ assert(err);
+
return xcalloc(1, sizeof(struct ref_transaction));
}
@@ -3462,6 +3499,8 @@ int ref_transaction_update(struct ref_transaction *transaction,
{
struct ref_update *update;
+ assert(err);
+
if (transaction->state != REF_TRANSACTION_OPEN)
die("BUG: update called for transaction that is not open");
@@ -3470,7 +3509,8 @@ int ref_transaction_update(struct ref_transaction *transaction,
if (!is_null_sha1(new_sha1) &&
check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
- strbuf_addf(err, "Bad refname: %s", refname);
+ strbuf_addf(err, "refusing to update ref with bad name %s",
+ refname);
return -1;
}
@@ -3493,6 +3533,8 @@ int ref_transaction_create(struct ref_transaction *transaction,
{
struct ref_update *update;
+ assert(err);
+
if (transaction->state != REF_TRANSACTION_OPEN)
die("BUG: create called for transaction that is not open");
@@ -3500,7 +3542,8 @@ int ref_transaction_create(struct ref_transaction *transaction,
die("BUG: create ref with null new_sha1");
if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
- strbuf_addf(err, "Bad refname: %s", refname);
+ strbuf_addf(err, "refusing to create ref with bad name %s",
+ refname);
return -1;
}
@@ -3523,6 +3566,8 @@ int ref_transaction_delete(struct ref_transaction *transaction,
{
struct ref_update *update;
+ assert(err);
+
if (transaction->state != REF_TRANSACTION_OPEN)
die("BUG: delete called for transaction that is not open");
@@ -3585,13 +3630,14 @@ static int ref_update_reject_duplicates(struct ref_update **updates, int n,
struct strbuf *err)
{
int i;
+
+ assert(err);
+
for (i = 1; i < n; i++)
if (!strcmp(updates[i - 1]->refname, updates[i]->refname)) {
- const char *str =
- "Multiple updates for ref '%s' not allowed.";
- if (err)
- strbuf_addf(err, str, updates[i]->refname);
-
+ strbuf_addf(err,
+ "Multiple updates for ref '%s' not allowed.",
+ updates[i]->refname);
return 1;
}
return 0;
@@ -3600,11 +3646,13 @@ static int ref_update_reject_duplicates(struct ref_update **updates, int n,
int ref_transaction_commit(struct ref_transaction *transaction,
struct strbuf *err)
{
- int ret = 0, delnum = 0, i, df_conflict = 0;
+ int ret = 0, delnum = 0, i;
const char **delnames;
int n = transaction->nr;
struct ref_update **updates = transaction->updates;
+ assert(err);
+
if (transaction->state != REF_TRANSACTION_OPEN)
die("BUG: commit called for transaction that is not open");
@@ -3631,16 +3679,15 @@ int ref_transaction_commit(struct ref_transaction *transaction,
(update->have_old ?
update->old_sha1 :
NULL),
+ NULL,
update->flags,
- &update->type,
- delnames, delnum);
+ &update->type);
if (!update->lock) {
- if (errno == ENOTDIR)
- df_conflict = 1;
- if (err)
- strbuf_addf(err, "Cannot lock the ref '%s'.",
- update->refname);
- ret = -1;
+ int df_conflict = (errno == ENOTDIR);
+
+ strbuf_addf(err, "Cannot lock the ref '%s'.",
+ update->refname);
+ ret = df_conflict ? UPDATE_REFS_NAME_CONFLICT : -1;
goto cleanup;
}
}
@@ -3654,9 +3701,8 @@ int ref_transaction_commit(struct ref_transaction *transaction,
update->msg);
update->lock = NULL; /* freed by write_ref_sha1 */
if (ret) {
- if (err)
- strbuf_addf(err, "Cannot update the ref '%s'.",
- update->refname);
+ strbuf_addf(err, "Cannot update the ref '%s'.",
+ update->refname);
ret = -1;
goto cleanup;
}
@@ -3668,16 +3714,20 @@ int ref_transaction_commit(struct ref_transaction *transaction,
struct ref_update *update = updates[i];
if (update->lock) {
- if (delete_ref_loose(update->lock, update->type, err))
+ if (delete_ref_loose(update->lock, update->type, err)) {
ret = -1;
+ goto cleanup;
+ }
if (!(update->flags & REF_ISPRUNING))
delnames[delnum++] = update->lock->ref_name;
}
}
- if (repack_without_refs(delnames, delnum, err))
+ if (repack_without_refs(delnames, delnum, err)) {
ret = -1;
+ goto cleanup;
+ }
for (i = 0; i < delnum; i++)
unlink_or_warn(git_path("logs/%s", delnames[i]));
clear_loose_ref_cache(&ref_cache);
@@ -3689,8 +3739,6 @@ cleanup:
if (updates[i]->lock)
unlock_ref(updates[i]->lock);
free(delnames);
- if (df_conflict)
- ret = -2;
return ret;
}
diff --git c/refs.h w/refs.h
index a7b8009..a96e174 100644
--- c/refs.h
+++ w/refs.h
@@ -175,10 +175,12 @@ extern int peel_ref(const char *refname, unsigned char *sha1);
* ref_transaction_create(), etc.
* REF_NODEREF: act on the ref directly, instead of dereferencing
* symbolic references.
+ * REF_BADNAMEOK: allow locking a ref that has a bad name.
*
* Flags >= 0x100 are reserved for internal use.
*/
#define REF_NODEREF 0x01
+#define REF_BADNAMEOK 0x02
/*
* This function sets errno to something meaningful on failure.
*/
@@ -322,11 +324,10 @@ int ref_transaction_delete(struct ref_transaction *transaction,
* Commit all of the changes that have been queued in transaction, as
* atomically as possible. Return a nonzero value if there is a
* problem.
- * If the transaction is already in failed state this function will return
- * an error.
+ *
* Function returns 0 on success, -1 for generic failures and
- * UPDATE_REFS_NAME_CONFLICT (-2) if the failure was due to a name
- * collision (ENOTDIR).
+ * UPDATE_REFS_NAME_CONFLICT (-2) if the failure was due to a naming conflict.
+ * For example, the ref names A and A/B conflict.
*/
#define UPDATE_REFS_NAME_CONFLICT -2
int ref_transaction_commit(struct ref_transaction *transaction,
diff --git c/remote.c w/remote.c
index 2adb31c..67c375d 100644
--- c/remote.c
+++ w/remote.c
@@ -486,7 +486,7 @@ static void read_config(void)
return;
default_remote_name = "origin";
current_branch = NULL;
- head_ref = resolve_ref_unsafe("HEAD", sha1, 0, &flag);
+ head_ref = resolve_ref_unsafe("HEAD", sha1, &flag, 0);
if (head_ref && (flag & REF_ISSYMREF) &&
starts_with(head_ref, "refs/heads/")) {
current_branch =
@@ -1121,8 +1121,8 @@ static char *guess_ref(const char *name, struct ref *peer)
struct strbuf buf = STRBUF_INIT;
unsigned char sha1[20];
- const char *r = resolve_ref_unsafe(peer->name, sha1,
- RESOLVE_REF_READING, NULL);
+ const char *r = resolve_ref_unsafe(peer->name, sha1, NULL,
+ RESOLVE_REF_READING);
if (!r)
return NULL;
@@ -1183,8 +1183,8 @@ static int match_explicit(struct ref *src, struct ref *dst,
unsigned char sha1[20];
int flag;
- dst_value = resolve_ref_unsafe(matched_src->name, sha1,
- RESOLVE_REF_READING, &flag);
+ dst_value = resolve_ref_unsafe(matched_src->name, sha1, &flag,
+ RESOLVE_REF_READING);
if (!dst_value ||
((flag & REF_ISSYMREF) &&
!starts_with(dst_value, "refs/heads/")))
@@ -1658,7 +1658,7 @@ static int ignore_symref_update(const char *refname)
unsigned char sha1[20];
int flag;
- if (!resolve_ref_unsafe(refname, sha1, 0, &flag))
+ if (!resolve_ref_unsafe(refname, sha1, &flag, 0))
return 0; /* non-existing refs are OK */
return (flag & REF_ISSYMREF);
}
diff --git c/sequencer.c w/sequencer.c
index ebe8713..6a05ad4 100644
--- c/sequencer.c
+++ w/sequencer.c
@@ -366,7 +366,7 @@ static int is_index_unchanged(void)
unsigned char head_sha1[20];
struct commit *head_commit;
- if (!resolve_ref_unsafe("HEAD", head_sha1, RESOLVE_REF_READING, NULL))
+ if (!resolve_ref_unsafe("HEAD", head_sha1, NULL, RESOLVE_REF_READING))
return error(_("Could not resolve HEAD commit\n"));
head_commit = lookup_commit(head_sha1);
@@ -912,7 +912,7 @@ static int rollback_single_pick(void)
if (!file_exists(git_path("CHERRY_PICK_HEAD")) &&
!file_exists(git_path("REVERT_HEAD")))
return error(_("no cherry-pick or revert in progress"));
- if (read_ref_full("HEAD", head_sha1, 0, NULL))
+ if (read_ref_full("HEAD", head_sha1, NULL, 0))
return error(_("cannot resolve HEAD"));
if (is_null_sha1(head_sha1))
return error(_("cannot abort from a branch yet to be born"));
diff --git c/t/t1400-update-ref.sh w/t/t1400-update-ref.sh
index 0218e96..ff4607b 100755
--- c/t/t1400-update-ref.sh
+++ w/t/t1400-update-ref.sh
@@ -110,6 +110,22 @@ test_expect_success "delete symref without dereference when the referred ref is
cp -f .git/HEAD.orig .git/HEAD
git update-ref -d $m
+test_expect_success 'update-ref -d is not confused by self-reference' '
+ git symbolic-ref refs/heads/self refs/heads/self &&
+ test_when_finished "rm -f .git/refs/heads/self" &&
+ test_path_is_file .git/refs/heads/self &&
+ test_must_fail git update-ref -d refs/heads/self &&
+ test_path_is_file .git/refs/heads/self
+'
+
+test_expect_success 'update-ref --no-deref -d can delete self-reference' '
+ git symbolic-ref refs/heads/self refs/heads/self &&
+ test_when_finished "rm -f .git/refs/heads/self" &&
+ test_path_is_file .git/refs/heads/self &&
+ git update-ref --no-deref -d refs/heads/self &&
+ test_path_is_missing .git/refs/heads/self
+'
+
test_expect_success '(not) create HEAD with old sha1' "
test_must_fail git update-ref HEAD $A $B
"
diff --git c/t/t1402-check-ref-format.sh w/t/t1402-check-ref-format.sh
index 1a5a5f3..058fa37 100755
--- c/t/t1402-check-ref-format.sh
+++ w/t/t1402-check-ref-format.sh
@@ -196,4 +196,52 @@ invalid_ref_normalized 'heads///foo.lock'
invalid_ref_normalized 'foo.lock/bar'
invalid_ref_normalized 'foo.lock///bar'
+test_expect_success 'git branch shows badly named ref' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch >output &&
+ grep -e "broken...ref" output
+'
+
+test_expect_success 'git branch -d can delete badly named ref' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch -d broken...ref &&
+ git branch >output &&
+ ! grep -e "broken...ref" output
+'
+
+test_expect_success 'git branch -D can delete badly named ref' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch -D broken...ref &&
+ git branch >output &&
+ ! grep -e "broken...ref" output
+'
+
+test_expect_success 'git update-ref -d can delete badly named ref' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git update-ref -d refs/heads/broken...ref &&
+ git branch >output &&
+ ! grep -e "broken...ref" output
+'
+
+test_expect_success 'git branch can not create a badly named ref' '
+ test_must_fail git branch broken...ref
+'
+
+test_expect_success 'git branch can not rename to a bad ref name' '
+ git branch goodref &&
+ test_must_fail git branch -m goodref broken...ref
+'
+
+test_expect_failure 'git branch can rename from a bad ref name' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch -m broken...ref renamed &&
+ test_must_fail git rev-parse broken...ref &&
+ test_cmp_rev master renamed
+'
+
test_done
diff --git c/t/t3200-branch.sh w/t/t3200-branch.sh
index ac31b71..432921b 100755
--- c/t/t3200-branch.sh
+++ w/t/t3200-branch.sh
@@ -285,6 +285,15 @@ test_expect_success 'deleting a dangling symref' '
test_i18ncmp expect actual
'
+test_expect_success 'deleting a self-referential symref' '
+ git symbolic-ref refs/heads/self-reference refs/heads/self-reference &&
+ test_path_is_file .git/refs/heads/self-reference &&
+ echo "Deleted branch self-reference (was refs/heads/self-reference)." >expect &&
+ git branch -d self-reference >actual &&
+ test_path_is_missing .git/refs/heads/self-reference &&
+ test_i18ncmp expect actual
+'
+
test_expect_success 'renaming a symref is not allowed' '
git symbolic-ref refs/heads/master2 refs/heads/master &&
test_must_fail git branch -m master2 master3 &&
diff --git c/t/t7001-mv.sh w/t/t7001-mv.sh
index 54d7807..69f11bd 100755
--- c/t/t7001-mv.sh
+++ w/t/t7001-mv.sh
@@ -350,10 +350,11 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
'
test_expect_success 'git mv moves a submodule with gitfile' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
(
cd mod &&
git mv ../sub/ .
@@ -372,11 +373,12 @@ test_expect_success 'git mv moves a submodule with gitfile' '
'
test_expect_success 'mv does not complain when no .gitmodules file is found' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git rm .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
! test -s actual.err &&
! test -e sub &&
@@ -390,11 +392,12 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '
'
test_expect_success 'mv will error out on a modified .gitmodules file unless staged' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules foo.bar true &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
test_must_fail git mv sub mod/sub 2>actual.err &&
test -s actual.err &&
test -e sub &&
@@ -413,13 +416,14 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta
'
test_expect_success 'mv issues a warning when section is not found in .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules --remove-section submodule.sub &&
git add .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
test_i18ncmp expect.err actual.err &&
! test -e sub &&
@@ -433,9 +437,10 @@ test_expect_success 'mv issues a warning when section is not found in .gitmodule
'
test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
+ mkdir mod &&
git mv -n sub mod/sub 2>actual.err &&
test -f sub/.git &&
git diff-index --exit-code HEAD &&
diff --git c/transport-helper.c w/transport-helper.c
index 270ae28..8365441 100644
--- c/transport-helper.c
+++ w/transport-helper.c
@@ -889,7 +889,9 @@ static int push_refs_with_export(struct transport *transport,
int flag;
/* Follow symbolic refs (mainly for HEAD). */
- name = resolve_ref_unsafe(ref->peer_ref->name, sha1, RESOLVE_REF_READING, &flag);
+ name = resolve_ref_unsafe(
+ ref->peer_ref->name, sha1,
+ &flag, RESOLVE_REF_READING);
if (!name || !(flag & REF_ISSYMREF))
name = ref->peer_ref->name;
diff --git c/transport.c w/transport.c
index f40e950..3ba7bbf 100644
--- c/transport.c
+++ w/transport.c
@@ -168,8 +168,8 @@ static void set_upstreams(struct transport *transport, struct ref *refs,
/* Follow symbolic refs (mainly for HEAD). */
localname = ref->peer_ref->name;
remotename = ref->name;
- tmp = resolve_ref_unsafe(localname, sha,
- RESOLVE_REF_READING, &flag);
+ tmp = resolve_ref_unsafe(localname, sha, &flag,
+ RESOLVE_REF_READING);
if (tmp && flag & REF_ISSYMREF &&
starts_with(tmp, "refs/heads/"))
localname = tmp;
@@ -754,7 +754,7 @@ void transport_print_push_status(const char *dest, struct ref *refs,
unsigned char head_sha1[20];
char *head;
- head = resolve_refdup("HEAD", head_sha1, RESOLVE_REF_READING, NULL);
+ head = resolve_refdup("HEAD", head_sha1, NULL, RESOLVE_REF_READING);
if (verbose) {
for (ref = refs; ref; ref = ref->next)
diff --git c/upload-pack.c w/upload-pack.c
index 01de944..3b51ccb 100644
--- c/upload-pack.c
+++ w/upload-pack.c
@@ -743,7 +743,7 @@ static int find_symref(const char *refname, const unsigned char *sha1, int flag,
if ((flag & REF_ISSYMREF) == 0)
return 0;
- symref_target = resolve_ref_unsafe(refname, unused, 0, &flag);
+ symref_target = resolve_ref_unsafe(refname, unused, &flag, 0);
if (!symref_target || (flag & REF_ISSYMREF) == 0)
die("'%s' is a symref but it is not?", refname);
item = string_list_append(cb_data, refname);
diff --git c/wrapper.c w/wrapper.c
index 74a0cc0..ec7a08b 100644
--- c/wrapper.c
+++ w/wrapper.c
@@ -430,8 +430,8 @@ int xmkstemp_mode(char *template, int mode)
static int warn_if_unremovable(const char *op, const char *file, int rc)
{
int err;
- if (rc >= 0 || errno == ENOENT)
- return rc;
+ if (!rc || errno == ENOENT)
+ return 0;
err = errno;
warning("unable to %s %s: %s", op, file, strerror(errno));
errno = err;
@@ -440,20 +440,16 @@ static int warn_if_unremovable(const char *op, const char *file, int rc)
int unlink_or_msg(const char *file, struct strbuf *err)
{
- if (err) {
- int rc = unlink(file);
- int save_errno = errno;
+ int rc = unlink(file);
- if (rc < 0 && errno != ENOENT) {
- strbuf_addf(err, "unable to unlink %s: %s",
- file, strerror(errno));
- errno = save_errno;
- return -1;
- }
+ assert(err);
+
+ if (!rc || errno == ENOENT)
return 0;
- }
- return unlink_or_warn(file);
+ strbuf_addf(err, "unable to unlink %s: %s",
+ file, strerror(errno));
+ return -1;
}
int unlink_or_warn(const char *file)
diff --git c/wt-status.c w/wt-status.c
index 318a191..6819e2b 100644
--- c/wt-status.c
+++ w/wt-status.c
@@ -128,7 +128,7 @@ void wt_status_prepare(struct wt_status *s)
s->show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES;
s->use_color = -1;
s->relative_paths = 1;
- s->branch = resolve_refdup("HEAD", sha1, 0, NULL);
+ s->branch = resolve_refdup("HEAD", sha1, NULL, 0);
s->reference = "HEAD";
s->fp = stdout;
s->index_file = get_index_file();
^ permalink raw reply related [relevance 2%]
* [PATCH 01/19] mv test: recreate mod/ directory instead of relying on stale copy
2014-09-11 3:03 2% ` [PATCH v21 0/19] rs/ref-transaction (Re: Transaction patch series overview) Jonathan Nieder
@ 2014-09-11 3:04 10% ` Jonathan Nieder
2014-10-02 1:48 1% ` [PATCH v22 0/24] rs/ref-transaction Jonathan Nieder
1 sibling, 0 replies; 200+ results
From: Jonathan Nieder @ 2014-09-11 3:04 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: git@vger.kernel.org, Michael Haggerty
The tests for 'git mv moves a submodule' functionality often run
commands like
git mv sub mod/sub
to move a submodule into a subdirectory. Just like plain /bin/mv,
this is supposed to succeed if the mod/ parent directory exists
and fail if it doesn't exist.
Usually these tests mkdir the parent directory beforehand, but some
instead rely on it being left behind by previous tests.
More precisely, when 'git reset --hard' tries to move to a state where
mod/sub is not present any more, it would perform the following
operations:
rmdir("mod/sub")
rmdir("mod")
The first fails with ENOENT because the test script removed mod/sub
with "rm -rf" already, so 'reset --hard' doesn't bother to move on to
the second, and the mod/ directory is kept around.
Better to explicitly remove and re-create the mod/ directory so later
tests don't have to depend on the directory left behind by the earlier
ones at all (making it easier to rearrange or skip some tests in the
file or to tweak 'reset --hard' behavior without breaking unrelated
tests).
Noticed while testing a patch that fixes the reset --hard behavior
described above.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Ronnie Sahlberg <sahlberg@google.com>
---
t/t7001-mv.sh | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 54d7807..69f11bd 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -350,10 +350,11 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
'
test_expect_success 'git mv moves a submodule with gitfile' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
(
cd mod &&
git mv ../sub/ .
@@ -372,11 +373,12 @@ test_expect_success 'git mv moves a submodule with gitfile' '
'
test_expect_success 'mv does not complain when no .gitmodules file is found' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git rm .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
! test -s actual.err &&
! test -e sub &&
@@ -390,11 +392,12 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '
'
test_expect_success 'mv will error out on a modified .gitmodules file unless staged' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules foo.bar true &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
test_must_fail git mv sub mod/sub 2>actual.err &&
test -s actual.err &&
test -e sub &&
@@ -413,13 +416,14 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta
'
test_expect_success 'mv issues a warning when section is not found in .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules --remove-section submodule.sub &&
git add .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
test_i18ncmp expect.err actual.err &&
! test -e sub &&
@@ -433,9 +437,10 @@ test_expect_success 'mv issues a warning when section is not found in .gitmodule
'
test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
+ mkdir mod &&
git mv -n sub mod/sub 2>actual.err &&
test -f sub/.git &&
git diff-index --exit-code HEAD &&
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [relevance 10%]
* [PATCH v22 0/24] rs/ref-transaction
2014-09-11 3:03 2% ` [PATCH v21 0/19] rs/ref-transaction (Re: Transaction patch series overview) Jonathan Nieder
2014-09-11 3:04 10% ` [PATCH 01/19] mv test: recreate mod/ directory instead of relying on stale copy Jonathan Nieder
@ 2014-10-02 1:48 1% ` Jonathan Nieder
2014-10-02 1:50 10% ` [PATCH 01/24] mv test: recreate mod/ directory instead of relying on stale copy Jonathan Nieder
1 sibling, 1 reply; 200+ results
From: Jonathan Nieder @ 2014-10-02 1:48 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: git@vger.kernel.org, Michael Haggerty
Jonathan Nieder wrote:
> Jonathan Nieder wrote:
>> The next series from Ronnie's collection is available at
>> https://code-review.googlesource.com/#/q/topic:ref-transaction in case
>> someone wants a fresh series to look at.
>
> Here is the outcome of that review. It could use another set of eyes
> (hint, hint)
Another set of eyes arrived and helped. Here's a reroll.
Jonathan Nieder (6):
mv test: recreate mod/ directory instead of relying on stale copy
branch -d: avoid repeated symref resolution
packed-ref cache: forbid dot-components in refnames
refs.c: do not permit err == NULL
lockfile: remove unable_to_lock_error
ref_transaction_commit: bail out on failure to remove a ref
Junio C Hamano (1):
reflog test: test interaction with detached HEAD
Ronnie Sahlberg (17):
wrapper.c: remove/unlink_or_warn: simplify, treat ENOENT as success
wrapper.c: add a new function unlink_or_msg
refs.c: add an err argument to delete_ref_loose
refs.c: pass the ref log message to _create/delete/update instead of
_commit
rename_ref: don't ask read_ref_full where the ref came from
refs.c: refuse to lock badly named refs in lock_ref_sha1_basic
refs.c: call lock_ref_sha1_basic directly from commit
refs.c: pass a list of names to skip to is_refname_available
refs.c: ref_transaction_commit: distinguish name conflicts from other
errors
fetch.c: change s_update_ref to use a ref transaction
refs.c: make write_ref_sha1 static
refs.c: change resolve_ref_unsafe reading argument to be a flags field
branch -d: simplify by using RESOLVE_REF_READING flag
test: put tests for handling of bad ref names in one place
refs.c: allow listing and deleting badly named refs
for-each-ref.c: improve message before aborting on broken ref
remote rm/prune: print a message when writing packed-refs fails
branch.c | 6 +-
builtin/blame.c | 2 +-
builtin/branch.c | 22 ++-
builtin/checkout.c | 6 +-
builtin/clone.c | 2 +-
builtin/commit.c | 6 +-
builtin/fetch.c | 34 ++--
builtin/fmt-merge-msg.c | 2 +-
builtin/for-each-ref.c | 11 +-
builtin/fsck.c | 2 +-
builtin/log.c | 3 +-
builtin/merge.c | 2 +-
builtin/notes.c | 2 +-
builtin/receive-pack.c | 9 +-
builtin/remote.c | 20 ++-
builtin/replace.c | 5 +-
builtin/show-branch.c | 7 +-
builtin/symbolic-ref.c | 2 +-
builtin/tag.c | 4 +-
builtin/update-ref.c | 13 +-
bundle.c | 2 +-
cache.h | 42 +++--
fast-import.c | 8 +-
git-compat-util.h | 16 +-
http-backend.c | 4 +-
lockfile.c | 10 --
notes-merge.c | 2 +-
reflog-walk.c | 5 +-
refs.c | 438 ++++++++++++++++++++++++++++++++---------------
refs.h | 40 +++--
remote.c | 11 +-
sequencer.c | 8 +-
t/t1400-update-ref.sh | 62 +++----
t/t1413-reflog-detach.sh | 70 ++++++++
t/t1430-bad-ref-name.sh | 207 ++++++++++++++++++++++
t/t3200-branch.sh | 9 +
t/t7001-mv.sh | 15 +-
t/t9300-fast-import.sh | 30 ----
transport-helper.c | 5 +-
transport.c | 5 +-
upload-pack.c | 2 +-
walker.c | 5 +-
wrapper.c | 28 ++-
wt-status.c | 2 +-
44 files changed, 838 insertions(+), 348 deletions(-)
create mode 100755 t/t1413-reflog-detach.sh
create mode 100755 t/t1430-bad-ref-name.sh
--
2.0.0.450.ga793d96
---
Changes since v21:
branch.c | 2 +-
builtin/blame.c | 2 +-
builtin/branch.c | 25 ++---
builtin/checkout.c | 6 +-
builtin/clone.c | 2 +-
builtin/commit.c | 2 +-
builtin/fetch.c | 6 +-
builtin/fmt-merge-msg.c | 2 +-
builtin/for-each-ref.c | 11 +-
builtin/fsck.c | 2 +-
builtin/log.c | 4 +-
builtin/merge.c | 2 +-
builtin/notes.c | 2 +-
builtin/receive-pack.c | 4 +-
builtin/remote.c | 21 ++--
builtin/show-branch.c | 9 +-
builtin/symbolic-ref.c | 2 +-
builtin/update-ref.c | 3 +-
bundle.c | 2 +-
cache.h | 33 ++++--
http-backend.c | 5 +-
notes-merge.c | 2 +-
reflog-walk.c | 6 +-
refs.c | 263 +++++++++++++++++++++++++-------------------
refs.h | 34 +++---
remote.c | 13 ++-
sequencer.c | 4 +-
t/t1400-update-ref.sh | 46 ++------
t/t1402-check-ref-format.sh | 48 --------
t/t1413-reflog-detach.sh | 70 ++++++++++++
t/t1430-bad-ref-name.sh | 207 ++++++++++++++++++++++++++++++++++
t/t9300-fast-import.sh | 30 -----
transport-helper.c | 5 +-
transport.c | 6 +-
upload-pack.c | 2 +-
wt-status.c | 2 +-
36 files changed, 557 insertions(+), 328 deletions(-)
diff --git c/branch.c w/branch.c
index ba3e1c1..adb07c6 100644
--- c/branch.c
+++ w/branch.c
@@ -186,7 +186,7 @@ int validate_new_branchname(const char *name, struct strbuf *ref,
const char *head;
unsigned char sha1[20];
- head = resolve_ref_unsafe("HEAD", sha1, NULL, 0);
+ head = resolve_ref_unsafe("HEAD", 0, sha1, NULL);
if (!is_bare_repository() && head && !strcmp(head, ref->buf))
die(_("Cannot force update the current branch."));
}
diff --git c/builtin/blame.c w/builtin/blame.c
index b8bec0a..5cbd38f 100644
--- c/builtin/blame.c
+++ w/builtin/blame.c
@@ -2292,7 +2292,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
commit->object.type = OBJ_COMMIT;
parent_tail = &commit->parents;
- if (!resolve_ref_unsafe("HEAD", head_sha1, NULL, RESOLVE_REF_READING))
+ if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_sha1, NULL))
die("no such ref: HEAD");
parent_tail = append_parent(parent_tail, head_sha1);
diff --git c/builtin/branch.c w/builtin/branch.c
index 5d5bc56..94aaea1 100644
--- c/builtin/branch.c
+++ w/builtin/branch.c
@@ -129,8 +129,8 @@ static int branch_merged(int kind, const char *name,
branch->merge[0] &&
branch->merge[0]->dst &&
(reference_name = reference_name_to_free =
- resolve_refdup(branch->merge[0]->dst, sha1,
- NULL, RESOLVE_REF_READING)) != NULL)
+ resolve_refdup(branch->merge[0]->dst, RESOLVE_REF_READING,
+ sha1, NULL)) != NULL)
reference_rev = lookup_commit_reference(sha1);
}
if (!reference_rev)
@@ -234,13 +234,12 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
free(name);
name = mkpathdup(fmt, bname.buf);
- target = resolve_ref_unsafe(name, sha1, &flags,
+ target = resolve_ref_unsafe(name,
RESOLVE_REF_READING
- | RESOLVE_REF_NODEREF
- | RESOLVE_REF_ALLOW_BAD_NAME);
- if (!target ||
- (!(flags & (REF_ISSYMREF|REF_ISBROKEN)) &&
- is_null_sha1(sha1))) {
+ | RESOLVE_REF_NO_RECURSE
+ | RESOLVE_REF_ALLOW_BAD_NAME,
+ sha1, &flags);
+ if (!target) {
error(remote_branch
? _("remote branch '%s' not found.")
: _("branch '%s' not found."), bname.buf);
@@ -255,7 +254,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
continue;
}
- if (delete_ref(name, sha1, REF_NODEREF|REF_BADNAMEOK)) {
+ if (delete_ref(name, sha1, REF_NODEREF)) {
error(remote_branch
? _("Error deleting remote branch '%s'")
: _("Error deleting branch '%s'"),
@@ -268,8 +267,8 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
? _("Deleted remote branch %s (was %s).\n")
: _("Deleted branch %s (was %s).\n"),
bname.buf,
- (flags & REF_ISSYMREF)
- ? target
+ (flags & REF_ISBROKEN) ? "broken"
+ : (flags & REF_ISSYMREF) ? target
: find_unique_abbrev(sha1, DEFAULT_ABBREV));
}
delete_branch_config(bname.buf);
@@ -301,7 +300,7 @@ static char *resolve_symref(const char *src, const char *prefix)
int flag;
const char *dst, *cp;
- dst = resolve_ref_unsafe(src, sha1, &flag, 0);
+ dst = resolve_ref_unsafe(src, 0, sha1, &flag);
if (!(dst && (flag & REF_ISSYMREF)))
return NULL;
if (prefix && (cp = skip_prefix(dst, prefix)))
@@ -867,7 +866,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
track = git_branch_track;
- head = resolve_refdup("HEAD", head_sha1, NULL, 0);
+ head = resolve_refdup("HEAD", 0, head_sha1, NULL);
if (!head)
die(_("Failed to resolve HEAD as a valid ref."));
if (!strcmp(head, "HEAD")) {
diff --git c/builtin/checkout.c w/builtin/checkout.c
index 64af1f7..a5fef2d 100644
--- c/builtin/checkout.c
+++ w/builtin/checkout.c
@@ -356,7 +356,7 @@ static int checkout_paths(const struct checkout_opts *opts,
commit_locked_index(lock_file))
die(_("unable to write new index file"));
- read_ref_full("HEAD", rev, &flag, 0);
+ read_ref_full("HEAD", 0, rev, &flag);
head = lookup_commit_reference_gently(rev, 1);
errs |= post_checkout_hook(head, head, 0);
@@ -771,7 +771,7 @@ static int switch_branches(const struct checkout_opts *opts,
unsigned char rev[20];
int flag, writeout_error = 0;
memset(&old, 0, sizeof(old));
- old.path = path_to_free = resolve_refdup("HEAD", rev, &flag, 0);
+ old.path = path_to_free = resolve_refdup("HEAD", 0, rev, &flag);
old.commit = lookup_commit_reference_gently(rev, 1);
if (!(flag & REF_ISSYMREF))
old.path = NULL;
@@ -1068,7 +1068,7 @@ static int checkout_branch(struct checkout_opts *opts,
unsigned char rev[20];
int flag;
- if (!read_ref_full("HEAD", rev, &flag, 0) &&
+ if (!read_ref_full("HEAD", 0, rev, &flag) &&
(flag & REF_ISSYMREF) && is_null_sha1(rev))
return switch_unborn_to_new_branch(opts);
}
diff --git c/builtin/clone.c w/builtin/clone.c
index 12a78e1..0f5c880 100644
--- c/builtin/clone.c
+++ w/builtin/clone.c
@@ -622,7 +622,7 @@ static int checkout(void)
if (option_no_checkout)
return 0;
- head = resolve_refdup("HEAD", sha1, NULL, RESOLVE_REF_READING);
+ head = resolve_refdup("HEAD", RESOLVE_REF_READING, sha1, NULL);
if (!head) {
warning(_("remote HEAD refers to nonexistent ref, "
"unable to checkout.\n"));
diff --git c/builtin/commit.c w/builtin/commit.c
index 3536330..9ccc78b 100644
--- c/builtin/commit.c
+++ w/builtin/commit.c
@@ -1468,7 +1468,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1,
rev.diffopt.break_opt = 0;
diff_setup_done(&rev.diffopt);
- head = resolve_ref_unsafe("HEAD", junk_sha1, NULL, 0);
+ head = resolve_ref_unsafe("HEAD", 0, junk_sha1, NULL);
printf("[%s%s ",
starts_with(head, "refs/heads/") ?
head + 11 :
diff --git c/builtin/fetch.c w/builtin/fetch.c
index 2e3bc73..30b40f6 100644
--- c/builtin/fetch.c
+++ w/builtin/fetch.c
@@ -392,10 +392,10 @@ static int s_update_ref(const char *action,
goto fail;
ret = ref_transaction_commit(transaction, &err);
- if (ret == UPDATE_REFS_NAME_CONFLICT)
- df_conflict = 1;
- if (ret)
+ if (ret) {
+ df_conflict = (ret == TRANSACTION_NAME_CONFLICT);
goto fail;
+ }
ref_transaction_free(transaction);
strbuf_release(&err);
diff --git c/builtin/fmt-merge-msg.c w/builtin/fmt-merge-msg.c
index b2355ad..afe05dc 100644
--- c/builtin/fmt-merge-msg.c
+++ w/builtin/fmt-merge-msg.c
@@ -602,7 +602,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
/* get current branch */
current_branch = current_branch_to_free =
- resolve_refdup("HEAD", head_sha1, NULL, RESOLVE_REF_READING);
+ resolve_refdup("HEAD", RESOLVE_REF_READING, head_sha1, NULL);
if (!current_branch)
die("No current branch");
if (starts_with(current_branch, "refs/heads/"))
diff --git c/builtin/for-each-ref.c w/builtin/for-each-ref.c
index 090390c..a88d681 100644
--- c/builtin/for-each-ref.c
+++ w/builtin/for-each-ref.c
@@ -649,8 +649,8 @@ static void populate_value(struct refinfo *ref)
if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) {
unsigned char unused1[20];
- ref->symref = resolve_refdup(ref->refname, unused1,
- NULL, RESOLVE_REF_READING);
+ ref->symref = resolve_refdup(ref->refname, RESOLVE_REF_READING,
+ unused1, NULL);
if (!ref->symref)
ref->symref = "";
}
@@ -708,8 +708,8 @@ static void populate_value(struct refinfo *ref)
const char *head;
unsigned char sha1[20];
- head = resolve_ref_unsafe("HEAD", sha1,
- NULL, RESOLVE_REF_READING);
+ head = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
+ sha1, NULL);
if (!strcmp(ref->refname, head))
v->s = "*";
else
@@ -853,8 +853,7 @@ static int grab_single_ref(const char *refname, const unsigned char *sha1, int f
struct refinfo *ref;
int cnt;
- if ((flag & REF_ISBROKEN) &&
- check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
+ if (flag & REF_BAD_NAME) {
warning("ignoring ref with broken name %s", refname);
return 0;
}
diff --git c/builtin/fsck.c w/builtin/fsck.c
index 506e32b..7cd109a 100644
--- c/builtin/fsck.c
+++ w/builtin/fsck.c
@@ -560,7 +560,7 @@ static int fsck_head_link(void)
if (verbose)
fprintf(stderr, "Checking HEAD link\n");
- head_points_at = resolve_ref_unsafe("HEAD", head_sha1, &flag, 0);
+ head_points_at = resolve_ref_unsafe("HEAD", 0, head_sha1, &flag);
if (!head_points_at)
return error("Invalid HEAD");
if (!strcmp(head_points_at, "HEAD"))
diff --git c/builtin/log.c w/builtin/log.c
index 230a9ef..493440a 100644
--- c/builtin/log.c
+++ w/builtin/log.c
@@ -1395,8 +1395,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (check_head) {
unsigned char sha1[20];
const char *ref;
- ref = resolve_ref_unsafe("HEAD", sha1, NULL,
- RESOLVE_REF_READING);
+ ref = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
+ sha1, NULL);
if (ref && starts_with(ref, "refs/heads/"))
branch_name = xstrdup(ref + strlen("refs/heads/"));
else
diff --git c/builtin/merge.c w/builtin/merge.c
index d262279..6f56967 100644
--- c/builtin/merge.c
+++ w/builtin/merge.c
@@ -1108,7 +1108,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* Check if we are _not_ on a detached HEAD, i.e. if there is a
* current branch.
*/
- branch = branch_to_free = resolve_refdup("HEAD", head_sha1, &flag, 0);
+ branch = branch_to_free = resolve_refdup("HEAD", 0, head_sha1, &flag);
if (branch && starts_with(branch, "refs/heads/"))
branch += 11;
if (!branch || is_null_sha1(head_sha1))
diff --git c/builtin/notes.c w/builtin/notes.c
index 16df78c..eaf297d 100644
--- c/builtin/notes.c
+++ w/builtin/notes.c
@@ -703,7 +703,7 @@ static int merge_commit(struct notes_merge_options *o)
init_notes(t, "NOTES_MERGE_PARTIAL", combine_notes_overwrite, 0);
o->local_ref = local_ref_to_free =
- resolve_refdup("NOTES_MERGE_REF", sha1, NULL, 0);
+ resolve_refdup("NOTES_MERGE_REF", 0, sha1, NULL);
if (!o->local_ref)
die("Failed to resolve NOTES_MERGE_REF");
diff --git c/builtin/receive-pack.c w/builtin/receive-pack.c
index 555a4a6..8a6e7e3 100644
--- c/builtin/receive-pack.c
+++ w/builtin/receive-pack.c
@@ -656,7 +656,7 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
int flag;
strbuf_addf(&buf, "%s%s", get_git_namespace(), cmd->ref_name);
- dst_name = resolve_ref_unsafe(buf.buf, sha1, &flag, 0);
+ dst_name = resolve_ref_unsafe(buf.buf, 0, sha1, &flag);
strbuf_release(&buf);
if (!(flag & REF_ISSYMREF))
@@ -817,7 +817,7 @@ static void execute_commands(struct command *commands,
check_aliased_updates(commands);
free(head_name_to_free);
- head_name = head_name_to_free = resolve_refdup("HEAD", sha1, NULL, 0);
+ head_name = head_name_to_free = resolve_refdup("HEAD", 0, sha1, NULL);
checked_connectivity = 1;
for (cmd = commands; cmd; cmd = cmd->next) {
diff --git c/builtin/remote.c w/builtin/remote.c
index 6eaeee7..8517cfa 100644
--- c/builtin/remote.c
+++ w/builtin/remote.c
@@ -568,8 +568,8 @@ static int read_remote_branches(const char *refname,
strbuf_addf(&buf, "refs/remotes/%s/", rename->old);
if (starts_with(refname, buf.buf)) {
item = string_list_append(rename->remote_branches, xstrdup(refname));
- symref = resolve_ref_unsafe(refname, orig_sha1, &flag,
- RESOLVE_REF_READING);
+ symref = resolve_ref_unsafe(refname, RESOLVE_REF_READING,
+ orig_sha1, &flag);
if (flag & REF_ISSYMREF)
item->util = xstrdup(symref);
else
@@ -705,7 +705,7 @@ static int mv(int argc, const char **argv)
int flag = 0;
unsigned char sha1[20];
- read_ref_full(item->string, sha1, &flag, RESOLVE_REF_READING);
+ read_ref_full(item->string, RESOLVE_REF_READING, sha1, &flag);
if (!(flag & REF_ISSYMREF))
continue;
if (delete_ref(item->string, NULL, REF_NODEREF))
@@ -750,13 +750,16 @@ static int mv(int argc, const char **argv)
static int remove_branches(struct string_list *branches)
{
+ struct strbuf err = STRBUF_INIT;
const char **branch_names;
int i, result = 0;
branch_names = xmalloc(branches->nr * sizeof(*branch_names));
for (i = 0; i < branches->nr; i++)
branch_names[i] = branches->items[i].string;
- result |= repack_without_refs(branch_names, branches->nr, NULL);
+ if (repack_without_refs(branch_names, branches->nr, &err))
+ result |= error("%s", err.buf);
+ strbuf_release(&err);
free(branch_names);
for (i = 0; i < branches->nr; i++) {
@@ -1333,9 +1336,13 @@ static int prune_remote(const char *remote, int dry_run)
delete_refs = xmalloc(states.stale.nr * sizeof(*delete_refs));
for (i = 0; i < states.stale.nr; i++)
delete_refs[i] = states.stale.items[i].util;
- if (!dry_run)
- result |= repack_without_refs(delete_refs,
- states.stale.nr, NULL);
+ if (!dry_run) {
+ struct strbuf err = STRBUF_INIT;
+ if (repack_without_refs(delete_refs, states.stale.nr,
+ &err))
+ result |= error("%s", err.buf);
+ strbuf_release(&err);
+ }
free(delete_refs);
}
diff --git c/builtin/show-branch.c w/builtin/show-branch.c
index ef6ea52..acc8dc1 100644
--- c/builtin/show-branch.c
+++ w/builtin/show-branch.c
@@ -727,8 +727,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
if (ac == 0) {
static const char *fake_av[2];
- fake_av[0] = resolve_refdup("HEAD", sha1, NULL,
- RESOLVE_REF_READING);
+ fake_av[0] = resolve_refdup("HEAD",
+ RESOLVE_REF_READING,
+ sha1, NULL);
fake_av[1] = NULL;
av = fake_av;
ac = 1;
@@ -790,8 +791,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
}
}
- head_p = resolve_ref_unsafe("HEAD", head_sha1, NULL,
- RESOLVE_REF_READING);
+ head_p = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
+ head_sha1, NULL);
if (head_p) {
head_len = strlen(head_p);
memcpy(head, head_p, head_len + 1);
diff --git c/builtin/symbolic-ref.c w/builtin/symbolic-ref.c
index 1dd04af..29fb3f1 100644
--- c/builtin/symbolic-ref.c
+++ w/builtin/symbolic-ref.c
@@ -13,7 +13,7 @@ static int check_symref(const char *HEAD, int quiet, int shorten, int print)
{
unsigned char sha1[20];
int flag;
- const char *refname = resolve_ref_unsafe(HEAD, sha1, &flag, 0);
+ const char *refname = resolve_ref_unsafe(HEAD, 0, sha1, &flag);
if (!refname)
die("No such ref: %s", HEAD);
diff --git c/builtin/update-ref.c w/builtin/update-ref.c
index e379fdd..6c9be05 100644
--- c/builtin/update-ref.c
+++ w/builtin/update-ref.c
@@ -419,8 +419,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
if (no_deref)
flags = REF_NODEREF;
if (delete)
- return delete_ref(refname, oldval ? oldsha1 : NULL,
- flags|REF_BADNAMEOK);
+ return delete_ref(refname, oldval ? oldsha1 : NULL, flags);
else
return update_ref(msg, refname, sha1, oldval ? oldsha1 : NULL,
flags, UPDATE_REFS_DIE_ON_ERR);
diff --git c/bundle.c w/bundle.c
index 32dd2f7..d92e49c 100644
--- c/bundle.c
+++ w/bundle.c
@@ -311,7 +311,7 @@ int create_bundle(struct bundle_header *header, const char *path,
continue;
if (dwim_ref(e->name, strlen(e->name), sha1, &ref) != 1)
continue;
- if (read_ref_full(e->name, sha1, &flag, RESOLVE_REF_READING))
+ if (read_ref_full(e->name, RESOLVE_REF_READING, sha1, &flag))
flag = 0;
display_ref = (flag & REF_ISSYMREF) ? e->name : ref;
diff --git c/cache.h w/cache.h
index 995729f..f582b6c 100644
--- c/cache.h
+++ w/cache.h
@@ -946,8 +946,8 @@ extern int for_each_abbrev(const char *prefix, each_abbrev_fn, void *);
extern int get_sha1_hex(const char *hex, unsigned char *sha1);
extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */
-extern int read_ref_full(const char *refname, unsigned char *sha1,
- int *flags, int resolve_flags);
+extern int read_ref_full(const char *refname, int resolve_flags,
+ unsigned char *sha1, int *flags);
extern int read_ref(const char *refname, unsigned char *sha1);
/*
@@ -969,27 +969,36 @@ extern int read_ref(const char *refname, unsigned char *sha1);
* "writing" to the ref, the return value is the name of the ref
* that will actually be created or changed.
*
+ * If the RESOLVE_REF_NO_RECURSE flag is passed, only resolves one
+ * level of symbolic reference. The value stored in sha1 for a symbolic
+ * reference will always be null_sha1 in this case, and the return
+ * value is the reference that the symref refers to directly.
+ *
* If flags is non-NULL, set the value that it points to the
* combination of REF_ISPACKED (if the reference was found among the
* packed references), REF_ISSYMREF (if the initial reference was a
- * symbolic reference) and REF_ISBROKEN (if the ref is malformed).
+ * symbolic reference), REF_BAD_NAME (if the reference name is ill
+ * formed --- see RESOLVE_REF_ALLOW_BAD_NAME below), and REF_ISBROKEN
+ * (if the ref is malformed).
*
* If ref is not a properly-formatted, normalized reference, return
* NULL. If more than MAXDEPTH recursive symbolic lookups are needed,
* give up and return NULL.
*
- * RESOLVE_REF_ALLOW_BAD_NAME disables most of the ref name checking except
- * for names that are absolute paths or contain ".." components. For both
- * these cases the function will return NULL and set errno to EINVAL.
- * If the name is bad then the function will set the REF_ISBROKEN flag and
- * return the name, if the ref exists, or NULL, if it does not.
- * When this flag is set, any badly named refs will resolve to nullsha1.
+ * RESOLVE_REF_ALLOW_BAD_NAME allows resolving refs even when their
+ * name is invalid according to git-check-ref-format(1). If the name
+ * is bad then the value stored in sha1 will be null_sha1 and the
+ * REF_ISBROKEN and REF_BAD_NAME flags will be set.
+ *
+ * Even with RESOLVE_REF_ALLOW_BAD_NAME, names that escape the refs/
+ * directory and do not consist of all caps and underscores cannot be
+ * resolved. The function returns NULL for such ref names.
*/
#define RESOLVE_REF_READING 0x01
-#define RESOLVE_REF_NODEREF 0x02
+#define RESOLVE_REF_NO_RECURSE 0x02
#define RESOLVE_REF_ALLOW_BAD_NAME 0x04
-extern const char *resolve_ref_unsafe(const char *ref, unsigned char *sha1, int *flags, int resolve_flags);
-extern char *resolve_refdup(const char *ref, unsigned char *sha1, int *flags, int resolve_flags);
+extern const char *resolve_ref_unsafe(const char *ref, int resolve_flags, unsigned char *sha1, int *flags);
+extern char *resolve_refdup(const char *ref, int resolve_flags, unsigned char *sha1, int *flags);
extern int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref);
extern int dwim_log(const char *str, int len, unsigned char *sha1, char **ref);
diff --git c/http-backend.c w/http-backend.c
index 8f94f9b..e172886 100644
--- c/http-backend.c
+++ w/http-backend.c
@@ -417,8 +417,9 @@ static int show_head_ref(const char *refname, const unsigned char *sha1,
if (flag & REF_ISSYMREF) {
unsigned char unused[20];
- const char *target = resolve_ref_unsafe(refname, unused,
- NULL, RESOLVE_REF_READING);
+ const char *target = resolve_ref_unsafe(refname,
+ RESOLVE_REF_READING,
+ unused, NULL);
const char *target_nons = strip_namespace(target);
strbuf_addf(buf, "ref: %s\n", target_nons);
diff --git c/notes-merge.c w/notes-merge.c
index ffca602..3c88d17 100644
--- c/notes-merge.c
+++ w/notes-merge.c
@@ -549,7 +549,7 @@ int notes_merge(struct notes_merge_options *o,
o->local_ref, o->remote_ref);
/* Dereference o->local_ref into local_sha1 */
- if (read_ref_full(o->local_ref, local_sha1, NULL, 0))
+ if (read_ref_full(o->local_ref, 0, local_sha1, NULL))
die("Failed to resolve local notes ref '%s'", o->local_ref);
else if (!check_refname_format(o->local_ref, 0) &&
is_null_sha1(local_sha1))
diff --git c/reflog-walk.c w/reflog-walk.c
index feeaf0a..23345ea 100644
--- c/reflog-walk.c
+++ w/reflog-walk.c
@@ -48,8 +48,8 @@ static struct complete_reflogs *read_complete_reflog(const char *ref)
unsigned char sha1[20];
const char *name;
void *name_to_free;
- name = name_to_free = resolve_refdup(ref, sha1, NULL,
- RESOLVE_REF_READING);
+ name = name_to_free = resolve_refdup(ref, RESOLVE_REF_READING,
+ sha1, NULL);
if (name) {
for_each_reflog_ent(name, read_one_reflog, reflogs);
free(name_to_free);
@@ -175,7 +175,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
if (*branch == '\0') {
unsigned char sha1[20];
free(branch);
- branch = resolve_refdup("HEAD", sha1, NULL, 0);
+ branch = resolve_refdup("HEAD", 0, sha1, NULL);
if (!branch)
die ("No current branch");
diff --git c/refs.c w/refs.c
index 3b27758..d9d327d 100644
--- c/refs.c
+++ w/refs.c
@@ -69,16 +69,8 @@ static int check_refname_component(const char *refname, int flags)
out:
if (cp == refname)
return 0; /* Component has zero length. */
- if (refname[0] == '.') {
- if (!(flags & REFNAME_DOT_COMPONENT))
- return -1; /* Component starts with '.'. */
- /*
- * Even if leading dots are allowed, don't allow "."
- * as a component (".." is prevented by a rule above).
- */
- if (refname[1] == '\0')
- return -1; /* Component equals ".". */
- }
+ if (refname[0] == '.')
+ return -1; /* Component starts with '.'. */
if (cp - refname >= 5 && !memcmp(cp - 5, ".lock", 5))
return -1; /* Refname ends with ".lock". */
return cp - refname;
@@ -193,8 +185,8 @@ struct ref_dir {
/*
* Bit values for ref_entry::flag. REF_ISSYMREF=0x01,
- * REF_ISPACKED=0x02, and REF_ISBROKEN=0x04 are public values; see
- * refs.h.
+ * REF_ISPACKED=0x02, REF_ISBROKEN=0x04 and REF_BAD_NAME=0x08 are
+ * public values; see refs.h.
*/
/*
@@ -202,16 +194,16 @@ struct ref_dir {
* the correct peeled value for the reference, which might be
* null_sha1 if the reference is not a tag or if it is broken.
*/
-#define REF_KNOWS_PEELED 0x08
+#define REF_KNOWS_PEELED 0x10
/* ref_entry represents a directory of references */
-#define REF_DIR 0x10
+#define REF_DIR 0x20
/*
* Entry has not yet been read from disk (used only for REF_DIR
* entries representing loose references)
*/
-#define REF_INCOMPLETE 0x20
+#define REF_INCOMPLETE 0x40
/*
* A ref_entry represents either a reference or a "subdirectory" of
@@ -280,6 +272,37 @@ static struct ref_dir *get_ref_dir(struct ref_entry *entry)
return dir;
}
+static int escapes_cwd(const char *path) {
+ char *buf;
+ int result;
+
+ if (is_absolute_path(path))
+ return 1;
+ buf = xmalloc(strlen(path) + 1);
+ result = !!normalize_path_copy(buf, path);
+ free(buf);
+ return result;
+}
+
+/*
+ * Check if a refname is safe.
+ * For refs that start with "refs/" we consider it safe as long as the rest
+ * of the path components does not allow it to escape from this directory.
+ * For all other refs we only consider them safe iff they only contain
+ * upper case characters and '_'.
+ */
+static int refname_is_safe(const char *refname)
+{
+ if (starts_with(refname, "refs/"))
+ return !escapes_cwd(refname + strlen("refs/"));
+ while (*refname) {
+ if (!isupper(*refname) && *refname != '_')
+ return 0;
+ refname++;
+ }
+ return 1;
+}
+
static struct ref_entry *create_ref_entry(const char *refname,
const unsigned char *sha1, int flag,
int check_name)
@@ -288,8 +311,10 @@ static struct ref_entry *create_ref_entry(const char *refname,
struct ref_entry *ref;
if (check_name &&
- check_refname_format(refname, REFNAME_ALLOW_ONELEVEL|REFNAME_DOT_COMPONENT))
+ check_refname_format(refname, REFNAME_ALLOW_ONELEVEL))
die("Reference has invalid format: '%s'", refname);
+ if (!check_name && !refname_is_safe(refname))
+ die("Reference has invalid name: '%s'", refname);
len = strlen(refname) + 1;
ref = xmalloc(sizeof(struct ref_entry) + len);
hashcpy(ref->u.value.sha1, sha1);
@@ -822,10 +847,9 @@ static int name_conflict_fn(struct ref_entry *entry, void *cb_data)
/*
* Return true iff a reference named refname could be created without
* conflicting with the name of an existing reference in dir. If
- * oldrefname is non-NULL, ignore potential conflicts with oldrefname
- * (e.g., because oldrefname is scheduled for deletion in the same
- * operation). skiplist contains a list of refs we want to skip checking for
- * conflicts with. skiplist must be sorted.
+ * skiplist is non-NULL, ignore potential conflicts with names in
+ * skiplist (e.g., because those refs are scheduled for deletion in
+ * the same operation). skiplist must be sorted.
*/
static int is_refname_available(const char *refname,
struct ref_dir *dir,
@@ -1062,9 +1086,9 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir)
if (refname) {
int flag = REF_ISPACKED;
- if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL|REFNAME_DOT_COMPONENT)) {
- flag |= REF_ISBROKEN;
+ if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
hashclr(sha1);
+ flag |= REF_BAD_NAME | REF_ISBROKEN;
}
last = create_ref_entry(refname, sha1, flag, 0);
if (peeled == PEELED_FULLY ||
@@ -1198,16 +1222,16 @@ static void read_loose_refs(const char *dirname, struct ref_dir *dir)
hashclr(sha1);
flag |= REF_ISBROKEN;
}
- } else if (read_ref_full(refname.buf, sha1, &flag,
- RESOLVE_REF_READING)) {
+ } else if (read_ref_full(refname.buf,
+ RESOLVE_REF_READING,
+ sha1, &flag)) {
hashclr(sha1);
flag |= REF_ISBROKEN;
}
if (check_refname_format(refname.buf,
- REFNAME_ALLOW_ONELEVEL|
- REFNAME_DOT_COMPONENT)) {
+ REFNAME_ALLOW_ONELEVEL)) {
hashclr(sha1);
- flag |= REF_ISBROKEN;
+ flag |= REF_BAD_NAME | REF_ISBROKEN;
}
add_entry_to_dir(dir,
create_ref_entry(refname.buf, sha1, flag, 0));
@@ -1329,10 +1353,10 @@ static struct ref_entry *get_packed_ref(const char *refname)
* A loose ref file doesn't exist; check for a packed ref. The
* options are forwarded from resolve_safe_unsafe().
*/
-static const char *handle_missing_loose_ref(const char *refname,
- unsigned char *sha1,
- int reading,
- int *flag)
+static int resolve_missing_loose_ref(const char *refname,
+ int resolve_flags,
+ unsigned char *sha1,
+ int *flags)
{
struct ref_entry *entry;
@@ -1343,33 +1367,22 @@ static const char *handle_missing_loose_ref(const char *refname,
entry = get_packed_ref(refname);
if (entry) {
hashcpy(sha1, entry->u.value.sha1);
- if (flag)
- *flag |= REF_ISPACKED;
- return refname;
+ if (flags)
+ *flags |= REF_ISPACKED;
+ return 0;
}
/* The reference is not a packed reference, either. */
- if (reading) {
- return NULL;
+ if (resolve_flags & RESOLVE_REF_READING) {
+ errno = ENOENT;
+ return -1;
} else {
hashclr(sha1);
- return refname;
+ return 0;
}
}
-static int escapes_cwd(const char *path) {
- char *buf;
- int result;
-
- if (is_absolute_path(path))
- return 1;
- buf = xmalloc(strlen(path) + 1);
- result = normalize_path_copy(buf, path);
- free(buf);
- return result;
-}
-
/* This function needs to return a meaningful errno on failure */
-const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int *flags, int resolve_flags)
+const char *resolve_ref_unsafe(const char *refname, int resolve_flags, unsigned char *sha1, int *flags)
{
int depth = MAXDEPTH;
ssize_t len;
@@ -1381,14 +1394,22 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int *fl
*flags = 0;
if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
+ if (flags)
+ *flags |= REF_BAD_NAME;
+
if (!(resolve_flags & RESOLVE_REF_ALLOW_BAD_NAME) ||
- escapes_cwd(refname)) {
+ !refname_is_safe(refname)) {
errno = EINVAL;
return NULL;
}
- hashclr(sha1);
- if (flags)
- *flags |= REF_ISBROKEN;
+ /*
+ * dwim_ref() uses REF_ISBROKEN to distinguish between
+ * missing refs and refs that were present but invalid,
+ * to complain about the latter to stderr.
+ *
+ * We don't know whether the ref exists, so don't set
+ * REF_ISBROKEN yet.
+ */
bad_name = 1;
}
for (;;) {
@@ -1415,12 +1436,17 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int *fl
*/
stat_ref:
if (lstat(path, &st) < 0) {
- if (errno == ENOENT)
- return handle_missing_loose_ref(refname, sha1,
- resolve_flags & RESOLVE_REF_READING,
- flags);
- else
+ if (errno != ENOENT)
return NULL;
+ if (resolve_missing_loose_ref(refname, resolve_flags,
+ sha1, flags))
+ return NULL;
+ if (bad_name) {
+ hashclr(sha1);
+ if (flags)
+ *flags |= REF_ISBROKEN;
+ }
+ return refname;
}
/* Follow "normalized" - ie "refs/.." symlinks by hand */
@@ -1440,7 +1466,7 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int *fl
refname = refname_buffer;
if (flags)
*flags |= REF_ISSYMREF;
- if (resolve_flags & RESOLVE_REF_NODEREF) {
+ if (resolve_flags & RESOLVE_REF_NO_RECURSE) {
hashclr(sha1);
return refname;
}
@@ -1493,8 +1519,11 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int *fl
errno = EINVAL;
return NULL;
}
- if (bad_name)
+ if (bad_name) {
hashclr(sha1);
+ if (flags)
+ *flags |= REF_ISBROKEN;
+ }
return refname;
}
if (flags)
@@ -1502,23 +1531,28 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int *fl
buf = buffer + 4;
while (isspace(*buf))
buf++;
- if (check_refname_format(buf, REFNAME_ALLOW_ONELEVEL)) {
- if (flags)
- *flags |= REF_ISBROKEN;
- errno = EINVAL;
- return NULL;
- }
refname = strcpy(refname_buffer, buf);
- if (resolve_flags & RESOLVE_REF_NODEREF) {
+ if (resolve_flags & RESOLVE_REF_NO_RECURSE) {
hashclr(sha1);
return refname;
}
+ if (check_refname_format(buf, REFNAME_ALLOW_ONELEVEL)) {
+ if (flags)
+ *flags |= REF_BAD_NAME | REF_ISBROKEN;
+
+ if (!(resolve_flags & RESOLVE_REF_ALLOW_BAD_NAME) ||
+ !refname_is_safe(buf)) {
+ errno = EINVAL;
+ return NULL;
+ }
+ bad_name = 1;
+ }
}
}
-char *resolve_refdup(const char *ref, unsigned char *sha1, int *flags, int resolve_flags)
+char *resolve_refdup(const char *ref, int resolve_flags, unsigned char *sha1, int *flags)
{
- const char *ret = resolve_ref_unsafe(ref, sha1, flags, resolve_flags);
+ const char *ret = resolve_ref_unsafe(ref, resolve_flags, sha1, flags);
return ret ? xstrdup(ret) : NULL;
}
@@ -1529,22 +1563,22 @@ struct ref_filter {
void *cb_data;
};
-int read_ref_full(const char *refname, unsigned char *sha1, int *flags, int resolve_flags)
+int read_ref_full(const char *refname, int resolve_flags, unsigned char *sha1, int *flags)
{
- if (resolve_ref_unsafe(refname, sha1, flags, resolve_flags))
+ if (resolve_ref_unsafe(refname, resolve_flags, sha1, flags))
return 0;
return -1;
}
int read_ref(const char *refname, unsigned char *sha1)
{
- return read_ref_full(refname, sha1, NULL, RESOLVE_REF_READING);
+ return read_ref_full(refname, RESOLVE_REF_READING, sha1, NULL);
}
int ref_exists(const char *refname)
{
unsigned char sha1[20];
- return !!resolve_ref_unsafe(refname, sha1, NULL, RESOLVE_REF_READING);
+ return !!resolve_ref_unsafe(refname, RESOLVE_REF_READING, sha1, NULL);
}
static int filter_refs(const char *refname, const unsigned char *sha1, int flags,
@@ -1658,7 +1692,7 @@ int peel_ref(const char *refname, unsigned char *sha1)
return 0;
}
- if (read_ref_full(refname, base, &flag, RESOLVE_REF_READING))
+ if (read_ref_full(refname, RESOLVE_REF_READING, base, &flag))
return -1;
/*
@@ -1699,7 +1733,7 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha
if (!(flags & REF_ISSYMREF))
return 0;
- resolves_to = resolve_ref_unsafe(refname, junk, NULL, 0);
+ resolves_to = resolve_ref_unsafe(refname, 0, junk, NULL);
if (!resolves_to
|| (d->refname
? strcmp(resolves_to, d->refname)
@@ -1824,7 +1858,7 @@ static int do_head_ref(const char *submodule, each_ref_fn fn, void *cb_data)
return 0;
}
- if (!read_ref_full("HEAD", sha1, &flag, RESOLVE_REF_READING))
+ if (!read_ref_full("HEAD", RESOLVE_REF_READING, sha1, &flag))
return fn("HEAD", sha1, flag, cb_data);
return 0;
@@ -1904,7 +1938,7 @@ int head_ref_namespaced(each_ref_fn fn, void *cb_data)
int flag;
strbuf_addf(&buf, "%sHEAD", get_git_namespace());
- if (!read_ref_full(buf.buf, sha1, &flag, RESOLVE_REF_READING))
+ if (!read_ref_full(buf.buf, RESOLVE_REF_READING, sha1, &flag))
ret = fn(buf.buf, sha1, flag, cb_data);
strbuf_release(&buf);
@@ -1999,8 +2033,9 @@ int refname_match(const char *abbrev_name, const char *full_name)
static struct ref_lock *verify_lock(struct ref_lock *lock,
const unsigned char *old_sha1, int mustexist)
{
- if (read_ref_full(lock->ref_name, lock->old_sha1, NULL,
- mustexist ? RESOLVE_REF_READING : 0)) {
+ if (read_ref_full(lock->ref_name,
+ mustexist ? RESOLVE_REF_READING : 0,
+ lock->old_sha1, NULL)) {
int save_errno = errno;
error("Can't verify ref %s", lock->ref_name);
unlock_ref(lock);
@@ -2073,8 +2108,8 @@ int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref)
this_result = refs_found ? sha1_from_ref : sha1;
mksnpath(fullref, sizeof(fullref), *p, len, str);
- r = resolve_ref_unsafe(fullref, this_result, &flag,
- RESOLVE_REF_READING);
+ r = resolve_ref_unsafe(fullref, RESOLVE_REF_READING,
+ this_result, &flag);
if (r) {
if (!refs_found++)
*ref = xstrdup(r);
@@ -2103,7 +2138,8 @@ int dwim_log(const char *str, int len, unsigned char *sha1, char **log)
const char *ref, *it;
mksnpath(path, sizeof(path), *p, len, str);
- ref = resolve_ref_unsafe(path, hash, NULL, RESOLVE_REF_READING);
+ ref = resolve_ref_unsafe(path, RESOLVE_REF_READING,
+ hash, NULL);
if (!ref)
continue;
if (reflog_exists(path))
@@ -2145,16 +2181,16 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
lock = xcalloc(1, sizeof(struct ref_lock));
lock->lock_fd = -1;
- if (flags & REF_BADNAMEOK)
- resolve_flags |= RESOLVE_REF_ALLOW_BAD_NAME;
-
if (mustexist)
resolve_flags |= RESOLVE_REF_READING;
- if (flags & REF_NODEREF)
- resolve_flags |= RESOLVE_REF_NODEREF;
+ if (flags & REF_DELETING) {
+ resolve_flags |= RESOLVE_REF_ALLOW_BAD_NAME;
+ if (flags & REF_NODEREF)
+ resolve_flags |= RESOLVE_REF_NO_RECURSE;
+ }
- refname = resolve_ref_unsafe(refname, lock->old_sha1, &type,
- resolve_flags);
+ refname = resolve_ref_unsafe(refname, resolve_flags,
+ lock->old_sha1, &type);
if (!refname && errno == EISDIR) {
/* we are trying to lock foo but we used to
* have foo/bar which now does not exist;
@@ -2167,8 +2203,8 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
error("there are still refs under '%s'", orig_refname);
goto error_return;
}
- refname = resolve_ref_unsafe(orig_refname, lock->old_sha1,
- &type, resolve_flags);
+ refname = resolve_ref_unsafe(orig_refname, resolve_flags,
+ lock->old_sha1, &type);
}
if (type_p)
*type_p = type;
@@ -2521,7 +2557,7 @@ static int curate_packed_ref_fn(struct ref_entry *entry, void *cb_data)
unsigned char sha1[20];
int flags;
- if (read_ref_full(entry->name, sha1, &flags, 0))
+ if (read_ref_full(entry->name, 0, sha1, &flags))
/* We should at least have found the packed ref. */
die("Internal error");
if ((flags & REF_ISSYMREF) || !(flags & REF_ISPACKED)) {
@@ -2712,8 +2748,8 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
if (log && S_ISLNK(loginfo.st_mode))
return error("reflog for %s is a symlink", oldrefname);
- symref = resolve_ref_unsafe(oldrefname, orig_sha1, &flag,
- RESOLVE_REF_READING);
+ symref = resolve_ref_unsafe(oldrefname, RESOLVE_REF_READING,
+ orig_sha1, &flag);
if (flag & REF_ISSYMREF)
return error("refname %s is a symbolic ref, renaming it is not supported",
oldrefname);
@@ -2742,7 +2778,7 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
goto rollback;
}
- if (!read_ref_full(newrefname, sha1, NULL, RESOLVE_REF_READING) &&
+ if (!read_ref_full(newrefname, RESOLVE_REF_READING, sha1, NULL) &&
delete_ref(newrefname, sha1, REF_NODEREF)) {
if (errno==EISDIR) {
if (remove_empty_directories(git_path("%s", newrefname))) {
@@ -2956,7 +2992,7 @@ static int is_branch(const char *refname)
}
/*
- * Writes sha1 into the ref specified by the lock. Makes sure that errno
+ * Write sha1 into the ref specified by the lock. Make sure that errno
* is sane on error.
*/
static int write_ref_sha1(struct ref_lock *lock,
@@ -3020,8 +3056,8 @@ static int write_ref_sha1(struct ref_lock *lock,
unsigned char head_sha1[20];
int head_flag;
const char *head_ref;
- head_ref = resolve_ref_unsafe("HEAD", head_sha1, &head_flag,
- RESOLVE_REF_READING);
+ head_ref = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
+ head_sha1, &head_flag);
if (head_ref && (head_flag & REF_ISSYMREF) &&
!strcmp(head_ref, lock->ref_name))
log_ref_write("HEAD", lock->old_sha1, sha1, logmsg);
@@ -3388,7 +3424,7 @@ static int do_for_each_reflog(struct strbuf *name, each_ref_fn fn, void *cb_data
retval = do_for_each_reflog(name, fn, cb_data);
} else {
unsigned char sha1[20];
- if (read_ref_full(name->buf, sha1, NULL, 0))
+ if (read_ref_full(name->buf, 0, sha1, NULL))
retval = error("bad ref for %s", name->buf);
else
retval = fn(name->buf, sha1, 0, cb_data);
@@ -3667,27 +3703,30 @@ int ref_transaction_commit(struct ref_transaction *transaction,
/* Copy, sort, and reject duplicate refs */
qsort(updates, n, sizeof(*updates), ref_update_compare);
if (ref_update_reject_duplicates(updates, n, err)) {
- ret = -1;
+ ret = TRANSACTION_GENERIC_ERROR;
goto cleanup;
}
/* Acquire all locks while verifying old values */
for (i = 0; i < n; i++) {
struct ref_update *update = updates[i];
+ int flags = update->flags;
+ if (is_null_sha1(update->new_sha1))
+ flags |= REF_DELETING;
update->lock = lock_ref_sha1_basic(update->refname,
(update->have_old ?
update->old_sha1 :
NULL),
NULL,
- update->flags,
+ flags,
&update->type);
if (!update->lock) {
- int df_conflict = (errno == ENOTDIR);
-
+ ret = (errno == ENOTDIR)
+ ? TRANSACTION_NAME_CONFLICT
+ : TRANSACTION_GENERIC_ERROR;
strbuf_addf(err, "Cannot lock the ref '%s'.",
update->refname);
- ret = df_conflict ? UPDATE_REFS_NAME_CONFLICT : -1;
goto cleanup;
}
}
@@ -3697,15 +3736,15 @@ int ref_transaction_commit(struct ref_transaction *transaction,
struct ref_update *update = updates[i];
if (!is_null_sha1(update->new_sha1)) {
- ret = write_ref_sha1(update->lock, update->new_sha1,
- update->msg);
- update->lock = NULL; /* freed by write_ref_sha1 */
- if (ret) {
+ if (write_ref_sha1(update->lock, update->new_sha1,
+ update->msg)) {
+ update->lock = NULL; /* freed by write_ref_sha1 */
strbuf_addf(err, "Cannot update the ref '%s'.",
update->refname);
- ret = -1;
+ ret = TRANSACTION_GENERIC_ERROR;
goto cleanup;
}
+ update->lock = NULL; /* freed by write_ref_sha1 */
}
}
@@ -3715,7 +3754,7 @@ int ref_transaction_commit(struct ref_transaction *transaction,
if (update->lock) {
if (delete_ref_loose(update->lock, update->type, err)) {
- ret = -1;
+ ret = TRANSACTION_GENERIC_ERROR;
goto cleanup;
}
@@ -3725,7 +3764,7 @@ int ref_transaction_commit(struct ref_transaction *transaction,
}
if (repack_without_refs(delnames, delnum, err)) {
- ret = -1;
+ ret = TRANSACTION_GENERIC_ERROR;
goto cleanup;
}
for (i = 0; i < delnum; i++)
diff --git c/refs.h w/refs.h
index a96e174..3b35387 100644
--- c/refs.h
+++ w/refs.h
@@ -56,11 +56,15 @@ struct ref_transaction;
/*
* Reference cannot be resolved to an object name: dangling symbolic
- * reference (directly or indirectly), corrupt reference file, or
- * symbolic reference refers to ill-formatted reference name.
+ * reference (directly or indirectly), corrupt reference file,
+ * reference exists but name is bad, or symbolic reference refers to
+ * ill-formatted reference name.
*/
#define REF_ISBROKEN 0x04
+/* Reference name is not well formed (see git-check-ref-format(1)). */
+#define REF_BAD_NAME 0x08
+
/*
* The signature for the callback function for the for_each_*()
* functions below. The memory pointed to by the refname and sha1
@@ -175,12 +179,12 @@ extern int peel_ref(const char *refname, unsigned char *sha1);
* ref_transaction_create(), etc.
* REF_NODEREF: act on the ref directly, instead of dereferencing
* symbolic references.
- * REF_BADNAMEOK: allow locking a ref that has a bad name.
+ * REF_DELETING: tolerate broken refs
*
* Flags >= 0x100 are reserved for internal use.
*/
#define REF_NODEREF 0x01
-#define REF_BADNAMEOK 0x02
+#define REF_DELETING 0x02
/*
* This function sets errno to something meaningful on failure.
*/
@@ -226,7 +230,6 @@ extern int for_each_reflog(each_ref_fn, void *);
#define REFNAME_ALLOW_ONELEVEL 1
#define REFNAME_REFSPEC_PATTERN 2
-#define REFNAME_DOT_COMPONENT 4
/*
* Return 0 iff refname has the correct format for a refname according
@@ -234,10 +237,7 @@ extern int for_each_reflog(each_ref_fn, void *);
* If REFNAME_ALLOW_ONELEVEL is set in flags, then accept one-level
* reference names. If REFNAME_REFSPEC_PATTERN is set in flags, then
* allow a "*" wildcard character in place of one of the name
- * components. No leading or repeated slashes are accepted. If
- * REFNAME_DOT_COMPONENT is set in flags, then allow refname
- * components to start with "." (but not a whole component equal to
- * "." or "..").
+ * components. No leading or repeated slashes are accepted.
*/
extern int check_refname_format(const char *refname, int flags);
@@ -270,8 +270,8 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);
* The following functions add a reference check or update to a
* ref_transaction. In all of them, refname is the name of the
* reference to be affected. The functions make internal copies of
- * refname, so the caller retains ownership of the parameter. flags
- * can be REF_NODEREF; it is passed to update_ref_lock().
+ * refname and msg, so the caller retains ownership of these parameters.
+ * flags can be REF_NODEREF; it is passed to update_ref_lock().
*/
/*
@@ -322,14 +322,14 @@ int ref_transaction_delete(struct ref_transaction *transaction,
/*
* Commit all of the changes that have been queued in transaction, as
- * atomically as possible. Return a nonzero value if there is a
- * problem.
+ * atomically as possible.
*
- * Function returns 0 on success, -1 for generic failures and
- * UPDATE_REFS_NAME_CONFLICT (-2) if the failure was due to a naming conflict.
- * For example, the ref names A and A/B conflict.
+ * Returns 0 for success, or one of the below error codes for errors.
*/
-#define UPDATE_REFS_NAME_CONFLICT -2
+/* Naming conflict (for example, the ref names A and A/B conflict). */
+#define TRANSACTION_NAME_CONFLICT -1
+/* All other errors. */
+#define TRANSACTION_GENERIC_ERROR -2
int ref_transaction_commit(struct ref_transaction *transaction,
struct strbuf *err);
diff --git c/remote.c w/remote.c
index 67c375d..25b07ac 100644
--- c/remote.c
+++ w/remote.c
@@ -486,7 +486,7 @@ static void read_config(void)
return;
default_remote_name = "origin";
current_branch = NULL;
- head_ref = resolve_ref_unsafe("HEAD", sha1, &flag, 0);
+ head_ref = resolve_ref_unsafe("HEAD", 0, sha1, &flag);
if (head_ref && (flag & REF_ISSYMREF) &&
starts_with(head_ref, "refs/heads/")) {
current_branch =
@@ -1121,8 +1121,8 @@ static char *guess_ref(const char *name, struct ref *peer)
struct strbuf buf = STRBUF_INIT;
unsigned char sha1[20];
- const char *r = resolve_ref_unsafe(peer->name, sha1, NULL,
- RESOLVE_REF_READING);
+ const char *r = resolve_ref_unsafe(peer->name, RESOLVE_REF_READING,
+ sha1, NULL);
if (!r)
return NULL;
@@ -1183,8 +1183,9 @@ static int match_explicit(struct ref *src, struct ref *dst,
unsigned char sha1[20];
int flag;
- dst_value = resolve_ref_unsafe(matched_src->name, sha1, &flag,
- RESOLVE_REF_READING);
+ dst_value = resolve_ref_unsafe(matched_src->name,
+ RESOLVE_REF_READING,
+ sha1, &flag);
if (!dst_value ||
((flag & REF_ISSYMREF) &&
!starts_with(dst_value, "refs/heads/")))
@@ -1658,7 +1659,7 @@ static int ignore_symref_update(const char *refname)
unsigned char sha1[20];
int flag;
- if (!resolve_ref_unsafe(refname, sha1, &flag, 0))
+ if (!resolve_ref_unsafe(refname, 0, sha1, &flag))
return 0; /* non-existing refs are OK */
return (flag & REF_ISSYMREF);
}
diff --git c/sequencer.c w/sequencer.c
index 6a05ad4..70fb7a8 100644
--- c/sequencer.c
+++ w/sequencer.c
@@ -366,7 +366,7 @@ static int is_index_unchanged(void)
unsigned char head_sha1[20];
struct commit *head_commit;
- if (!resolve_ref_unsafe("HEAD", head_sha1, NULL, RESOLVE_REF_READING))
+ if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_sha1, NULL))
return error(_("Could not resolve HEAD commit\n"));
head_commit = lookup_commit(head_sha1);
@@ -912,7 +912,7 @@ static int rollback_single_pick(void)
if (!file_exists(git_path("CHERRY_PICK_HEAD")) &&
!file_exists(git_path("REVERT_HEAD")))
return error(_("no cherry-pick or revert in progress"));
- if (read_ref_full("HEAD", head_sha1, NULL, 0))
+ if (read_ref_full("HEAD", 0, head_sha1, NULL))
return error(_("cannot resolve HEAD"));
if (is_null_sha1(head_sha1))
return error(_("cannot abort from a branch yet to be born"));
diff --git c/t/t1400-update-ref.sh w/t/t1400-update-ref.sh
index ff4607b..7b4707b 100755
--- c/t/t1400-update-ref.sh
+++ w/t/t1400-update-ref.sh
@@ -126,6 +126,16 @@ test_expect_success 'update-ref --no-deref -d can delete self-reference' '
test_path_is_missing .git/refs/heads/self
'
+test_expect_success 'update-ref --no-deref -d can delete reference to bad ref' '
+ >.git/refs/heads/bad &&
+ test_when_finished "rm -f .git/refs/heads/bad" &&
+ git symbolic-ref refs/heads/ref-to-bad refs/heads/bad &&
+ test_when_finished "rm -f .git/refs/heads/ref-to-bad" &&
+ test_path_is_file .git/refs/heads/ref-to-bad &&
+ git update-ref --no-deref -d refs/heads/ref-to-bad &&
+ test_path_is_missing .git/refs/heads/ref-to-bad
+'
+
test_expect_success '(not) create HEAD with old sha1' "
test_must_fail git update-ref HEAD $A $B
"
@@ -390,12 +400,6 @@ test_expect_success 'stdin fails create with no ref' '
grep "fatal: create: missing <ref>" err
'
-test_expect_success 'stdin fails create with bad ref name' '
- echo "create ~a $m" >stdin &&
- test_must_fail git update-ref --stdin <stdin 2>err &&
- grep "fatal: invalid ref format: ~a" err
-'
-
test_expect_success 'stdin fails create with no new value' '
echo "create $a" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
@@ -414,12 +418,6 @@ test_expect_success 'stdin fails update with no ref' '
grep "fatal: update: missing <ref>" err
'
-test_expect_success 'stdin fails update with bad ref name' '
- echo "update ~a $m" >stdin &&
- test_must_fail git update-ref --stdin <stdin 2>err &&
- grep "fatal: invalid ref format: ~a" err
-'
-
test_expect_success 'stdin fails update with no new value' '
echo "update $a" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
@@ -438,12 +436,6 @@ test_expect_success 'stdin fails delete with no ref' '
grep "fatal: delete: missing <ref>" err
'
-test_expect_success 'stdin fails delete with bad ref name' '
- echo "delete ~a $m" >stdin &&
- test_must_fail git update-ref --stdin <stdin 2>err &&
- grep "fatal: invalid ref format: ~a" err
-'
-
test_expect_success 'stdin fails delete with too many arguments' '
echo "delete $a $m $m" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
@@ -716,12 +708,6 @@ test_expect_success 'stdin -z fails create with no ref' '
grep "fatal: create: missing <ref>" err
'
-test_expect_success 'stdin -z fails create with bad ref name' '
- printf $F "create ~a " "$m" >stdin &&
- test_must_fail git update-ref -z --stdin <stdin 2>err &&
- grep "fatal: invalid ref format: ~a " err
-'
-
test_expect_success 'stdin -z fails create with no new value' '
printf $F "create $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
@@ -746,12 +732,6 @@ test_expect_success 'stdin -z fails update with too few args' '
grep "fatal: update $a: unexpected end of input when reading <oldvalue>" err
'
-test_expect_success 'stdin -z fails update with bad ref name' '
- printf $F "update ~a" "$m" "" >stdin &&
- test_must_fail git update-ref -z --stdin <stdin 2>err &&
- grep "fatal: invalid ref format: ~a" err
-'
-
test_expect_success 'stdin -z emits warning with empty new value' '
git update-ref $a $m &&
printf $F "update $a" "" "" >stdin &&
@@ -784,12 +764,6 @@ test_expect_success 'stdin -z fails delete with no ref' '
grep "fatal: delete: missing <ref>" err
'
-test_expect_success 'stdin -z fails delete with bad ref name' '
- printf $F "delete ~a" "$m" >stdin &&
- test_must_fail git update-ref -z --stdin <stdin 2>err &&
- grep "fatal: invalid ref format: ~a" err
-'
-
test_expect_success 'stdin -z fails delete with no old value' '
printf $F "delete $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
diff --git c/t/t1402-check-ref-format.sh w/t/t1402-check-ref-format.sh
index 058fa37..1a5a5f3 100755
--- c/t/t1402-check-ref-format.sh
+++ w/t/t1402-check-ref-format.sh
@@ -196,52 +196,4 @@ invalid_ref_normalized 'heads///foo.lock'
invalid_ref_normalized 'foo.lock/bar'
invalid_ref_normalized 'foo.lock///bar'
-test_expect_success 'git branch shows badly named ref' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
- test_when_finished "rm -f .git/refs/heads/broken...ref" &&
- git branch >output &&
- grep -e "broken...ref" output
-'
-
-test_expect_success 'git branch -d can delete badly named ref' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
- test_when_finished "rm -f .git/refs/heads/broken...ref" &&
- git branch -d broken...ref &&
- git branch >output &&
- ! grep -e "broken...ref" output
-'
-
-test_expect_success 'git branch -D can delete badly named ref' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
- test_when_finished "rm -f .git/refs/heads/broken...ref" &&
- git branch -D broken...ref &&
- git branch >output &&
- ! grep -e "broken...ref" output
-'
-
-test_expect_success 'git update-ref -d can delete badly named ref' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
- test_when_finished "rm -f .git/refs/heads/broken...ref" &&
- git update-ref -d refs/heads/broken...ref &&
- git branch >output &&
- ! grep -e "broken...ref" output
-'
-
-test_expect_success 'git branch can not create a badly named ref' '
- test_must_fail git branch broken...ref
-'
-
-test_expect_success 'git branch can not rename to a bad ref name' '
- git branch goodref &&
- test_must_fail git branch -m goodref broken...ref
-'
-
-test_expect_failure 'git branch can rename from a bad ref name' '
- cp .git/refs/heads/master .git/refs/heads/broken...ref &&
- test_when_finished "rm -f .git/refs/heads/broken...ref" &&
- git branch -m broken...ref renamed &&
- test_must_fail git rev-parse broken...ref &&
- test_cmp_rev master renamed
-'
-
test_done
diff --git c/t/t1413-reflog-detach.sh w/t/t1413-reflog-detach.sh
new file mode 100755
index 0000000..c730600
--- /dev/null
+++ w/t/t1413-reflog-detach.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+test_description='Test reflog interaction with detached HEAD'
+. ./test-lib.sh
+
+reset_state () {
+ git checkout master &&
+ cp saved_reflog .git/logs/HEAD
+}
+
+test_expect_success setup '
+ test_tick &&
+ git commit --allow-empty -m initial &&
+ git branch side &&
+ test_tick &&
+ git commit --allow-empty -m second &&
+ cat .git/logs/HEAD >saved_reflog
+'
+
+test_expect_success baseline '
+ reset_state &&
+ git rev-parse master master^ >expect &&
+ git log -g --format=%H >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'switch to branch' '
+ reset_state &&
+ git rev-parse side master master^ >expect &&
+ git checkout side &&
+ git log -g --format=%H >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'detach to other' '
+ reset_state &&
+ git rev-parse master side master master^ >expect &&
+ git checkout side &&
+ git checkout master^0 &&
+ git log -g --format=%H >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'detach to self' '
+ reset_state &&
+ git rev-parse master master master^ >expect &&
+ git checkout master^0 &&
+ git log -g --format=%H >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'attach to self' '
+ reset_state &&
+ git rev-parse master master master master^ >expect &&
+ git checkout master^0 &&
+ git checkout master &&
+ git log -g --format=%H >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'attach to other' '
+ reset_state &&
+ git rev-parse side master master master^ >expect &&
+ git checkout master^0 &&
+ git checkout side &&
+ git log -g --format=%H >actual &&
+ test_cmp expect actual
+'
+
+test_done
diff --git c/t/t1430-bad-ref-name.sh w/t/t1430-bad-ref-name.sh
new file mode 100755
index 0000000..468e856
--- /dev/null
+++ w/t/t1430-bad-ref-name.sh
@@ -0,0 +1,207 @@
+#!/bin/sh
+
+test_description='Test handling of ref names that check-ref-format rejects'
+. ./test-lib.sh
+
+test_expect_success setup '
+ test_commit one &&
+ test_commit two
+'
+
+test_expect_success 'fast-import: fail on invalid branch name ".badbranchname"' '
+ test_when_finished "rm -f .git/objects/pack_* .git/objects/index_*" &&
+ cat >input <<-INPUT_END &&
+ commit .badbranchname
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ corrupt
+ COMMIT
+
+ from refs/heads/master
+
+ INPUT_END
+ test_must_fail git fast-import <input
+'
+
+test_expect_success 'fast-import: fail on invalid branch name "bad[branch]name"' '
+ test_when_finished "rm -f .git/objects/pack_* .git/objects/index_*" &&
+ cat >input <<-INPUT_END &&
+ commit bad[branch]name
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ corrupt
+ COMMIT
+
+ from refs/heads/master
+
+ INPUT_END
+ test_must_fail git fast-import <input
+'
+
+test_expect_success 'git branch shows badly named ref' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch >output &&
+ grep -e "broken\.\.\.ref" output
+'
+
+test_expect_success 'branch -d can delete badly named ref' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch -d broken...ref &&
+ git branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_success 'branch -D can delete badly named ref' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch -D broken...ref &&
+ git branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_success 'branch -D cannot delete non-ref in .git dir' '
+ echo precious >.git/my-private-file &&
+ echo precious >expect &&
+ test_must_fail git branch -D ../../my-private-file &&
+ test_cmp expect .git/my-private-file
+'
+
+test_expect_success 'branch -D cannot delete absolute path' '
+ git branch -f extra &&
+ test_must_fail git branch -D "$(pwd)/.git/refs/heads/extra" &&
+ test_cmp_rev HEAD extra
+'
+
+test_expect_success 'git branch cannot create a badly named ref' '
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ test_must_fail git branch broken...ref &&
+ git branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_success 'branch -m cannot rename to a bad ref name' '
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ test_might_fail git branch -D goodref &&
+ git branch goodref &&
+ test_must_fail git branch -m goodref broken...ref &&
+ test_cmp_rev master goodref &&
+ git branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_failure 'branch -m can rename from a bad ref name' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch -m broken...ref renamed &&
+ test_cmp_rev master renamed &&
+ git branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_success 'push cannot create a badly named ref' '
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ test_must_fail git push "file://$(pwd)" HEAD:refs/heads/broken...ref &&
+ git branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_failure 'push --mirror can delete badly named ref' '
+ top=$(pwd) &&
+ git init src &&
+ git init dest &&
+
+ (
+ cd src &&
+ test_commit one
+ ) &&
+ (
+ cd dest &&
+ test_commit two &&
+ git checkout --detach &&
+ cp .git/refs/heads/master .git/refs/heads/broken...ref
+ ) &&
+ git -C src push --mirror "file://$top/dest" &&
+ git -C dest branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_success 'rev-parse skips symref pointing to broken name' '
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git branch shadow one &&
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ git symbolic-ref refs/tags/shadow refs/heads/broken...ref &&
+
+ git rev-parse --verify one >expect &&
+ git rev-parse --verify shadow >actual 2>err &&
+ test_cmp expect actual &&
+ test_i18ngrep "ignoring.*refs/tags/shadow" err
+'
+
+test_expect_success 'update-ref --no-deref -d can delete reference to broken name' '
+ git symbolic-ref refs/heads/badname refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/badname" &&
+ test_path_is_file .git/refs/heads/badname &&
+ git update-ref --no-deref -d refs/heads/badname &&
+ test_path_is_missing .git/refs/heads/badname
+'
+
+test_expect_success 'update-ref -d can delete broken name' '
+ cp .git/refs/heads/master .git/refs/heads/broken...ref &&
+ test_when_finished "rm -f .git/refs/heads/broken...ref" &&
+ git update-ref -d refs/heads/broken...ref &&
+ git branch >output &&
+ ! grep -e "broken\.\.\.ref" output
+'
+
+test_expect_success 'update-ref -d cannot delete non-ref in .git dir' '
+ echo precious >.git/my-private-file &&
+ echo precious >expect &&
+ test_must_fail git update-ref -d my-private-file &&
+ test_cmp expect .git/my-private-file
+'
+
+test_expect_success 'update-ref -d cannot delete absolute path' '
+ git branch -f extra &&
+ test_must_fail git update-ref -d "$(pwd)/.git/refs/heads/extra" &&
+ test_cmp_rev HEAD extra
+'
+
+test_expect_success 'update-ref --stdin fails create with bad ref name' '
+ echo "create ~a refs/heads/master" >stdin &&
+ test_must_fail git update-ref --stdin <stdin 2>err &&
+ grep "fatal: invalid ref format: ~a" err
+'
+
+test_expect_success 'update-ref --stdin fails update with bad ref name' '
+ echo "update ~a refs/heads/master" >stdin &&
+ test_must_fail git update-ref --stdin <stdin 2>err &&
+ grep "fatal: invalid ref format: ~a" err
+'
+
+test_expect_success 'update-ref --stdin fails delete with bad ref name' '
+ echo "delete ~a refs/heads/master" >stdin &&
+ test_must_fail git update-ref --stdin <stdin 2>err &&
+ grep "fatal: invalid ref format: ~a" err
+'
+
+test_expect_success 'update-ref --stdin -z fails create with bad ref name' '
+ printf "%s\0" "create ~a " refs/heads/master >stdin &&
+ test_must_fail git update-ref -z --stdin <stdin 2>err &&
+ grep "fatal: invalid ref format: ~a " err
+'
+
+test_expect_success 'update-ref --stdin -z fails update with bad ref name' '
+ printf "%s\0" "update ~a" refs/heads/master "" >stdin &&
+ test_must_fail git update-ref -z --stdin <stdin 2>err &&
+ grep "fatal: invalid ref format: ~a" err
+'
+
+test_expect_success 'update-ref --stdin -z fails delete with bad ref name' '
+ printf "%s\0" "delete ~a" refs/heads/master >stdin &&
+ test_must_fail git update-ref -z --stdin <stdin 2>err &&
+ grep "fatal: invalid ref format: ~a" err
+'
+
+test_done
diff --git c/t/t9300-fast-import.sh w/t/t9300-fast-import.sh
index 5fc9ef2..3d156f9 100755
--- c/t/t9300-fast-import.sh
+++ w/t/t9300-fast-import.sh
@@ -347,36 +347,6 @@ test_expect_success 'B: fail on invalid blob sha1' '
rm -f .git/objects/pack_* .git/objects/index_*
cat >input <<INPUT_END
-commit .badbranchname
-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
-data <<COMMIT
-corrupt
-COMMIT
-
-from refs/heads/master
-
-INPUT_END
-test_expect_success 'B: fail on invalid branch name ".badbranchname"' '
- test_must_fail git fast-import <input
-'
-rm -f .git/objects/pack_* .git/objects/index_*
-
-cat >input <<INPUT_END
-commit bad[branch]name
-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
-data <<COMMIT
-corrupt
-COMMIT
-
-from refs/heads/master
-
-INPUT_END
-test_expect_success 'B: fail on invalid branch name "bad[branch]name"' '
- test_must_fail git fast-import <input
-'
-rm -f .git/objects/pack_* .git/objects/index_*
-
-cat >input <<INPUT_END
commit TEMP_TAG
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
diff --git c/transport-helper.c w/transport-helper.c
index 8365441..3497a5e 100644
--- c/transport-helper.c
+++ w/transport-helper.c
@@ -890,8 +890,9 @@ static int push_refs_with_export(struct transport *transport,
/* Follow symbolic refs (mainly for HEAD). */
name = resolve_ref_unsafe(
- ref->peer_ref->name, sha1,
- &flag, RESOLVE_REF_READING);
+ ref->peer_ref->name,
+ RESOLVE_REF_READING,
+ sha1, &flag);
if (!name || !(flag & REF_ISSYMREF))
name = ref->peer_ref->name;
diff --git c/transport.c w/transport.c
index 3ba7bbf..76e0a9a 100644
--- c/transport.c
+++ w/transport.c
@@ -168,8 +168,8 @@ static void set_upstreams(struct transport *transport, struct ref *refs,
/* Follow symbolic refs (mainly for HEAD). */
localname = ref->peer_ref->name;
remotename = ref->name;
- tmp = resolve_ref_unsafe(localname, sha, &flag,
- RESOLVE_REF_READING);
+ tmp = resolve_ref_unsafe(localname, RESOLVE_REF_READING,
+ sha, &flag);
if (tmp && flag & REF_ISSYMREF &&
starts_with(tmp, "refs/heads/"))
localname = tmp;
@@ -754,7 +754,7 @@ void transport_print_push_status(const char *dest, struct ref *refs,
unsigned char head_sha1[20];
char *head;
- head = resolve_refdup("HEAD", head_sha1, NULL, RESOLVE_REF_READING);
+ head = resolve_refdup("HEAD", RESOLVE_REF_READING, head_sha1, NULL);
if (verbose) {
for (ref = refs; ref; ref = ref->next)
diff --git c/upload-pack.c w/upload-pack.c
index 3b51ccb..4542565 100644
--- c/upload-pack.c
+++ w/upload-pack.c
@@ -743,7 +743,7 @@ static int find_symref(const char *refname, const unsigned char *sha1, int flag,
if ((flag & REF_ISSYMREF) == 0)
return 0;
- symref_target = resolve_ref_unsafe(refname, unused, &flag, 0);
+ symref_target = resolve_ref_unsafe(refname, 0, unused, &flag);
if (!symref_target || (flag & REF_ISSYMREF) == 0)
die("'%s' is a symref but it is not?", refname);
item = string_list_append(cb_data, refname);
diff --git c/wt-status.c w/wt-status.c
index 6819e2b..c3cbf50 100644
--- c/wt-status.c
+++ w/wt-status.c
@@ -128,7 +128,7 @@ void wt_status_prepare(struct wt_status *s)
s->show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES;
s->use_color = -1;
s->relative_paths = 1;
- s->branch = resolve_refdup("HEAD", sha1, NULL, 0);
+ s->branch = resolve_refdup("HEAD", 0, sha1, NULL);
s->reference = "HEAD";
s->fp = stdout;
s->index_file = get_index_file();
^ permalink raw reply related [relevance 1%]
* [PATCH 01/24] mv test: recreate mod/ directory instead of relying on stale copy
2014-10-02 1:48 1% ` [PATCH v22 0/24] rs/ref-transaction Jonathan Nieder
@ 2014-10-02 1:50 10% ` Jonathan Nieder
0 siblings, 0 replies; 200+ results
From: Jonathan Nieder @ 2014-10-02 1:50 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: git@vger.kernel.org, Michael Haggerty
Date: Wed, 10 Sep 2014 14:01:46 -0700
The tests for 'git mv moves a submodule' functionality often run
commands like
git mv sub mod/sub
to move a submodule into a subdirectory. Just like plain /bin/mv,
this is supposed to succeed if the mod/ parent directory exists
and fail if it doesn't exist.
Usually these tests mkdir the parent directory beforehand, but some
instead rely on it being left behind by previous tests.
More precisely, when 'git reset --hard' tries to move to a state where
mod/sub is not present any more, it would perform the following
operations:
rmdir("mod/sub")
rmdir("mod")
The first fails with ENOENT because the test script removed mod/sub
with "rm -rf" already, so 'reset --hard' doesn't bother to move on to
the second, and the mod/ directory is kept around.
Better to explicitly remove and re-create the mod/ directory so later
tests don't have to depend on the directory left behind by the earlier
ones at all (making it easier to rearrange or skip some tests in the
file or to tweak 'reset --hard' behavior without breaking unrelated
tests).
Noticed while testing a patch that fixes the reset --hard behavior
described above.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Ronnie Sahlberg <sahlberg@google.com>
---
As before.
t/t7001-mv.sh | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 54d7807..69f11bd 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -350,10 +350,11 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
'
test_expect_success 'git mv moves a submodule with gitfile' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
(
cd mod &&
git mv ../sub/ .
@@ -372,11 +373,12 @@ test_expect_success 'git mv moves a submodule with gitfile' '
'
test_expect_success 'mv does not complain when no .gitmodules file is found' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git rm .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
! test -s actual.err &&
! test -e sub &&
@@ -390,11 +392,12 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '
'
test_expect_success 'mv will error out on a modified .gitmodules file unless staged' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules foo.bar true &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
test_must_fail git mv sub mod/sub 2>actual.err &&
test -s actual.err &&
test -e sub &&
@@ -413,13 +416,14 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta
'
test_expect_success 'mv issues a warning when section is not found in .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules --remove-section submodule.sub &&
git add .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
test_i18ncmp expect.err actual.err &&
! test -e sub &&
@@ -433,9 +437,10 @@ test_expect_success 'mv issues a warning when section is not found in .gitmodule
'
test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
+ mkdir mod &&
git mv -n sub mod/sub 2>actual.err &&
test -f sub/.git &&
git diff-index --exit-code HEAD &&
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [relevance 10%]
* [PATCH v23 0/25] rs/ref-transaction ("Use ref transactions", part 3)
@ 2014-10-15 0:45 2% Jonathan Nieder
2014-10-15 0:46 10% ` [PATCH 01/25] mv test: recreate mod/ directory instead of relying on stale copy Jonathan Nieder
0 siblings, 1 reply; 200+ results
From: Jonathan Nieder @ 2014-10-15 0:45 UTC (permalink / raw)
To: Michael Haggerty; +Cc: git, Ronnie Sahlberg, Junio C Hamano
This series by Ronnie was last seen on-list at [1]. It includes some
improvements to the ref-transaction API, improves handling of poorly
named refs (which should make it easier to tighten the refname format
checks in the future), and is a stepping stone toward later series
that use the ref-transaction API more and make it support alternate
backends (yay!).
The changes since (a merge of 'master' and) v22 are very minor and can
be seen below[2]. The more important change is that it's rebased
against current 'master'.
Review comments from Michael and Junio were very helpful in getting
this in shape. Thanks much to both.
The series can also be found at
git://repo.or.cz/git/jrn.git tags/rs/ref-transaction
It is based against current 'master' (670a3c1d, 2014-10-14) and
intended for 'next'.
Thoughts welcome, as always. Improvements preferred in the form of
patches on top of the series.
Jonathan Nieder (6):
mv test: recreate mod/ directory instead of relying on stale copy
branch -d: avoid repeated symref resolution
packed-ref cache: forbid dot-components in refnames
refs.c: do not permit err == NULL
lockfile: remove unable_to_lock_error
ref_transaction_commit: bail out on failure to remove a ref
Junio C Hamano (1):
reflog test: test interaction with detached HEAD
Ronnie Sahlberg (18):
wrapper.c: remove/unlink_or_warn: simplify, treat ENOENT as success
refs.c: lock_ref_sha1_basic is used for all refs
wrapper.c: add a new function unlink_or_msg
refs.c: add an err argument to delete_ref_loose
refs.c: pass the ref log message to _create/delete/update instead of
_commit
rename_ref: don't ask read_ref_full where the ref came from
refs.c: refuse to lock badly named refs in lock_ref_sha1_basic
refs.c: call lock_ref_sha1_basic directly from commit
refs.c: pass a list of names to skip to is_refname_available
refs.c: ref_transaction_commit: distinguish name conflicts from other
errors
fetch.c: change s_update_ref to use a ref transaction
refs.c: make write_ref_sha1 static
refs.c: change resolve_ref_unsafe reading argument to be a flags field
branch -d: simplify by using RESOLVE_REF_READING
test: put tests for handling of bad ref names in one place
refs.c: allow listing and deleting badly named refs
for-each-ref: skip and warn about broken ref names
remote rm/prune: print a message when writing packed-refs fails
branch.c | 6 +-
builtin/blame.c | 2 +-
builtin/branch.c | 22 ++-
builtin/checkout.c | 6 +-
builtin/clone.c | 2 +-
builtin/commit.c | 6 +-
builtin/fetch.c | 34 ++--
builtin/fmt-merge-msg.c | 2 +-
builtin/for-each-ref.c | 11 +-
builtin/fsck.c | 2 +-
builtin/log.c | 3 +-
builtin/merge.c | 2 +-
builtin/notes.c | 2 +-
builtin/receive-pack.c | 9 +-
builtin/remote.c | 20 ++-
builtin/replace.c | 5 +-
builtin/show-branch.c | 7 +-
builtin/symbolic-ref.c | 2 +-
builtin/tag.c | 4 +-
builtin/update-ref.c | 13 +-
bundle.c | 2 +-
cache.h | 44 +++--
fast-import.c | 8 +-
git-compat-util.h | 16 +-
http-backend.c | 4 +-
lockfile.c | 10 --
lockfile.h | 1 -
notes-merge.c | 2 +-
reflog-walk.c | 5 +-
refs.c | 446 ++++++++++++++++++++++++++++++++---------------
refs.h | 44 +++--
remote.c | 11 +-
sequencer.c | 8 +-
t/t1400-update-ref.sh | 62 +++----
t/t1413-reflog-detach.sh | 70 ++++++++
t/t1430-bad-ref-name.sh | 207 ++++++++++++++++++++++
t/t3200-branch.sh | 9 +
t/t7001-mv.sh | 15 +-
t/t9300-fast-import.sh | 30 ----
transport-helper.c | 5 +-
transport.c | 5 +-
upload-pack.c | 2 +-
walker.c | 5 +-
wrapper.c | 28 ++-
wt-status.c | 2 +-
45 files changed, 850 insertions(+), 351 deletions(-)
create mode 100755 t/t1413-reflog-detach.sh
create mode 100755 t/t1430-bad-ref-name.sh
[1] http://thread.gmane.org/gmane.comp.version-control.git/254501/focus=257771
[2]
cache.h | 11 ++++---
git-compat-util.h | 4 +--
refs.c | 96 +++++++++++++++++++++++++++++--------------------------
refs.h | 6 +++-
4 files changed, 64 insertions(+), 53 deletions(-)
diff --git a/cache.h b/cache.h
index 209e8ba..0501f7d 100644
--- a/cache.h
+++ b/cache.h
@@ -983,7 +983,8 @@ extern int read_ref(const char *refname, unsigned char *sha1);
* packed references), REF_ISSYMREF (if the initial reference was a
* symbolic reference), REF_BAD_NAME (if the reference name is ill
* formed --- see RESOLVE_REF_ALLOW_BAD_NAME below), and REF_ISBROKEN
- * (if the ref is malformed).
+ * (if the ref is malformed or has a bad name). See refs.h for more detail
+ * on each flag.
*
* If ref is not a properly-formatted, normalized reference, return
* NULL. If more than MAXDEPTH recursive symbolic lookups are needed,
@@ -991,12 +992,14 @@ extern int read_ref(const char *refname, unsigned char *sha1);
*
* RESOLVE_REF_ALLOW_BAD_NAME allows resolving refs even when their
* name is invalid according to git-check-ref-format(1). If the name
- * is bad then the value stored in sha1 will be null_sha1 and the
- * REF_ISBROKEN and REF_BAD_NAME flags will be set.
+ * is bad then the value stored in sha1 will be null_sha1 and the two
+ * flags REF_ISBROKEN and REF_BAD_NAME will be set.
*
* Even with RESOLVE_REF_ALLOW_BAD_NAME, names that escape the refs/
* directory and do not consist of all caps and underscores cannot be
- * resolved. The function returns NULL for such ref names.
+ * resolved. The function returns NULL for such ref names.
+ * Caps and underscores refers to the special refs, such as HEAD,
+ * FETCH_HEAD and friends, that all live outside of the refs/ directory.
*/
#define RESOLVE_REF_READING 0x01
#define RESOLVE_REF_NO_RECURSE 0x02
diff --git a/git-compat-util.h b/git-compat-util.h
index 8f805bf..59ecf21 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -779,7 +779,7 @@ void git_qsort(void *base, size_t nmemb, size_t size,
/*
* Preserves errno, prints a message, but gives no warning for ENOENT.
- * Returns 0 on success which includes trying to unlink an object that does
+ * Returns 0 on success, which includes trying to unlink an object that does
* not exist.
*/
int unlink_or_warn(const char *path);
@@ -792,7 +792,7 @@ int unlink_or_warn(const char *path);
int unlink_or_msg(const char *file, struct strbuf *err);
/*
* Preserves errno, prints a message, but gives no warning for ENOENT.
- * Returns 0 on success which includes trying to remove a directory that does
+ * Returns 0 on success, which includes trying to remove a directory that does
* not exist.
*/
int rmdir_or_warn(const char *path);
diff --git a/refs.c b/refs.c
index bee0e39..0368ed4 100644
--- a/refs.c
+++ b/refs.c
@@ -274,29 +274,31 @@ static struct ref_dir *get_ref_dir(struct ref_entry *entry)
return dir;
}
-static int escapes_cwd(const char *path) {
- char *buf;
- int result;
-
- if (is_absolute_path(path))
- return 1;
- buf = xmalloc(strlen(path) + 1);
- result = !!normalize_path_copy(buf, path);
- free(buf);
- return result;
-}
-
/*
* Check if a refname is safe.
- * For refs that start with "refs/" we consider it safe as long as the rest
- * of the path components does not allow it to escape from this directory.
+ * For refs that start with "refs/" we consider it safe as long they do
+ * not try to resolve to outside of refs/.
+ *
* For all other refs we only consider them safe iff they only contain
- * upper case characters and '_'.
+ * upper case characters and '_' (like "HEAD" AND "MERGE_HEAD", and not like
+ * "config").
*/
static int refname_is_safe(const char *refname)
{
- if (starts_with(refname, "refs/"))
- return !escapes_cwd(refname + strlen("refs/"));
+ if (starts_with(refname, "refs/")) {
+ char *buf;
+ int result;
+
+ buf = xmalloc(strlen(refname) + 1);
+ /*
+ * Does the refname try to escape refs/?
+ * For example: refs/foo/../bar is safe but refs/foo/../../bar
+ * is not.
+ */
+ result = !normalize_path_copy(buf, refname + strlen("refs/"));
+ free(buf);
+ return result;
+ }
while (*refname) {
if (!isupper(*refname) && *refname != '_')
return 0;
@@ -812,13 +814,13 @@ static void prime_ref_dir(struct ref_dir *dir)
}
}
-static int entry_matches(struct ref_entry *entry, struct string_list *list)
+static int entry_matches(struct ref_entry *entry, const struct string_list *list)
{
return list && string_list_has_string(list, entry->name);
}
struct nonmatching_ref_data {
- struct string_list *skip;
+ const struct string_list *skip;
struct ref_entry *found;
};
@@ -842,18 +844,20 @@ static void report_refname_conflict(struct ref_entry *entry,
/*
* Return true iff a reference named refname could be created without
* conflicting with the name of an existing reference in dir. If
- * skiplist is non-NULL, ignore potential conflicts with names in
- * skiplist (e.g., because those refs are scheduled for deletion in
- * the same operation). skiplist must be sorted.
+ * skip is non-NULL, ignore potential conflicts with refs in skip
+ * (e.g., because they are scheduled for deletion in the same
+ * operation).
*
* Two reference names conflict if one of them exactly matches the
* leading components of the other; e.g., "foo/bar" conflicts with
* both "foo" and with "foo/bar/baz" but not with "foo/bar" or
* "foo/barbados".
+ *
+ * skip must be sorted.
*/
static int is_refname_available(const char *refname,
- struct ref_dir *dir,
- struct string_list *skiplist)
+ const struct string_list *skip,
+ struct ref_dir *dir)
{
const char *slash;
size_t len;
@@ -866,12 +870,12 @@ static int is_refname_available(const char *refname,
* looking for a conflict with a leaf entry.
*
* If we find one, we still must make sure it is
- * not in "skiplist".
+ * not in "skip".
*/
pos = search_ref_dir(dir, refname, slash - refname);
if (pos >= 0) {
struct ref_entry *entry = dir->entries[pos];
- if (entry_matches(entry, skiplist))
+ if (entry_matches(entry, skip))
return 1;
report_refname_conflict(entry, refname);
return 0;
@@ -903,14 +907,14 @@ static int is_refname_available(const char *refname,
if (pos >= 0) {
/*
* We found a directory named "refname". It is a
- * problem iff it contains any ref that is not in
- * "skiplist".
+ * problem iff it contains any ref that is not
+ * in "skip".
*/
struct ref_entry *entry = dir->entries[pos];
struct ref_dir *dir = get_ref_dir(entry);
struct nonmatching_ref_data data;
- data.skip = skiplist;
+ data.skip = skip;
sort_ref_dir(dir);
if (!do_for_each_entry_in_dir(dir, 0, nonmatching_ref_fn, &data))
return 1;
@@ -1596,7 +1600,7 @@ const char *resolve_ref_unsafe(const char *refname, int resolve_flags, unsigned
}
if (check_refname_format(buf, REFNAME_ALLOW_ONELEVEL)) {
if (flags)
- *flags |= REF_BAD_NAME | REF_ISBROKEN;
+ *flags |= REF_ISBROKEN;
if (!(resolve_flags & RESOLVE_REF_ALLOW_BAD_NAME) ||
!refname_is_safe(buf)) {
@@ -2217,12 +2221,12 @@ int dwim_log(const char *str, int len, unsigned char *sha1, char **log)
}
/*
- * Locks a "refs/" ref returning the lock on success and NULL on failure.
+ * Locks a ref returning the lock on success and NULL on failure.
* On failure errno is set to something meaningful.
*/
static struct ref_lock *lock_ref_sha1_basic(const char *refname,
const unsigned char *old_sha1,
- struct string_list *skiplist,
+ const struct string_list *skip,
int flags, int *type_p)
{
char *ref_file;
@@ -2278,8 +2282,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
* name is a proper prefix of our refname.
*/
if (missing &&
- !is_refname_available(refname, get_packed_refs(&ref_cache),
- skiplist)) {
+ !is_refname_available(refname, skip, get_packed_refs(&ref_cache))) {
last_errno = ENOTDIR;
goto error_return;
}
@@ -2780,6 +2783,18 @@ static int rename_tmp_log(const char *newrefname)
return 0;
}
+static int rename_ref_available(const char *oldname, const char *newname)
+{
+ struct string_list skip = STRING_LIST_INIT_NODUP;
+ int ret;
+
+ string_list_insert(&skip, oldname);
+ ret = is_refname_available(newname, &skip, get_packed_refs(&ref_cache))
+ && is_refname_available(newname, &skip, get_loose_refs(&ref_cache));
+ string_list_clear(&skip, 0);
+ return ret;
+}
+
static int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1,
const char *logmsg);
@@ -2791,7 +2806,6 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
struct stat loginfo;
int log = !lstat(git_path("logs/%s", oldrefname), &loginfo);
const char *symref = NULL;
- struct string_list skiplist = STRING_LIST_INIT_NODUP;
if (log && S_ISLNK(loginfo.st_mode))
return error("reflog for %s is a symlink", oldrefname);
@@ -2804,18 +2818,8 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
if (!symref)
return error("refname %s not found", oldrefname);
- string_list_insert(&skiplist, oldrefname);
- if (!is_refname_available(newrefname, get_packed_refs(&ref_cache),
- &skiplist)) {
- string_list_clear(&skiplist, 0);
+ if (!rename_ref_available(oldrefname, newrefname))
return 1;
- }
- if (!is_refname_available(newrefname, get_loose_refs(&ref_cache),
- &skiplist)) {
- string_list_clear(&skiplist, 0);
- return 1;
- }
- string_list_clear(&skiplist, 0);
if (log && rename(git_path("logs/%s", oldrefname), git_path(TMP_RENAMED_LOG)))
return error("unable to move logfile logs/%s to "TMP_RENAMED_LOG": %s",
diff --git a/refs.h b/refs.h
index e1c43f9..2bc3556 100644
--- a/refs.h
+++ b/refs.h
@@ -62,7 +62,11 @@ struct ref_transaction;
*/
#define REF_ISBROKEN 0x04
-/* Reference name is not well formed (see git-check-ref-format(1)). */
+/*
+ * Reference name is not well formed.
+ *
+ * See git-check-ref-format(1) for the definition of well formed ref names.
+ */
#define REF_BAD_NAME 0x08
/*
^ permalink raw reply related [relevance 2%]
* [PATCH 01/25] mv test: recreate mod/ directory instead of relying on stale copy
2014-10-15 0:45 2% [PATCH v23 0/25] rs/ref-transaction ("Use ref transactions", part 3) Jonathan Nieder
@ 2014-10-15 0:46 10% ` Jonathan Nieder
0 siblings, 0 replies; 200+ results
From: Jonathan Nieder @ 2014-10-15 0:46 UTC (permalink / raw)
To: Michael Haggerty; +Cc: git, Ronnie Sahlberg, Junio C Hamano
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Wed, 10 Sep 2014 14:01:46 -0700
The tests for 'git mv moves a submodule' functionality often run
commands like
git mv sub mod/sub
to move a submodule into a subdirectory. Just like plain /bin/mv,
this is supposed to succeed if the mod/ parent directory exists
and fail if it doesn't exist.
Usually these tests mkdir the parent directory beforehand, but some
instead rely on it being left behind by previous tests.
More precisely, when 'git reset --hard' tries to move to a state where
mod/sub is not present any more, it would perform the following
operations:
rmdir("mod/sub")
rmdir("mod")
The first fails with ENOENT because the test script removed mod/sub
with "rm -rf" already, so 'reset --hard' doesn't bother to move on to
the second, and the mod/ directory is kept around.
Better to explicitly remove and re-create the mod/ directory so later
tests don't have to depend on the directory left behind by the earlier
ones at all (making it easier to rearrange or skip some tests in the
file or to tweak 'reset --hard' behavior without breaking unrelated
tests).
Noticed while testing a patch that fixes the reset --hard behavior
described above.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Ronnie Sahlberg <sahlberg@google.com>
---
t/t7001-mv.sh | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 54d7807..69f11bd 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -350,10 +350,11 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
'
test_expect_success 'git mv moves a submodule with gitfile' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
(
cd mod &&
git mv ../sub/ .
@@ -372,11 +373,12 @@ test_expect_success 'git mv moves a submodule with gitfile' '
'
test_expect_success 'mv does not complain when no .gitmodules file is found' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git rm .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
! test -s actual.err &&
! test -e sub &&
@@ -390,11 +392,12 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '
'
test_expect_success 'mv will error out on a modified .gitmodules file unless staged' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules foo.bar true &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
+ mkdir mod &&
test_must_fail git mv sub mod/sub 2>actual.err &&
test -s actual.err &&
test -e sub &&
@@ -413,13 +416,14 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta
'
test_expect_success 'mv issues a warning when section is not found in .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules --remove-section submodule.sub &&
git add .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
+ mkdir mod &&
git mv sub mod/sub 2>actual.err &&
test_i18ncmp expect.err actual.err &&
! test -e sub &&
@@ -433,9 +437,10 @@ test_expect_success 'mv issues a warning when section is not found in .gitmodule
'
test_expect_success 'mv --dry-run does not touch the submodule or .gitmodules' '
- rm -rf mod/sub &&
+ rm -rf mod &&
git reset --hard &&
git submodule update &&
+ mkdir mod &&
git mv -n sub mod/sub 2>actual.err &&
test -f sub/.git &&
git diff-index --exit-code HEAD &&
--
2.1.0.rc2.206.gedb03e5
^ permalink raw reply related [relevance 10%]
* Re: Interested in helping open source friends on HP-UX?
@ 2015-02-18 16:00 5% ` H.Merijn Brand
2015-02-18 17:46 0% ` Michael J Gruber
0 siblings, 1 reply; 200+ results
From: H.Merijn Brand @ 2015-02-18 16:00 UTC (permalink / raw)
To: git, Junio C Hamano
[-- Attachment #1: Type: text/plain, Size: 9676 bytes --]
On Wed, 10 Dec 2014 23:46:25 -0800, Junio C Hamano <gitster@pobox.com>
wrote:
> Hello, all.
>
> H. Merijn Brand runs a few HP-UX boxes to help perl5 and other open
> source communities, wants help porting more recent Git on these
> boxes, running HP-UX 10.20, 11.00, and 11.23, and looking for a
> volunteer. Please contact him directly if you are interested.
No-one. Disappointing :(
I started to work on 2.3.0 on HP-UX 11.23/63 ia64
Did *anyone* ever test with NO_ICONV?
Too many tests fail without iconv
It is *very* hard to decide from the current status if all
remaining failures are related to (Asian) locale failures and (thus)
can be safely ignored (in my environment).
Specifics at the end
FAILures from scratch with no iconv:
--------------------------------------------------------------------------------
t3513-revert-submodule.sh Tests: 14 Failed: 5 Failed tests: 1-2, 4, 6-7 TODO passed: 10-11
t3900-i18n-commit.sh Tests: 34 Failed: 8 Failed tests: 15-17, 23-25, 27-28
t3901-i18n-patch.sh Tests: 15 Failed: 8 Failed tests: 2-3, 6-7, 9, 11, 14-15
t4041-diff-submodule-option.sh Tests: 44 Failed: 5 Failed tests: 5-7, 9-10
t4201-shortlog.sh Tests: 11 Failed: 1 Failed tests: 9
t4204-patch-id.sh Tests: 15 Failed: 3 Failed tests: 7, 10, 13
t4205-log-pretty-formats.sh Tests: 46 Failed: 20 Failed tests: 12-14, 17, 19, 21, 23-29, 31, 33, 35, 37 39, 41-42
t4210-log-i18n.sh Tests: 5 Failed: 4 Failed tests: 2-5
t5100-mailinfo.sh Tests: 35 Failed: 11 Failed tests: 20-30
t5570-git-daemon.sh Tests: 12 Failed: 2 Failed tests: 4-5 Parse errors: No plan found in TAP output
t6006-rev-list-format.sh Tests: 54 Failed: 11 Failed tests: 9-10, 12, 25-27, 30-34
t6041-bisect-submodule.sh Tests: 14 Failed: 9 Failed tests: 1-2, 4-7, 12-14 TODO passed: 10-11
t7001-mv.sh Tests: 46 Failed: 2 Failed tests: 38-39
t7102-reset.sh Tests: 30 Failed: 1 Failed tests: 2
t7610-mergetool.sh Tests: 18 Failed: 1 Failed tests: 18
t7800-difftool.sh Tests: 56 Failed: 1 Failed tests: 49
t8005-blame-i18n.sh Tests: 5 Failed: 3 Failed tests: 2-4
t9350-fast-export.sh Tests: 34 Failed: 1 Failed tests: 4
Files=687, Tests=12091
FAILures from scratch with iconv:
--------------------------------------------------------------------------------
t3513-revert-submodule.sh Tests: 14 Failed: 5 Failed tests: 1-2, 4, 6-7 TODO passed: 10-11
t3900-i18n-commit.sh Tests: 34 Failed: 6 Failed tests: 16-17, 24-25, 27-28
t4204-patch-id.sh Tests: 15 Failed: 3 Failed tests: 7, 10, 13
t4210-log-i18n.sh Tests: 5 Failed: 4 Failed tests: 2-5
t5100-mailinfo.sh Tests: 35 Failed: 2 Failed tests: 20, 23
t5536-fetch-conflicts.sh Tests: 7 Failed: 3 Failed tests: 3, 6-7
t5570-git-daemon.sh Tests: 12 Failed: 2 Failed tests: 4-5 Parse errors: No plan found in TAP output
t6041-bisect-submodule.sh Tests: 14 Failed: 9 Failed tests: 1-2, 4-7, 12-14 TODO passed: 10-11
t7001-mv.sh Tests: 46 Failed: 2 Failed tests: 38-39
t7610-mergetool.sh Tests: 18 Failed: 1 Failed tests: 18
t7800-difftool.sh Tests: 56 Failed: 1 Failed tests: 49
t8005-blame-i18n.sh Tests: 5 Failed: 3 Failed tests: 2-4
Files=687, Tests=12091
Result: FAIL
running «sh t****.sh -x -i»
t/t7001-mv.t
------------
cp uses -P flag, which is unknown to HP's (non-GNU) version of cp
Changing the two occurrences from
cp -R -P -p ../.git/modules/sub .git &&
to
rsync -aHl ../.git/modules/sub/ .git/ &&
make the tests pass (on those systems that have a working rsync)
t/t3513-revert-submodule.sh
---------------------------
tar uses z flag, which is unknown to HP's (non-GNU) version of tar
config.mak.uname defines TAR = gtar, but that obviously does not help
putting GNU-tar temporary in from of my $PATH makes the test pass
/me thinks the z in not required in that test at all
tar cf "$TRASH_DIRECTORY/tmp.tar" * &&
and
tar xf "$TRASH_DIRECTORY/tmp.tar" &&
work just as well and prevent the breakage
t/t3900-i18n-commit.sh
----------------------
As my HP boxes have *NO* JP or other space eating asian locale stuff
installed, it is highly likely that *anything* dealing with asian
locales will fail. On modern Linux hardware, disk space is cheap. On
most HP-UX boxes disk space is expensive and when having nothing to do
with Asian languages, removing all Asian-related packages is a fast and
cheap way to regain disk space.
Changing compare_with to
compare_with () {
case "$1$2$3" in
*eucJP*|*ISO-2022-JP*) true ;;
*)
git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' >current &&
case "$3" in
'')
test_cmp "$2" current ;;
?*)
iconv -f "$3" -t UTF-8 >current.utf8 <current &&
iconv -f "$3" -t UTF-8 >expect.utf8 <"$2" &&
test_cmp expect.utf8 current.utf8
;;
esac
;;
esac
}
makes all my tests pass
t/t4204-patch-id.sh
-------------------
No idea yet
+ test_patch_id_file_order irrelevant --stable --stable
Already on 'same'
cmp: patch-id_ordered-ordered-order---stable-irrelevant: No such file or directory
$ find * | grep 4204 | grep stable
trash directory.t4204-patch-id/patch-id_order---stable-irrelevant
trash directory.t4204-patch-id/patch-id_ordered-order---stable-irrelevant
t/t4210-log-i18n
----------------
$ dump "trash directory.t4210-log-i18n/actual"
00000000 75 74 66 38 0A utf8.
$ dump "trash directory.t4210-log-i18n/expect"
00000000 6C 61 74 69 6E 31 0A 75 74 66 38 0A latin1.utf8.
$ dump "trash directory.t4210-log-i18n/msg"
00000000 6C 61 74 69 6E 31 0A 0A 74 E9 73 74 0A latin1..t.st.
t/t5100-mailinfo.sh
-------------------
+ git mailinfo -u rfc2047/0001-msg rfc2047/0001-patch
+ 0< rfc2047/0001 1> rfc2047/0001-info
fatal: cannot convert from US-ASCII to UTF-8
error: last command exited with $?=128
t/t5536-fetch-conflicts.sh
--------------------------
+ setup_repository ccc +refs/heads/branch1:refs/remotes/origin/branch1 +refs/heads/branch2:refs/remotes/origin/branch1
Initialized empty Git repository in /pro/3gl/LINUX/git-2.3.0p/t/trash directory.t5536-fetch-conflicts/ccc/.git/
+ cd ccc
+ test_must_fail git fetch origin
+ 2> error
+ verify_stderr
+ 0< /var/tmp/sh6096.2
cmp: EOF on actual
error: last command exited with $?=1
not ok 3 - fetch conflict: config vs. config
t/t5570-git-daemon.sh
---------------------
I will ignore this myself, as I have no intention of using HP-UX as a
git server. We already have a dedicated Linux box doing so.
+ test_cmp file clone/file
ok 3 - clone git repository
expecting success:
echo content >>file &&
git commit -a -m two &&
git push public &&
(cd clone && git pull) &&
test_cmp file clone/file
+ echo content
+ 1>> file
+ git commit -a -m two
arg sulong failed. 0, 0x9fffffffbffff058
Setup args failed.
Pid 6238 was killed due to failure in writing to user register stack - possible stack overflow.
[master bca99f0] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
+ git push public
t/t6041-bisect-submodule.sh
---------------------------
config.mak.uname defines TAR = gtar, but that obviously does not help
+ git_bisect add_sub1
tar: z: unknown option
tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
changing my $PATH to have a GNU tar in front makes all tests pass
t/t7610-mergetool.sh
--------------------
HP-UX' mktemp obviously is not compatible with GNU mktemp (which I have
not installed/available on HP-UX)
SYNOPSIS
mktemp [-c] [-d directory_name] [-p prefix]
Resolved 'subdir/file3' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
+ git mergetool --no-prompt --tool myecho -- both
+ 1> actual
error: mktemp is needed when 'mergetool.writeToTemp' is true
error: last command exited with $?=1
not ok 18 - temporary filenames are used with mergetool.writeToTemp
t/t7800-difftool.sh
-------------------
HP-UX doesn't have readlink
+ git difftool --dir-diff --symlink --extcmd ./.git/CHECK_SYMLINKS branch HEAD
./.git/CHECK_SYMLINKS: line 5: readlink: command not found
./.git/CHECK_SYMLINKS: line 5: readlink: command not found
./.git/CHECK_SYMLINKS: line 5: readlink: command not found
/pro/3gl/LINUX/git-2.3.0p/git-difftool line 472: No such file or directory
fatal: 'difftool' appears to be a git command, but we were not
able to execute it. Maybe git-difftool is broken?
error: last command exited with $?=128
not ok 49 - difftool --dir-diff --symlink without unstaged changes
t/t8005-blame-i18n.sh
---------------------
SJIS again, I DO NOT CARE!
+ 1> actual
+ test_cmp actual expected
actual expected differ: char 56, line 3
error: last command exited with $?=1
not ok 2 - blame respects i18n.commitencoding
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [relevance 5%]
* Re: Interested in helping open source friends on HP-UX?
2015-02-18 16:00 5% ` H.Merijn Brand
@ 2015-02-18 17:46 0% ` Michael J Gruber
2015-02-18 18:25 0% ` Jeff King
2015-02-18 19:20 0% ` H.Merijn Brand
0 siblings, 2 replies; 200+ results
From: Michael J Gruber @ 2015-02-18 17:46 UTC (permalink / raw)
To: H.Merijn Brand, git, Junio C Hamano
H.Merijn Brand venit, vidit, dixit 18.02.2015 17:00:
> On Wed, 10 Dec 2014 23:46:25 -0800, Junio C Hamano <gitster@pobox.com>
> wrote:
>
>> Hello, all.
>>
>> H. Merijn Brand runs a few HP-UX boxes to help perl5 and other open
>> source communities, wants help porting more recent Git on these
>> boxes, running HP-UX 10.20, 11.00, and 11.23, and looking for a
>> volunteer. Please contact him directly if you are interested.
>
> No-one. Disappointing :(
Well, how can we help if we don't even know the limitations of that
platform?
In short, you are putting additional restrictions in by not having GNU
tools around.
> Did *anyone* ever test with NO_ICONV?
> Too many tests fail without iconv
There is iconv the library and iconv the command. With NO_ICONV, many
tests fail for me even on my standard Linux distro. But our tests keep
using iconv the command. The subtests which pass in t3900, for example,
mostly test that certain things fail, for one reason or another...
But we should guard a few tests in case of NO_ICONV, of course, and
probably not use iconv the command in this case either.
>
> It is *very* hard to decide from the current status if all
> remaining failures are related to (Asian) locale failures and (thus)
> can be safely ignored (in my environment).
>
>
> Specifics at the end
>
>
> FAILures from scratch with no iconv:
> --------------------------------------------------------------------------------
> t3513-revert-submodule.sh Tests: 14 Failed: 5 Failed tests: 1-2, 4, 6-7 TODO passed: 10-11
> t3900-i18n-commit.sh Tests: 34 Failed: 8 Failed tests: 15-17, 23-25, 27-28
> t3901-i18n-patch.sh Tests: 15 Failed: 8 Failed tests: 2-3, 6-7, 9, 11, 14-15
> t4041-diff-submodule-option.sh Tests: 44 Failed: 5 Failed tests: 5-7, 9-10
> t4201-shortlog.sh Tests: 11 Failed: 1 Failed tests: 9
> t4204-patch-id.sh Tests: 15 Failed: 3 Failed tests: 7, 10, 13
> t4205-log-pretty-formats.sh Tests: 46 Failed: 20 Failed tests: 12-14, 17, 19, 21, 23-29, 31, 33, 35, 37 39, 41-42
> t4210-log-i18n.sh Tests: 5 Failed: 4 Failed tests: 2-5
> t5100-mailinfo.sh Tests: 35 Failed: 11 Failed tests: 20-30
> t5570-git-daemon.sh Tests: 12 Failed: 2 Failed tests: 4-5 Parse errors: No plan found in TAP output
> t6006-rev-list-format.sh Tests: 54 Failed: 11 Failed tests: 9-10, 12, 25-27, 30-34
> t6041-bisect-submodule.sh Tests: 14 Failed: 9 Failed tests: 1-2, 4-7, 12-14 TODO passed: 10-11
> t7001-mv.sh Tests: 46 Failed: 2 Failed tests: 38-39
> t7102-reset.sh Tests: 30 Failed: 1 Failed tests: 2
> t7610-mergetool.sh Tests: 18 Failed: 1 Failed tests: 18
> t7800-difftool.sh Tests: 56 Failed: 1 Failed tests: 49
> t8005-blame-i18n.sh Tests: 5 Failed: 3 Failed tests: 2-4
> t9350-fast-export.sh Tests: 34 Failed: 1 Failed tests: 4
> Files=687, Tests=12091
>
> FAILures from scratch with iconv:
> --------------------------------------------------------------------------------
> t3513-revert-submodule.sh Tests: 14 Failed: 5 Failed tests: 1-2, 4, 6-7 TODO passed: 10-11
> t3900-i18n-commit.sh Tests: 34 Failed: 6 Failed tests: 16-17, 24-25, 27-28
> t4204-patch-id.sh Tests: 15 Failed: 3 Failed tests: 7, 10, 13
> t4210-log-i18n.sh Tests: 5 Failed: 4 Failed tests: 2-5
> t5100-mailinfo.sh Tests: 35 Failed: 2 Failed tests: 20, 23
> t5536-fetch-conflicts.sh Tests: 7 Failed: 3 Failed tests: 3, 6-7
> t5570-git-daemon.sh Tests: 12 Failed: 2 Failed tests: 4-5 Parse errors: No plan found in TAP output
> t6041-bisect-submodule.sh Tests: 14 Failed: 9 Failed tests: 1-2, 4-7, 12-14 TODO passed: 10-11
> t7001-mv.sh Tests: 46 Failed: 2 Failed tests: 38-39
> t7610-mergetool.sh Tests: 18 Failed: 1 Failed tests: 18
> t7800-difftool.sh Tests: 56 Failed: 1 Failed tests: 49
> t8005-blame-i18n.sh Tests: 5 Failed: 3 Failed tests: 2-4
> Files=687, Tests=12091
> Result: FAIL
>
> running «sh t****.sh -x -i»
>
>
> t/t7001-mv.t
> ------------
> cp uses -P flag, which is unknown to HP's (non-GNU) version of cp
>
> Changing the two occurrences from
>
> cp -R -P -p ../.git/modules/sub .git &&
> to
> rsync -aHl ../.git/modules/sub/ .git/ &&
>
> make the tests pass (on those systems that have a working rsync)
"rsync -r -l -o -p -t" would be the proper equivalent. -aH does more for
my rsync. I don't know what HP-UX rsync understands, though.
> t/t3513-revert-submodule.sh
> ---------------------------
> tar uses z flag, which is unknown to HP's (non-GNU) version of tar
> config.mak.uname defines TAR = gtar, but that obviously does not help
>
> putting GNU-tar temporary in from of my $PATH makes the test pass
> /me thinks the z in not required in that test at all
>
> tar cf "$TRASH_DIRECTORY/tmp.tar" * &&
> and
> tar xf "$TRASH_DIRECTORY/tmp.tar" &&
>
> work just as well and prevent the breakage
We can do without z.
> t/t3900-i18n-commit.sh
> ----------------------
> As my HP boxes have *NO* JP or other space eating asian locale stuff
> installed, it is highly likely that *anything* dealing with asian
> locales will fail. On modern Linux hardware, disk space is cheap. On
> most HP-UX boxes disk space is expensive and when having nothing to do
> with Asian languages, removing all Asian-related packages is a fast and
> cheap way to regain disk space.
>
> Changing compare_with to
>
> compare_with () {
> case "$1$2$3" in
> *eucJP*|*ISO-2022-JP*) true ;;
> *)
> git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' >current &&
> case "$3" in
> '')
> test_cmp "$2" current ;;
> ?*)
> iconv -f "$3" -t UTF-8 >current.utf8 <current &&
> iconv -f "$3" -t UTF-8 >expect.utf8 <"$2" &&
> test_cmp expect.utf8 current.utf8
> ;;
> esac
> ;;
> esac
> }
>
> makes all my tests pass
So you do have iconv the command, but don't want to link with the library?
Availability of the locales should be covered by a prerequisite, like we
do in t9129.
> t/t4204-patch-id.sh
> -------------------
>
> No idea yet
>
> + test_patch_id_file_order irrelevant --stable --stable
> Already on 'same'
> cmp: patch-id_ordered-ordered-order---stable-irrelevant: No such file or directory
>
> $ find * | grep 4204 | grep stable
> trash directory.t4204-patch-id/patch-id_order---stable-irrelevant
> trash directory.t4204-patch-id/patch-id_ordered-order---stable-irrelevant
The "Already"-part is normal output. The rest looks a bit crazy - and
shell related?
> t/t4210-log-i18n
> ----------------
>
> $ dump "trash directory.t4210-log-i18n/actual"
> 00000000 75 74 66 38 0A utf8.
> $ dump "trash directory.t4210-log-i18n/expect"
> 00000000 6C 61 74 69 6E 31 0A 75 74 66 38 0A latin1.utf8.
> $ dump "trash directory.t4210-log-i18n/msg"
> 00000000 6C 61 74 69 6E 31 0A 0A 74 E9 73 74 0A latin1..t.st.
>
> t/t5100-mailinfo.sh
> -------------------
> + git mailinfo -u rfc2047/0001-msg rfc2047/0001-patch
> + 0< rfc2047/0001 1> rfc2047/0001-info
> fatal: cannot convert from US-ASCII to UTF-8
> error: last command exited with $?=128
Is that mailinfo erroring out? Do you have those locales?
OK, I'll have to stop fishing in the dark here.
> t/t5536-fetch-conflicts.sh
> --------------------------
> + setup_repository ccc +refs/heads/branch1:refs/remotes/origin/branch1 +refs/heads/branch2:refs/remotes/origin/branch1
> Initialized empty Git repository in /pro/3gl/LINUX/git-2.3.0p/t/trash directory.t5536-fetch-conflicts/ccc/.git/
> + cd ccc
> + test_must_fail git fetch origin
> + 2> error
> + verify_stderr
> + 0< /var/tmp/sh6096.2
> cmp: EOF on actual
> error: last command exited with $?=1
> not ok 3 - fetch conflict: config vs. config
>
> t/t5570-git-daemon.sh
> ---------------------
> I will ignore this myself, as I have no intention of using HP-UX as a
> git server. We already have a dedicated Linux box doing so.
>
> + test_cmp file clone/file
> ok 3 - clone git repository
>
> expecting success:
> echo content >>file &&
> git commit -a -m two &&
> git push public &&
> (cd clone && git pull) &&
> test_cmp file clone/file
>
> + echo content
> + 1>> file
> + git commit -a -m two
>
> arg sulong failed. 0, 0x9fffffffbffff058
>
> Setup args failed.
>
> Pid 6238 was killed due to failure in writing to user register stack - possible stack overflow.
> [master bca99f0] two
> Author: A U Thor <author@example.com>
> 1 file changed, 1 insertion(+)
> + git push public
>
> t/t6041-bisect-submodule.sh
> ---------------------------
> config.mak.uname defines TAR = gtar, but that obviously does not help
>
> + git_bisect add_sub1
> tar: z: unknown option
> tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
>
> changing my $PATH to have a GNU tar in front makes all tests pass
>
>
> t/t7610-mergetool.sh
> --------------------
> HP-UX' mktemp obviously is not compatible with GNU mktemp (which I have
> not installed/available on HP-UX)
>
> SYNOPSIS
> mktemp [-c] [-d directory_name] [-p prefix]
>
> Resolved 'subdir/file3' using previous resolution.
> Automatic merge failed; fix conflicts and then commit the result.
> + git mergetool --no-prompt --tool myecho -- both
> + 1> actual
> error: mktemp is needed when 'mergetool.writeToTemp' is true
> error: last command exited with $?=1
> not ok 18 - temporary filenames are used with mergetool.writeToTemp
>
>
> t/t7800-difftool.sh
> -------------------
> HP-UX doesn't have readlink
>
> + git difftool --dir-diff --symlink --extcmd ./.git/CHECK_SYMLINKS branch HEAD
> ./.git/CHECK_SYMLINKS: line 5: readlink: command not found
> ./.git/CHECK_SYMLINKS: line 5: readlink: command not found
> ./.git/CHECK_SYMLINKS: line 5: readlink: command not found
> /pro/3gl/LINUX/git-2.3.0p/git-difftool line 472: No such file or directory
> fatal: 'difftool' appears to be a git command, but we were not
> able to execute it. Maybe git-difftool is broken?
> error: last command exited with $?=128
> not ok 49 - difftool --dir-diff --symlink without unstaged changes
>
>
> t/t8005-blame-i18n.sh
> ---------------------
> SJIS again, I DO NOT CARE!
>
> + 1> actual
> + test_cmp actual expected
> actual expected differ: char 56, line 3
> error: last command exited with $?=1
> not ok 2 - blame respects i18n.commitencoding
>
^ permalink raw reply [relevance 0%]
* Re: Interested in helping open source friends on HP-UX?
2015-02-18 17:46 0% ` Michael J Gruber
@ 2015-02-18 18:25 0% ` Jeff King
2015-02-18 19:20 0% ` H.Merijn Brand
1 sibling, 0 replies; 200+ results
From: Jeff King @ 2015-02-18 18:25 UTC (permalink / raw)
To: Michael J Gruber; +Cc: H.Merijn Brand, git, Junio C Hamano
On Wed, Feb 18, 2015 at 06:46:04PM +0100, Michael J Gruber wrote:
> >> H. Merijn Brand runs a few HP-UX boxes to help perl5 and other open
> >> source communities, wants help porting more recent Git on these
> >> boxes, running HP-UX 10.20, 11.00, and 11.23, and looking for a
> >> volunteer. Please contact him directly if you are interested.
> >
> > No-one. Disappointing :(
>
> Well, how can we help if we don't even know the limitations of that
> platform?
I'm not sure, but I think the original call for help may have been "I
will give you shell access to these boxes if you want to play around".
> > t/t7001-mv.t
> > ------------
> > cp uses -P flag, which is unknown to HP's (non-GNU) version of cp
> >
> > Changing the two occurrences from
> >
> > cp -R -P -p ../.git/modules/sub .git &&
> > to
> > rsync -aHl ../.git/modules/sub/ .git/ &&
> >
> > make the tests pass (on those systems that have a working rsync)
>
> "rsync -r -l -o -p -t" would be the proper equivalent. -aH does more for
> my rsync. I don't know what HP-UX rsync understands, though.
It seems like we could use
(cd src && tar cf - .) | (cd dst && tar xf -)
here as a more portable alternative. I don't think we can rely on rsync
being everywhere.
-Peff
^ permalink raw reply [relevance 0%]
* Re: Interested in helping open source friends on HP-UX?
2015-02-18 17:46 0% ` Michael J Gruber
2015-02-18 18:25 0% ` Jeff King
@ 2015-02-18 19:20 0% ` H.Merijn Brand
1 sibling, 0 replies; 200+ results
From: H.Merijn Brand @ 2015-02-18 19:20 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git, Junio C Hamano
[-- Attachment #1: Type: text/plain, Size: 13407 bytes --]
On Wed, 18 Feb 2015 18:46:04 +0100, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> H.Merijn Brand venit, vidit, dixit 18.02.2015 17:00:
> > On Wed, 10 Dec 2014 23:46:25 -0800, Junio C Hamano <gitster@pobox.com>
> > wrote:
> >
> >> Hello, all.
> >>
> >> H. Merijn Brand runs a few HP-UX boxes to help perl5 and other open
> >> source communities, wants help porting more recent Git on these
> >> boxes, running HP-UX 10.20, 11.00, and 11.23, and looking for a
> >> volunteer. Please contact him directly if you are interested.
> >
> > No-one. Disappointing :(
>
> Well, how can we help if we don't even know the limitations of that
> platform?
I have offered to give any serious git developer an HP-UX account, so
one can found out themselves. I can then - hopefully - answer any
remaining question.
> In short, you are putting additional restrictions in by not having GNU
> tools around.
There *are* GNU tools around, and I *can* add other tools. I - of
course - cannot install *all* GNU tools. I don't put serious
restrictions on the wishes of developers. You ask we play. Mostly.
The problem here is that I can configure, build, and test any tool
(git) on my system using every GNU tool I might have available, but
once I convert this build into a package/distribution, and people
around the world download it and expect it to work, it will fail if
the tool (git) depends on available system commands that now do not
meet the needs of the tool (git).
Note that I have put TAR = gtar in config.mak.uname, but it is not
consistently used
> > Did *anyone* ever test with NO_ICONV?
> > Too many tests fail without iconv
>
> There is iconv the library and iconv the command. With NO_ICONV, many
> tests fail for me even on my standard Linux distro. But our tests keep
> using iconv the command. The subtests which pass in t3900, for example,
> mostly test that certain things fail, for one reason or another...
>
> But we should guard a few tests in case of NO_ICONV, of course, and
> probably not use iconv the command in this case either.
>
> > It is *very* hard to decide from the current status if all
> > remaining failures are related to (Asian) locale failures and (thus)
> > can be safely ignored (in my environment).
> >
> > Specifics at the end
> >
> >
> > FAILures from scratch with no iconv:
> > --------------------------------------------------------------------------------
> > t3513-revert-submodule.sh Tests: 14 Failed: 5 Failed tests: 1-2, 4, 6-7 TODO passed: 10-11
> > t3900-i18n-commit.sh Tests: 34 Failed: 8 Failed tests: 15-17, 23-25, 27-28
> > t3901-i18n-patch.sh Tests: 15 Failed: 8 Failed tests: 2-3, 6-7, 9, 11, 14-15
> > t4041-diff-submodule-option.sh Tests: 44 Failed: 5 Failed tests: 5-7, 9-10
> > t4201-shortlog.sh Tests: 11 Failed: 1 Failed tests: 9
> > t4204-patch-id.sh Tests: 15 Failed: 3 Failed tests: 7, 10, 13
> > t4205-log-pretty-formats.sh Tests: 46 Failed: 20 Failed tests: 12-14, 17, 19, 21, 23-29, 31, 33, 35, 37 39, 41-42
> > t4210-log-i18n.sh Tests: 5 Failed: 4 Failed tests: 2-5
> > t5100-mailinfo.sh Tests: 35 Failed: 11 Failed tests: 20-30
> > t5570-git-daemon.sh Tests: 12 Failed: 2 Failed tests: 4-5 Parse errors: No plan found in TAP output
> > t6006-rev-list-format.sh Tests: 54 Failed: 11 Failed tests: 9-10, 12, 25-27, 30-34
> > t6041-bisect-submodule.sh Tests: 14 Failed: 9 Failed tests: 1-2, 4-7, 12-14 TODO passed: 10-11
> > t7001-mv.sh Tests: 46 Failed: 2 Failed tests: 38-39
> > t7102-reset.sh Tests: 30 Failed: 1 Failed tests: 2
> > t7610-mergetool.sh Tests: 18 Failed: 1 Failed tests: 18
> > t7800-difftool.sh Tests: 56 Failed: 1 Failed tests: 49
> > t8005-blame-i18n.sh Tests: 5 Failed: 3 Failed tests: 2-4
> > t9350-fast-export.sh Tests: 34 Failed: 1 Failed tests: 4
> > Files=687, Tests=12091
> >
> > FAILures from scratch with iconv:
> > --------------------------------------------------------------------------------
> > t3513-revert-submodule.sh Tests: 14 Failed: 5 Failed tests: 1-2, 4, 6-7 TODO passed: 10-11
> > t3900-i18n-commit.sh Tests: 34 Failed: 6 Failed tests: 16-17, 24-25, 27-28
> > t4204-patch-id.sh Tests: 15 Failed: 3 Failed tests: 7, 10, 13
> > t4210-log-i18n.sh Tests: 5 Failed: 4 Failed tests: 2-5
> > t5100-mailinfo.sh Tests: 35 Failed: 2 Failed tests: 20, 23
> > t5536-fetch-conflicts.sh Tests: 7 Failed: 3 Failed tests: 3, 6-7
> > t5570-git-daemon.sh Tests: 12 Failed: 2 Failed tests: 4-5 Parse errors: No plan found in TAP output
> > t6041-bisect-submodule.sh Tests: 14 Failed: 9 Failed tests: 1-2, 4-7, 12-14 TODO passed: 10-11
> > t7001-mv.sh Tests: 46 Failed: 2 Failed tests: 38-39
> > t7610-mergetool.sh Tests: 18 Failed: 1 Failed tests: 18
> > t7800-difftool.sh Tests: 56 Failed: 1 Failed tests: 49
> > t8005-blame-i18n.sh Tests: 5 Failed: 3 Failed tests: 2-4
> > Files=687, Tests=12091
> > Result: FAIL
> >
> > running «sh t****.sh -x -i»
> >
> >
> > t/t7001-mv.t
> > ------------
> > cp uses -P flag, which is unknown to HP's (non-GNU) version of cp
> >
> > Changing the two occurrences from
> >
> > cp -R -P -p ../.git/modules/sub .git &&
> > to
> > rsync -aHl ../.git/modules/sub/ .git/ &&
> >
> > make the tests pass (on those systems that have a working rsync)
>
> "rsync -r -l -o -p -t" would be the proper equivalent. -aH does more for
> my rsync. I don't know what HP-UX rsync understands, though.
HP has no rsync. I installed it myself.
As HP does not have rsync, it does not conflict. If I would install cp
however, I bet many system-tasks could fall over.
> > t/t3513-revert-submodule.sh
> > ---------------------------
> > tar uses z flag, which is unknown to HP's (non-GNU) version of tar
> > config.mak.uname defines TAR = gtar, but that obviously does not help
> >
> > putting GNU-tar temporary in from of my $PATH makes the test pass
> > /me thinks the z in not required in that test at all
> >
> > tar cf "$TRASH_DIRECTORY/tmp.tar" * &&
> > and
> > tar xf "$TRASH_DIRECTORY/tmp.tar" &&
> >
> > work just as well and prevent the breakage
>
> We can do without z.
TOP!
> > t/t3900-i18n-commit.sh
> > ----------------------
> > As my HP boxes have *NO* JP or other space eating asian locale stuff
> > installed, it is highly likely that *anything* dealing with asian
> > locales will fail. On modern Linux hardware, disk space is cheap. On
> > most HP-UX boxes disk space is expensive and when having nothing to do
> > with Asian languages, removing all Asian-related packages is a fast and
> > cheap way to regain disk space.
> >
> > Changing compare_with to
> >
> > compare_with () {
> > case "$1$2$3" in
> > *eucJP*|*ISO-2022-JP*) true ;;
> > *)
> > git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' >current &&
> > case "$3" in
> > '')
> > test_cmp "$2" current ;;
> > ?*)
> > iconv -f "$3" -t UTF-8 >current.utf8 <current &&
> > iconv -f "$3" -t UTF-8 >expect.utf8 <"$2" &&
> > test_cmp expect.utf8 current.utf8
> > ;;
> > esac
> > ;;
> > esac
> > }
> >
> > makes all my tests pass
>
> So you do have iconv the command, but don't want to link with the library?
Maybe it is too old?
$ iconv --version
iconv (GNU libiconv 1.14)
Copyright (C) 2000-2011 Free Software Foundation, Inc.
> Availability of the locales should be covered by a prerequisite, like we
> do in t9129.
>
> > t/t4204-patch-id.sh
> > -------------------
> >
> > No idea yet
> >
> > + test_patch_id_file_order irrelevant --stable --stable
> > Already on 'same'
> > cmp: patch-id_ordered-ordered-order---stable-irrelevant: No such file or directory
> >
> > $ find * | grep 4204 | grep stable
> > trash directory.t4204-patch-id/patch-id_order---stable-irrelevant
> > trash directory.t4204-patch-id/patch-id_ordered-order---stable-irrelevant
>
> The "Already"-part is normal output. The rest looks a bit crazy - and
> shell related?
I have set SHELL_PATH = /pro/local/bin/bash
The default /bin/sh on HP-UX is almost as bare as the old bourne shell
So, shell related? Likely!
> > t/t4210-log-i18n
> > ----------------
> >
> > $ dump "trash directory.t4210-log-i18n/actual"
> > 00000000 75 74 66 38 0A utf8.
> > $ dump "trash directory.t4210-log-i18n/expect"
> > 00000000 6C 61 74 69 6E 31 0A 75 74 66 38 0A latin1.utf8.
> > $ dump "trash directory.t4210-log-i18n/msg"
> > 00000000 6C 61 74 69 6E 31 0A 0A 74 E9 73 74 0A latin1..t.st.
> >
> > t/t5100-mailinfo.sh
> > -------------------
> > + git mailinfo -u rfc2047/0001-msg rfc2047/0001-patch
> > + 0< rfc2047/0001 1> rfc2047/0001-info
> > fatal: cannot convert from US-ASCII to UTF-8
> > error: last command exited with $?=128
>
> Is that mailinfo erroring out? Do you have those locales?
$ locale -a
C
POSIX
C.iso88591
C.iso885915
C.utf8
univ.utf8
nl_NL.iso88591
nl_NL.iso885915@euro
nl_NL.roman8
en_GB.iso88591
en_GB.iso885915@euro
en_GB.roman8
en_US.iso88591
en_US.roman8
nl_NL.utf8
en_GB.utf8
en_US.utf8
> OK, I'll have to stop fishing in the dark here.
>
> > t/t5536-fetch-conflicts.sh
> > --------------------------
> > + setup_repository ccc +refs/heads/branch1:refs/remotes/origin/branch1 +refs/heads/branch2:refs/remotes/origin/branch1
> > Initialized empty Git repository in /pro/3gl/LINUX/git-2.3.0p/t/trash directory.t5536-fetch-conflicts/ccc/.git/
> > + cd ccc
> > + test_must_fail git fetch origin
> > + 2> error
> > + verify_stderr
> > + 0< /var/tmp/sh6096.2
> > cmp: EOF on actual
> > error: last command exited with $?=1
> > not ok 3 - fetch conflict: config vs. config
> >
> > t/t5570-git-daemon.sh
> > ---------------------
> > I will ignore this myself, as I have no intention of using HP-UX as a
> > git server. We already have a dedicated Linux box doing so.
> >
> > + test_cmp file clone/file
> > ok 3 - clone git repository
> >
> > expecting success:
> > echo content >>file &&
> > git commit -a -m two &&
> > git push public &&
> > (cd clone && git pull) &&
> > test_cmp file clone/file
> >
> > + echo content
> > + 1>> file
> > + git commit -a -m two
> >
> > arg sulong failed. 0, 0x9fffffffbffff058
> >
> > Setup args failed.
> >
> > Pid 6238 was killed due to failure in writing to user register stack - possible stack overflow.
> > [master bca99f0] two
> > Author: A U Thor <author@example.com>
> > 1 file changed, 1 insertion(+)
> > + git push public
> >
> > t/t6041-bisect-submodule.sh
> > ---------------------------
> > config.mak.uname defines TAR = gtar, but that obviously does not help
> >
> > + git_bisect add_sub1
> > tar: z: unknown option
> > tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
> >
> > changing my $PATH to have a GNU tar in front makes all tests pass
> >
> >
> > t/t7610-mergetool.sh
> > --------------------
> > HP-UX' mktemp obviously is not compatible with GNU mktemp (which I have
> > not installed/available on HP-UX)
> >
> > SYNOPSIS
> > mktemp [-c] [-d directory_name] [-p prefix]
> >
> > Resolved 'subdir/file3' using previous resolution.
> > Automatic merge failed; fix conflicts and then commit the result.
> > + git mergetool --no-prompt --tool myecho -- both
> > + 1> actual
> > error: mktemp is needed when 'mergetool.writeToTemp' is true
> > error: last command exited with $?=1
> > not ok 18 - temporary filenames are used with mergetool.writeToTemp
> >
> >
> > t/t7800-difftool.sh
> > -------------------
> > HP-UX doesn't have readlink
> >
> > + git difftool --dir-diff --symlink --extcmd ./.git/CHECK_SYMLINKS branch HEAD
> > ./.git/CHECK_SYMLINKS: line 5: readlink: command not found
> > ./.git/CHECK_SYMLINKS: line 5: readlink: command not found
> > ./.git/CHECK_SYMLINKS: line 5: readlink: command not found
> > /pro/3gl/LINUX/git-2.3.0p/git-difftool line 472: No such file or directory
> > fatal: 'difftool' appears to be a git command, but we were not
> > able to execute it. Maybe git-difftool is broken?
> > error: last command exited with $?=128
> > not ok 49 - difftool --dir-diff --symlink without unstaged changes
> >
> >
> > t/t8005-blame-i18n.sh
> > ---------------------
> > SJIS again, I DO NOT CARE!
> >
> > + 1> actual
> > + test_cmp actual expected
> > actual expected differ: char 56, line 3
> > error: last command exited with $?=1
> > not ok 2 - blame respects i18n.commitencoding
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [relevance 0%]
* [PATCH 06/25] t: use verbose instead of hand-rolled errors
@ 2015-03-20 10:09 10% ` Jeff King
0 siblings, 0 replies; 200+ results
From: Jeff King @ 2015-03-20 10:09 UTC (permalink / raw)
To: git
Many tests that predate the "verbose" helper function use a
pattern like:
test ... || {
echo ...
false
}
to give more verbose output. Using the helper, we can do
this with a single line, and avoid a || which interacts
badly with &&-chaining (besides fooling --chain-lint, we hit
the error block no matter which command in the chain failed,
so we may often show useless results).
In most cases, the messages printed by "verbose" are equally
good (in some cases better; t6006 accidentally redirects the
message to a file!). The exception is t7001, whose output
suffers slightly. However, it's still enough to show the
user which part failed, given that we will have just printed
the test script to stderr.
Signed-off-by: Jeff King <peff@peff.net>
---
t/t4022-diff-rewrite.sh | 5 +----
t/t4202-log.sh | 30 +++++-------------------------
t/t6006-rev-list-format.sh | 5 +----
t/t7001-mv.sh | 5 +----
t/t7300-clean.sh | 10 ++--------
5 files changed, 10 insertions(+), 45 deletions(-)
diff --git a/t/t4022-diff-rewrite.sh b/t/t4022-diff-rewrite.sh
index 2d030a4..cb51d9f 100755
--- a/t/t4022-diff-rewrite.sh
+++ b/t/t4022-diff-rewrite.sh
@@ -20,10 +20,7 @@ test_expect_success setup '
test_expect_success 'detect rewrite' '
actual=$(git diff-files -B --summary test) &&
- expr "$actual" : " rewrite test ([0-9]*%)$" || {
- echo "Eh? <<$actual>>"
- false
- }
+ verbose expr "$actual" : " rewrite test ([0-9]*%)$"
'
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index a22ac7c..85230a8 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -113,11 +113,7 @@ test_expect_success 'diff-filter=M' '
actual=$(git log --pretty="format:%s" --diff-filter=M HEAD) &&
expect=$(echo second) &&
- test "$actual" = "$expect" || {
- echo Oops
- echo "Actual: $actual"
- false
- }
+ verbose test "$actual" = "$expect"
'
@@ -125,11 +121,7 @@ test_expect_success 'diff-filter=D' '
actual=$(git log --pretty="format:%s" --diff-filter=D HEAD) &&
expect=$(echo sixth ; echo third) &&
- test "$actual" = "$expect" || {
- echo Oops
- echo "Actual: $actual"
- false
- }
+ verbose test "$actual" = "$expect"
'
@@ -137,11 +129,7 @@ test_expect_success 'diff-filter=R' '
actual=$(git log -M --pretty="format:%s" --diff-filter=R HEAD) &&
expect=$(echo third) &&
- test "$actual" = "$expect" || {
- echo Oops
- echo "Actual: $actual"
- false
- }
+ verbose test "$actual" = "$expect"
'
@@ -149,11 +137,7 @@ test_expect_success 'diff-filter=C' '
actual=$(git log -C -C --pretty="format:%s" --diff-filter=C HEAD) &&
expect=$(echo fourth) &&
- test "$actual" = "$expect" || {
- echo Oops
- echo "Actual: $actual"
- false
- }
+ verbose test "$actual" = "$expect"
'
@@ -161,11 +145,7 @@ test_expect_success 'git log --follow' '
actual=$(git log --follow --pretty="format:%s" ichi) &&
expect=$(echo third ; echo second ; echo initial) &&
- test "$actual" = "$expect" || {
- echo Oops
- echo "Actual: $actual"
- false
- }
+ verbose test "$actual" = "$expect"
'
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 2b7c0f0..b77d4c9 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -358,10 +358,7 @@ test_expect_success 'empty email' '
test_tick &&
C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&
A=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&
- test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700" || {
- echo "Eh? $A" >failure
- false
- }
+ verbose test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700"
'
test_expect_success 'del LF before empty (1)' '
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 69f11bd..7b56081 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -161,10 +161,7 @@ test_expect_success "Michael Cassar's test case" '
git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
T=`git write-tree` &&
- git ls-tree -r $T | grep partA/outline.txt || {
- git ls-tree -r $T
- (exit 1)
- }
+ git ls-tree -r $T | verbose grep partA/outline.txt
'
rm -fr papers partA path?
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 04118ad..99be5d9 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -119,10 +119,7 @@ test_expect_success C_LOCALE_OUTPUT 'git clean with relative prefix' '
git clean -n ../src |
sed -n -e "s|^Would remove ||p"
) &&
- test "$would_clean" = ../src/part3.c || {
- echo "OOps <$would_clean>"
- false
- }
+ verbose test "$would_clean" = ../src/part3.c
'
test_expect_success C_LOCALE_OUTPUT 'git clean with absolute path' '
@@ -134,10 +131,7 @@ test_expect_success C_LOCALE_OUTPUT 'git clean with absolute path' '
git clean -n "$(pwd)/../src" |
sed -n -e "s|^Would remove ||p"
) &&
- test "$would_clean" = ../src/part3.c || {
- echo "OOps <$would_clean>"
- false
- }
+ verbose test "$would_clean" = ../src/part3.c
'
test_expect_success 'git clean with out of work tree relative path' '
--
2.3.3.520.g3cfbb5d
^ permalink raw reply related [relevance 10%]
* [PATCH] wt-status: use strncmp() for length-limited string comparison
@ 2015-11-06 22:47 4% René Scharfe
0 siblings, 1 reply; 200+ results
From: René Scharfe @ 2015-11-06 22:47 UTC (permalink / raw)
To: Git List; +Cc: Junio C Hamano, Matthieu Moy
When a branch name is longer than four characters, memcmp() can read
past the end of the string literal "HEAD". Use strncmp() instead, which
stops at the end of a string. This fixes the following test failures
with AddressSanitizer:
t3203-branch-output.sh (Wstat: 256 Tests: 18 Failed: 4)
Failed tests: 12, 15-17
Non-zero exit status: 1
t3412-rebase-root.sh (Wstat: 256 Tests: 31 Failed: 3)
Failed tests: 28-29, 31
Non-zero exit status: 1
t3507-cherry-pick-conflict.sh (Wstat: 256 Tests: 31 Failed: 4)
Failed tests: 14, 29-31
Non-zero exit status: 1
t3510-cherry-pick-sequence.sh (Wstat: 256 Tests: 39 Failed: 14)
Failed tests: 17, 22-26, 28-30, 34-35, 37-39
Non-zero exit status: 1
t3420-rebase-autostash.sh (Wstat: 256 Tests: 28 Failed: 4)
Failed tests: 24-27
Non-zero exit status: 1
t3404-rebase-interactive.sh (Wstat: 256 Tests: 91 Failed: 57)
Failed tests: 17, 19, 21-42, 44, 46-74, 77, 81-82
Non-zero exit status: 1
t3900-i18n-commit.sh (Wstat: 256 Tests: 34 Failed: 1)
Failed test: 34
Non-zero exit status: 1
t5407-post-rewrite-hook.sh (Wstat: 256 Tests: 14 Failed: 6)
Failed tests: 9-14
Non-zero exit status: 1
t7001-mv.sh (Wstat: 256 Tests: 46 Failed: 5)
Failed tests: 39-43
Non-zero exit status: 1
t7509-commit.sh (Wstat: 256 Tests: 12 Failed: 2)
Failed tests: 11-12
Non-zero exit status: 1
t7512-status-help.sh (Wstat: 256 Tests: 39 Failed: 35)
Failed tests: 5-39
Non-zero exit status: 1
t6030-bisect-porcelain.sh (Wstat: 256 Tests: 70 Failed: 1)
Failed test: 13
Non-zero exit status: 1
Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
wt-status.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wt-status.c b/wt-status.c
index 435fc28..8dc281b 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1319,7 +1319,7 @@ static int grab_1st_switch(unsigned char *osha1, unsigned char *nsha1,
hashcpy(cb->nsha1, nsha1);
for (end = target; *end && *end != '\n'; end++)
;
- if (!memcmp(target, "HEAD", end - target)) {
+ if (!strncmp(target, "HEAD", end - target)) {
/* HEAD is relative. Resolve it to the right reflog entry. */
strbuf_addstr(&cb->buf,
find_unique_abbrev(nsha1, DEFAULT_ABBREV));
--
2.6.3
^ permalink raw reply related [relevance 4%]
* [PATCH v2] wt-status: correct and simplify check for detached HEAD
@ 2015-11-25 14:10 4% ` René Scharfe
0 siblings, 0 replies; 200+ results
From: René Scharfe @ 2015-11-25 14:10 UTC (permalink / raw)
To: Jeff King; +Cc: Git List, Junio C Hamano, Matthieu Moy, Duy Nguyen
If a branch name is longer than four characters then memcmp() reads over
the end of the static string "HEAD". This causes the following test
failures with AddressSanitizer:
t3203-branch-output.sh (Wstat: 256 Tests: 18 Failed: 4)
Failed tests: 12, 15-17
Non-zero exit status: 1
t3412-rebase-root.sh (Wstat: 256 Tests: 31 Failed: 3)
Failed tests: 28-29, 31
Non-zero exit status: 1
t3507-cherry-pick-conflict.sh (Wstat: 256 Tests: 31 Failed: 4)
Failed tests: 14, 29-31
Non-zero exit status: 1
t3510-cherry-pick-sequence.sh (Wstat: 256 Tests: 39 Failed: 14)
Failed tests: 17, 22-26, 28-30, 34-35, 37-39
Non-zero exit status: 1
t3420-rebase-autostash.sh (Wstat: 256 Tests: 28 Failed: 4)
Failed tests: 24-27
Non-zero exit status: 1
t3404-rebase-interactive.sh (Wstat: 256 Tests: 91 Failed: 57)
Failed tests: 17, 19, 21-42, 44, 46-74, 77, 81-82
Non-zero exit status: 1
t3900-i18n-commit.sh (Wstat: 256 Tests: 34 Failed: 1)
Failed test: 34
Non-zero exit status: 1
t5407-post-rewrite-hook.sh (Wstat: 256 Tests: 14 Failed: 6)
Failed tests: 9-14
Non-zero exit status: 1
t7001-mv.sh (Wstat: 256 Tests: 46 Failed: 5)
Failed tests: 39-43
Non-zero exit status: 1
t7509-commit.sh (Wstat: 256 Tests: 12 Failed: 2)
Failed tests: 11-12
Non-zero exit status: 1
t7512-status-help.sh (Wstat: 256 Tests: 39 Failed: 35)
Failed tests: 5-39
Non-zero exit status: 1
t6030-bisect-porcelain.sh (Wstat: 256 Tests: 70 Failed: 1)
Failed test: 13
Non-zero exit status: 1
And if a branch is named "H", "HE", or "HEA" then the current if clause
erroneously considers it as matching "HEAD" because it only compares
up to the end of the branch name.
Fix that by doing the comparison using strcmp() and only after the
branch name is extracted. This way neither too less nor too many
characters are checked. While at it call strchrnul() to find the end
of the branch name instead of open-coding it.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
We can be more careful when parsing -- or avoid parsing and backtrack
if we found "HEAD" after all. The latter is simpler, and string
parsing is tricky enough that we better take such opportunities to
simplify the code..
Changes since v1:
* strcmp() instead of strncmp()
* strchrnul() (unrelated cleanup)
* adjusted subject (and commit message)
wt-status.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 435fc28..ced53dd 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1317,15 +1317,14 @@ static int grab_1st_switch(unsigned char *osha1, unsigned char *nsha1,
target += strlen(" to ");
strbuf_reset(&cb->buf);
hashcpy(cb->nsha1, nsha1);
- for (end = target; *end && *end != '\n'; end++)
- ;
- if (!memcmp(target, "HEAD", end - target)) {
+ end = strchrnul(target, '\n');
+ strbuf_add(&cb->buf, target, end - target);
+ if (!strcmp(cb->buf.buf, "HEAD")) {
/* HEAD is relative. Resolve it to the right reflog entry. */
+ strbuf_reset(&cb->buf);
strbuf_addstr(&cb->buf,
find_unique_abbrev(nsha1, DEFAULT_ABBREV));
- return 1;
}
- strbuf_add(&cb->buf, target, end - target);
return 1;
}
--
2.6.3
^ permalink raw reply related [relevance 4%]
* [PATCH 00/10] use the $( ... ) construct for command substitution
@ 2016-01-07 13:51 6% Elia Pinto
2016-01-07 13:51 18% ` [PATCH 07/10] t/t7001-mv.sh: " Elia Pinto
0 siblings, 1 reply; 200+ results
From: Elia Pinto @ 2016-01-07 13:51 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
This patch series continues the changes introduced with the merge
6753d8a85d543253d95184ec2faad6dc197f248:
Merge branch 'ep/shell-command-substitution'
Adjust shell scripts to use $(cmd) instead of `cmd`.
This is the sixth series, the other will be sent separately.
Elia Pinto (10):
t/t5900-repo-selection.sh: use the $( ... ) construct for command
substitution
t/t6001-rev-list-graft.sh: use the $( ... ) construct for command
substitution
t/t6002-rev-list-bisect.sh: use the $( ... ) construct for command
substitution
t/t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for
command substitution
t/t6032-merge-large-rename.sh: use the $( ... ) construct for command
substitution
t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command
substitution
t/t7001-mv.sh: use the $( ... ) construct for command substitution
t/t7003-filter-branch.sh: use the $( ... ) construct for command
substitution
t/t7004-tag.sh: use the $( ... ) construct for command substitution
t/t7006-pager.sh: use the $( ... ) construct for command substitution
t/t5900-repo-selection.sh | 2 +-
t/t6001-rev-list-graft.sh | 12 ++++++------
t/t6002-rev-list-bisect.sh | 6 +++---
t/t6015-rev-list-show-all-parents.sh | 6 +++---
t/t6032-merge-large-rename.sh | 2 +-
t/t6132-pathspec-exclude.sh | 2 +-
t/t7001-mv.sh | 4 ++--
t/t7003-filter-branch.sh | 6 +++---
t/t7004-tag.sh | 16 ++++++++--------
t/t7006-pager.sh | 2 +-
10 files changed, 29 insertions(+), 29 deletions(-)
--
2.3.3.GIT
^ permalink raw reply [relevance 6%]
* [PATCH 07/10] t/t7001-mv.sh: use the $( ... ) construct for command substitution
2016-01-07 13:51 6% [PATCH 00/10] use the $( ... ) construct for command substitution Elia Pinto
@ 2016-01-07 13:51 18% ` Elia Pinto
0 siblings, 0 replies; 200+ results
From: Elia Pinto @ 2016-01-07 13:51 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.
The backquoted form is the traditional method for command
substitution, and is supported by POSIX. However, all but the
simplest uses become complicated quickly. In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.
The patch was generated by:
for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}"
done
and then carefully proof-read.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
t/t7001-mv.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 7b56081..51dd2b4 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -156,11 +156,11 @@ test_expect_success "Michael Cassar's test case" '
echo b > partA/outline.txt &&
echo c > papers/unsorted/_another &&
git add papers partA &&
- T1=`git write-tree` &&
+ T1=$(git write-tree) &&
git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
- T=`git write-tree` &&
+ T=$(git write-tree) &&
git ls-tree -r $T | verbose grep partA/outline.txt
'
--
2.3.3.GIT
^ permalink raw reply related [relevance 18%]
* What's cooking in git.git (Jan 2016, #02; Mon, 11)
@ 2016-01-11 23:45 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2016-01-11 23:45 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'. The ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.
It's been a week or so since Git 2.7 was released. I'll draw the
projected timeline for the next cycle (which I expect to be a
shorter and lightweight cycle), reorder 'next' and possibly eject a
few topics from it to give them a fresh slate to rebuild on, and
then start the 2.7.x maintenance track soonish, but none of these
has happened yet; I'm feeling behind X-<.
Big thanks to Stephen Smith for picking up a few topics from the
Stalled pile and reviving them. And as always, thanks for the
regular reviewers (you know who you are) for helping the topics
move forward.
You can find the changes described here in the integration branches of the
repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[New Topics]
* dw/signoff-doc (2016-01-05) 1 commit
- Expand documentation describing --signoff
The documentation has been updated to hint the connection between
the '--signoff' option and DCO.
Will merge to 'next'.
* ew/for-each-ref-doc (2016-01-05) 1 commit
- for-each-ref: document `creatordate` and `creator` fields
Will merge to 'next'.
* sg/t6050-failing-editor-test-fix (2016-01-05) 1 commit
- t6050-replace: make failing editor test more robust
Will merge to 'next'.
* js/dirname-basename (2016-01-11) 4 commits
- t0060: verify that basename() and dirname() work as expected
- compat/basename.c: provide a dirname() compatibility function
- compat/basename: make basename() conform to POSIX
- Refactor skipping DOS drive prefixes
dirname() emulation has been added, as Msys2 lacks it.
Will merge to 'next', 'master', and then to 'maint'.
The third-patch has an optional suggestion to make it easier to
follow; I'm slightly in favor but lack of a reroll for it is not a
showstopper, either.
* js/fopen-harder (2016-01-11) 2 commits
- Handle more file writes correctly in shared repos
- commit: allow editing the commit message even in shared repos
Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
(e.g. COMMIT_EDITMSG) that is meant to be left after the command is
done. This however did not work well if the repository is set to
be shared with core.sharedRepository and the umask of the previous
user is tighter. Make them work better by calling unlink(2) and
retrying after fopen(3) fails with EPERM.
Will merge to 'next'.
* nd/exclusion-regression-fix (2016-01-08) 1 commit
- Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
The ignore mechanism saw a few regressions around untracked file
listing and sparse checkout selection areas in 2.7.0; the change
that is responsible for the regression has been reverted.
Will merge to 'next' and then to 'master'.
* ss/clone-depth-single-doc (2016-01-08) 3 commits
- docs: clarify that --depth for git-fetch works with newly initialized repos
- docs: say "commits" in the --depth option wording for git-clone
- docs: clarify that passing --depth to git-clone implies --single-branch
Updates documents to clarify "git fetch --depth".
Will merge to 'next'.
--------------------------------------------------
[Stalled]
* kf/http-proxy-auth-methods (2015-11-04) 3 commits
. SQUASH???
. http: use credential API to handle proxy authentication
. http: allow selection of proxy authentication method
New http.proxyAuthMethod configuration variable can be used to
specify what authentication method to use, as a way to work around
proxies that do not give error response expected by libcurl when
CURLAUTH_ANY is used. Also, the codepath for proxy authentication
has been taught to use credential API to store the authentication
material in user's keyrings.
I ejected this from pu for the moment, as it conflicts with the
pt/http-socks-proxy topic. That is now in master, so it can
be re-rolled on top.
Anybody wants to help rerolling this? Otherwise will discard.
* mg/httpd-tests-update-for-apache-2.4 (2015-04-08) 2 commits
- t/lib-git-svn: check same httpd module dirs as lib-httpd
- t/lib-httpd: load mod_unixd
This is the first two commits in a three-patch series $gmane/266962
Becoming tired of waiting for a reroll.
with updated log message ($gmane/268061).
Will discard.
* jc/diff-b-m (2015-02-23) 5 commits
. WIPWIP
. WIP: diff-b-m
- diffcore-rename: allow easier debugging
- diffcore-rename.c: add locate_rename_src()
- diffcore-break: allow debugging
"git diff -B -M" produced incorrect patch when the postimage of a
completely rewritten file is similar to the preimage of a removed
file; such a resulting file must not be expressed as a rename from
other place.
The fix in this patch is broken, unfortunately.
Will discard.
--------------------------------------------------
[Cooking]
* wp/sha1-name-negative-match (2016-01-11) 2 commits
- object name: introduce '^{/!-<negative pattern>}' notation
- test for '!' handling in rev-parse's named commits
Introduce "<branch>^{/!-<pattern>}" notation to name a commit
reachable from <branch> that does not match the given <pattern>.
* ak/format-patch-odir-config (2016-01-11) 1 commit
. format-patch: introduce format.outputDirectory configuration
Allow "-o <dir>" option to be omitted on the command line of "git
format-patch" if you always use the same directory in your
workflow.
Left out of 'pu' for now as t4014 seems to break with this topic.
* jk/notes-merge-from-anywhere (2015-12-29) 1 commit
- notes: allow merging from arbitrary references
"git notes merge" used to limit the source of the merged notes tree
to somewhere under refs/notes/ hierarchy, which was too limiting
when inventing a workflow to exchange notes with remote
repositories using remote-tracking notes trees (located in e.g.
refs/remote-notes/ or somesuch).
Needs review.
* dk/reflog-walk-with-non-commit (2016-01-05) 1 commit
- reflog-walk: don't segfault on non-commit sha1's in the reflog
"git reflog" incorrectly assumed that all objects that used to be
at the tip of a ref must be commits, which caused it to segfault.
Will merge to 'next'.
* ew/send-email-mutt-alias-fix (2016-01-04) 1 commit
- git-send-email: do not double-escape quotes from mutt
"git send-email" was confused by escaped quotes stored in the alias
files saved by "mutt".
Will merge to 'next'.
* jk/clang-pedantic (2016-01-04) 2 commits
- bswap: add NO_UNALIGNED_LOADS define
- avoid shifting signed integers 31 bits
A few unportable C construct have been spotted by clang compiler
and have been fixed.
Will merge to 'next'.
* ea/blame-progress (2015-12-16) 1 commit
(merged to 'next' on 2015-12-22 at f8e8643)
+ blame: add support for --[no-]progress option
"git blame" learned to produce the progress eye-candy when it takes
too much time before emitting the first line of the result.
Will merge to 'master'.
* dt/unpack-compare-entry-optim (2016-01-05) 1 commit
- do_compare_entry: use already-computed path
Will merge to 'next'.
* jk/pack-revindex (2015-12-21) 2 commits
- pack-revindex: store entries directly in packed_git
- pack-revindex: drop hash table
Will merge to 'next'.
* jk/symbolic-ref (2016-01-11) 5 commits
- lock_ref_sha1_basic: handle REF_NODEREF with invalid refs
- checkout,clone: check return value of create_symref
- create_symref: write reflog while holding lock
- create_symref: use existing ref-lock code
- create_symref: modernize variable names
The low-level code that is used to create symbolic references has
been updated to share more code with the code that deals with
normal references.
Will merge to 'next'.
* nd/stop-setenv-work-tree (2015-12-22) 1 commit
(merged to 'next' on 2015-12-22 at 6d7bb0c)
+ Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"
(this branch is used by nd/clear-gitenv-upon-use-of-alias.)
An earlier change in 2.5.x-era broke users' hooks and aliases by
exporting GIT_WORK_TREE to point at the root of the working tree,
interfering when they tried to use a different working tree without
setting GIT_WORK_TREE environment themselves.
Will merge to 'master'.
* ep/update-command-substitution-style (2016-01-11) 70 commits
- t/t9001-send-email.sh: use the $( ... ) construct for command substitution
- t/t8003-blame-corner-cases.sh: use the $( ... ) construct for command substitution
- t/t7700-repack.sh: use the $( ... ) construct for command substitution
- t/t7602-merge-octopus-many.sh: use the $( ... ) construct for command substitution
- t/t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for command substitution
- t/t7504-commit-msg-hook.sh: use the $( ... ) construct for command substitution
- t/t7408-submodule-reference.sh: use the $( ... ) construct for command substitution
- t/t7406-submodule-update.sh: use the $( ... ) construct for command substitution
- t/t7103-reset-bare.sh: use the $( ... ) construct for command substitution
- t/t7006-pager.sh: use the $( ... ) construct for command substitution
- t/t7004-tag.sh: use the $( ... ) construct for command substitution
- t/t7003-filter-branch.sh: use the $( ... ) construct for command substitution
- t/t7001-mv.sh: use the $( ... ) construct for command substitution
- t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution
- t/t6032-merge-large-rename.sh: use the $( ... ) construct for command substitution
- t/t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for command substitution
- t/t6002-rev-list-bisect.sh: use the $( ... ) construct for command substitution
- t/t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution
- t/t5900-repo-selection.sh: use the $( ... ) construct for command substitution
- t/t5710-info-alternate.sh: use the $( ... ) construct for command substitution
- t/t5700-clone-reference.sh: use the $( ... ) construct for command substitution
- t/t5601-clone.sh: use the $( ... ) construct for command substitution
- t/t5570-git-daemon.sh: use the $( ... ) construct for command substitution
- t/t5550-http-fetch-dumb.sh: use the $( ... ) construct for command substitution
- t/t5538-push-shallow.sh: use the $( ... ) construct for command substitution
- t/t5537-fetch-shallow.sh: use the $( ... ) construct for command substitution
- t/t5532-fetch-proxy.sh: use the $( ... ) construct for command substitution
- t/t5530-upload-pack-error.sh: use the $( ... ) construct for command substitution
- t/t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
- t/t5517-push-mirror.sh: use the $( ... ) construct for command substitution
- t/t5516-fetch-push.sh: use the $( ... ) construct for command substitution
- t/t5515-fetch-merge-logic.sh: use the $( ... ) construct for command substitution
- t/t5510-fetch.sh: use the $( ... ) construct for command substitution
- t/t5506-remote-groups.sh: use the $( ... ) construct for command substitution
- t/t5505-remote.sh: use the $( ... ) construct for command substitution
- t/t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
- t/t5305-include-tag.sh: use the $( ... ) construct for command substitution
- t/t5304-prune.sh: use the $( ... ) construct for command substitution
- t/t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substitution
- t/t5100: no need to use 'echo' command substitutions for globbing
- t/t5302-pack-index.sh: use the $( ... ) construct for command substitution
- t/t5301-sliding-window.sh: use the $( ... ) construct for command substitution
- t/t5300-pack-object.sh: use the $( ... ) construct for command substitution
- t/t5100-mailinfo.sh: use the $( ... ) construct for command substitution
- t/t3700-add.sh: use the $( ... ) construct for command substitution
- t/t3600-rm.sh: use the $( ... ) construct for command substitution
- t/t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution
- t/t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
- t/t3210-pack-refs.sh: use the $( ... ) construct for command substitution
- t/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution
- t/t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution
- t/t3030-merge-recursive.sh: use the $( ... ) construct for command substitution
- t/t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution
- t/t2025-worktree-add.sh: use the $( ... ) construct for command substitution
- t/t1700-split-index.sh: use the $( ... ) construct for command substitution
- t/t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution
- t/t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution
- t/t1410-reflog.sh: use the $( ... ) construct for command substitution
- t/t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
- t/t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution
- unimplemented.sh: use the $( ... ) construct for command substitution
- test-sha1.sh: use the $( ... ) construct for command substitution
- t/lib-httpd.sh: use the $( ... ) construct for command substitution
- git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution
- contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-revert.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-repack.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-merge.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-fetch.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-commit.sh: use the $( ... ) construct for command substitution
A shell script style update to change `command substitution` into
$(command substitution). Coverts contrib/ and much of the t/
directory contents.
Will merge to 'next'.
* nd/dir-exclude-cleanup (2015-12-28) 1 commit
- dir.c: clean the entire struct in clear_exclude_list()
The "exclude_list" structure has the usual "alloc, nr" pair of
fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot
to reset 'alloc' to 0 when it cleared 'nr' and discarded the
managed array.
Will merge to 'next'.
* ss/user-manual (2015-12-30) 4 commits
- user-manual: add addition gitweb information
- user-manual: add section documenting shallow clones
- glossary: define the term shallow clone
- user-manual: remove temporary branch entry from todo list
Drop a few old "todo" items by deciding that the change one of them
suggests is not such a good idea, and doing the change the other
one suggested to do.
Will merge to 'next'.
* nd/ita-cleanup (2015-12-28) 3 commits
- grep: make it clear i-t-a entries are ignored
- add and use a convenience macro ce_intent_to_add()
- blame: remove obsolete comment
Paths that have been told the index about with "add -N" are not
quite yet in the index, but a few commands behaved as if they
already are in a harmful way.
Here are only the obviously correct bits; some other changes were
in the posted series, but not quite ready to be queued here.
Will merge to 'next'.
* cc/untracked (2015-12-29) 10 commits
- t7063: add tests for core.untrackedCache
- config: add core.untrackedCache
- dir: simplify untracked cache "ident" field
- dir: add remove_untracked_cache()
- dir: add {new,add}_untracked_cache()
- update-index: move 'uc' var declaration
- update-index: add untracked cache notifications
- update-index: add --test-untracked-cache
- update-index: use enum for untracked cache options
- dir: free untracked cache when removing it
Update the untracked cache subsystem and change its primary UI from
"git update-index" to "git config".
Still being discussed and worked on.
$gmane/283080
* ep/make-phoney (2015-12-16) 1 commit
(merged to 'next' on 2015-12-22 at 27c7593)
+ Makefile: add missing phony target
A slight update to the Makefile.
Will merge to 'master'.
* vl/grep-configurable-threads (2015-12-16) 3 commits
(merged to 'next' on 2015-12-22 at 8954705)
+ grep: add --threads=<num> option and grep.threads configuration
+ grep: slight refactoring to the code that disables threading
+ grep: allow threading even on a single-core machine
"git grep" can now be configured (or told from the command line)
how many threads to use when searching in the working tree files.
Will merge to 'master'.
* ps/push-delete-option (2015-12-16) 2 commits
(merged to 'next' on 2015-12-22 at d83cc1d)
+ push: add '-d' as shorthand for '--delete'
+ push: add '--delete' flag to synopsis
"branch --delete" has "branch -d" but "push --delete" does not.
Will merge to 'master'.
* dt/refs-backend-lmdb (2015-12-04) 16 commits
- refs: tests for lmdb backend
- refs: add LMDB refs backend
- refs: allow ref backend to be set for clone
- init: allow alternate backends to be set for new repos
- refs: always handle non-normal refs in files backend
- refs: move duplicate check to common code
- refs: make lock generic
- refs: add method to rename refs
- refs: add methods to init refs backend and db
- refs: add method for delete_refs
- refs: add method for initial ref transaction commit
- refs: add methods for reflog
- refs: add do_for_each_per_worktree_ref
- refs: add methods for the ref iterators
- refs: add methods for misc ref operations
- refs: add a backend method structure with transaction functions
Building on top of a few refs-backend preparatory series, LMDB
based refs backend has been plugged into the system.
Still being discussed and worked on.
* dw/subtree-split-do-not-drop-merge (2015-12-10) 1 commit
- contrib/subtree: fix "subtree split" skipped-merge bug
The "split" subcommand of "git subtree" (in contrib/) incorrectly
skipped merges when it shouldn't, which was corrected.
Waiting for review from 'subtree' folks.
* nd/clear-gitenv-upon-use-of-alias (2015-12-29) 5 commits
- run-command: don't warn on SIGPIPE deaths
- git.c: make sure we do not leak GIT_* to alias scripts
- setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..
- git.c: make it clear save_env() is for alias handling only
- Merge branch 'nd/stop-setenv-work-tree' into nd/clear-gitenv-upon-use-of-alias
(this branch uses nd/stop-setenv-work-tree.)
d95138e6 (setup: set env $GIT_WORK_TREE when work tree is set, like
$GIT_DIR, 2015-06-26) attempted to work around a glitch in alias
handling by overwriting GIT_WORK_TREE environment variable to
affect subprocesses when set_git_work_tree() gets called, which
resulted in a rather unpleasant regression to "clone" and "init".
Try to address the same issue by always restoring the environment
and respawning the real underlying command when handling alias.
Will merge to 'next'.
* kn/ref-filter-atom-parsing (2016-01-05) 15 commits
- ref-filter: introduce objectname_atom_parser()
- ref-filter: introduce contents_atom_parser()
- ref-filter: introduce remote_ref_atom_parser()
- ref-filter: align: introduce long-form syntax
- ref-filter: convert variable 'width' to an unsigned int
- ref-filter: introduce parse_align_position()
- ref-filter: introduce align_atom_parser()
- ref-filter: introduce color_atom_parser()
- ref-filter: skip deref specifier in match_atom_name()
- ref-fitler: bump match_atom() name to the top
- ref-filter: introduce parsing functions for each valid atom
- ref-filter: introduce struct used_atom
- ref-filter: bump 'used_atom' and related code to the top
- ref-filter: use strbuf_split_str_omit_term()
- strbuf: introduce strbuf_split_str_omit_term()
Refactoring of ref-filter's format-parsing code, in preparation
for "branch --format" and friends.
This replaces (for now) kn/for-each-ref-remainder, which will be built
on top.
Still being discussed and worked on.
* bb/merge-marker-crlf (2015-11-24) 1 commit
- merge-file: consider core.crlf when writing merge markers
Write out merge markers using system end-of-line convention.
Waiting for a re-roll to handle gitattributes.
($gmane/281701)
* dk/gc-more-wo-pack (2015-11-24) 3 commits
- gc: Clean garbage .bitmap files from pack dir
- t5304: Add test for .bitmap garbage files
- prepare_packed_git(): find more garbage
Follow-on to dk/gc-idx-wo-pack topic, to clean up stale
.bitmap and .keep files.
Waiting for review.
* ps/rebase-keep-empty (2015-11-24) 2 commits
- rebase: fix preserving commits with --keep-empty
- rebase: test broken behavior with --keep-empty
Keep duplicate commits via rebase --keep-empty.
Of dubious or negative value.
Will discard.
($gmane/282107).
* rm/subtree-unwrap-tags (2015-11-24) 1 commit
- contrib/subtree: unwrap tag refs
Waiting for review from subtree folks.
* sg/sh-require-clean-orphan (2015-11-24) 2 commits
- sh-setup: make require_clean_work_tree() work on orphan branches
- Add tests for git-sh-setup's require_clean_work_tree()
Allow users of git-sh-setup to handle orphan branch state.
This series takes the conservative route of requiring scripts to opt
into the looser behavior, at the expense of carrying around a new
option-flag forever. I'm not sure if we need to do so.
Needs review.
* tb/ls-files-eol (2016-01-07) 1 commit
- ls-files: add eol diagnostics
Add options to ls-files to help diagnose end-of-line problems.
Needs review.
* ec/annotate-deleted (2015-11-20) 1 commit
- annotate: skip checking working tree if a revision is provided
Usability fix for annotate-specific "<file> <rev>" syntax with deleted
files.
Waiting for review.
* sb/submodule-parallel-fetch (2015-12-16) 7 commits
(merged to 'next' on 2015-12-22 at 44e84ff)
+ submodules: allow parallel fetching, add tests and documentation
+ fetch_populated_submodules: use new parallel job processing
+ run-command: add an asynchronous parallel child processor
+ sigchain: add command to pop all common signals
+ strbuf: add strbuf_read_once to read without blocking
+ xread: poll on non blocking fds
+ submodule.c: write "Fetching submodule <foo>" to stderr
(this branch is used by sb/submodule-parallel-update.)
Add a framework to spawn a group of processes in parallel, and use
it to run "git fetch --recurse-submodules" in parallel.
Rerolled and this seems to be a lot cleaner. The merge of the
earlier one to 'next' has been reverted.
Will merge to 'master'.
* sb/submodule-parallel-update (2015-12-16) 8 commits
- clone: allow an explicit argument for parallel submodule clones
- submodule update: expose parallelism to the user
- git submodule update: have a dedicated helper for cloning
- fetching submodules: respect `submodule.fetchJobs` config option
- submodule-config: introduce parse_generic_submodule_config
- submodule-config: remove name_and_item_from_var
- submodule-config: drop check against NULL
- submodule-config: keep update strategy around
(this branch uses sb/submodule-parallel-fetch.)
Builds on top of the "fetch --recurse-submodules" work to introduce
parallel downloading into multiple submodules for "submodule update".
Needs review.
* jc/strbuf-gets (2015-12-16) 17 commits
- test-sha1-array: read command stream with strbuf_getline_crlf()
- grep: read -f file with strbuf_getline_crlf()
- send-pack: read list of refs with strbuf_getline_crlf()
- column: read lines with strbuf_getline_crlf()
- cat-file: read batch stream with strbuf_getline_crlf()
- transport-helper: read helper response with strbuf_getline_crlf()
- clone/sha1_file: read info/alternates with strbuf_getline_crlf()
- remote.c: read $GIT_DIR/remotes/* with strbuf_getline_crlf()
- ident.c: read /etc/mailname with strbuf_getline_crlf()
- rev-parse: read parseopt spec with strbuf_getline_crlf()
- revision: read --stdin with strbuf_getline_crlf()
- hash-object: read --stdin-paths with strbuf_getline_crlf()
- mktree: read textual tree representation with strbuf_getline_crlf()
- update-index: read list of paths with strbuf_getline_crlf() under --stdin
- update-index: read --index-info with strbuf_getline_crlf()
- check-attr, check-ignore, checkout-index: read paths with strbuf_getline_crlf()
- strbuf: make strbuf_getline_crlf() global
Teach codepaths that communicate with users by reading text files
to be more lenient to editors that write CRLF-terminated lines.
Note that this is only about communication with Git, like feeding
list of object names from the standard input instead of from the
command line, and does not involve files in the working tree.
Rerolled.
Needs review.
* mh/notes-allow-reading-treeish (2015-10-08) 3 commits
(merged to 'next' on 2015-10-23 at 8a697f0)
+ notes: allow treeish expressions as notes ref
+ Merge branch 'jk/notes-dwim-doc' into next
+ Merge branch 'jc/merge-drop-old-syntax' into next
(this branch uses jc/merge-drop-old-syntax.)
Some "git notes" operations, e.g. "git log --notes=<note>", should
be able to read notes from any tree-ish that is shaped like a notes
tree, but the notes infrastructure required that the argument must
be a ref under refs/notes/. Loosen it to require a valid ref only
when the operation would update the notes (in which case we must
have a place to store the updated notes tree, iow, a ref).
As the patch was done on top of the 'drop old-syntax from merge',
this has to wait until that other topic can graduate, unfortunately.
It can be redone in a way that does not depend on that topic after
this cycle, though.
Will keep in 'next'.
* jc/mailinfo (2015-10-21) 1 commit
- mailinfo: ignore in-body header that we do not care about
Some people write arbitrary garbage at the beginning of a piece of
e-mail (or after -- >8 -- scissors -- >8 -- line) in the commit log
message and expect them to be discarded, even though "From:" and
"Subject:" are the only documented in-body headers that you are
supposed to have there. Allow some garbage (specifically, what may
look like RFC2822 headers like "MIME-Version: ...") to be there and
ignore them.
No comments after waiting for a long time.
Will discard.
* js/am-3-merge-recursive-direct (2015-10-12) 2 commits
(merged to 'next' on 2015-10-23 at dc631e5)
+ am: make a direct call to merge_recursive
+ merge_recursive_options: introduce the "gently" flag
The merge_recursive_generic() function has been made a bit safer to
call from inside a process. "git am -3" was taught to make a direct
call to the function when falling back to three-way merge.
Being able to make a direct call would be good in general, but as a
performance thing, we would want to see it backed up by numbers.
I haven't gone through the "gently" change with fine toothed comb;
I can see that the change avoids calling die(), but I haven't made
sure that the program states (e.g. what's in the in-core index) are
adjusted sensibly when it returns to the caller instead of dying,
or the codepaths that used to die() are free of resource leaks.
The original code certainly did not care the program states at the
point of dying exactly because it knew it is going to exit, but now
they have to care, and they need to be audited.
Will keep in 'next'.
* sg/pretty-more-date-mode-format (2015-10-07) 1 commit
- pretty: add format specifiers for short and raw date formats
Introduce "%as" and "%aR" placeholders for "log --format" to show
the author date in the short and raw formats.
No comments after waiting for a long time.
Will discard.
* jk/graph-format-padding (2015-09-14) 1 commit
- pretty: pass graph width to pretty formatting for use in '%>|(N)'
Redefine the way '%>|(N)' padding and the "--graph" option
interacts. It has been that the available columns to display the
log message was measured from the edge of the area the graph ended,
but with this it becomes the beginning of the entire output.
I have a suspicion that 50% of the users would appreciate this
change, and the remainder see this break their expectation. If
that is the case, we might need to introduce a similar but
different alignment operator so that this new behaviour is
available to those who want to use it, without negatively affecting
existing uses.
No comments after waiting for a long time.
Will discard.
($gmane/278326)
* ad/cygwin-wants-rename (2015-08-07) 1 commit
- config.mak.uname: Cygwin needs OBJECT_CREATION_USES_RENAMES
Will hold.
($gmane/275680).
* jc/rerere-multi (2015-09-14) 7 commits
- rerere: do use multiple variants
- t4200: rerere a merge with two identical conflicts
- rerere: allow multiple variants to exist
- rerere: delay the recording of preimage
- rerere: handle leftover rr-cache/$ID directory and postimage files
- rerere: scan $GIT_DIR/rr-cache/$ID when instantiating a rerere_id
- rerere: split conflict ID further
"git rerere" can encounter two or more files with the same conflict
signature that have to be resolved in different ways, but there was
no way to record these separate resolutions.
Needs review.
* jc/merge-drop-old-syntax (2015-04-29) 1 commit
(merged to 'next' on 2015-10-07 at 50fed71)
+ merge: drop 'git merge <message> HEAD <commit>' syntax
(this branch is used by mh/notes-allow-reading-treeish.)
Originally merged to 'next' on 2015-05-28
Stop supporting "git merge <message> HEAD <commit>" syntax that has
been deprecated since October 2007. It has been reported that
git-gui still uses the deprecated syntax, which needs to be fixed
before this final step can proceed.
($gmane/282594)
Will keep in 'next'.
^ permalink raw reply [relevance 1%]
* What's cooking in git.git (Jan 2016, #03; Wed, 13)
@ 2016-01-13 22:23 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2016-01-13 22:23 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'. The ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.
The tip of 'next' has been rewound. A handful of topics have
graduated to 'master'. A few topics that are fixes to 2.7.0 started
cooking in 'next'.
You can find the changes described here in the integration branches of the
repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[Graduated to "master"]
* ea/blame-progress (2015-12-16) 1 commit
(merged to 'next' on 2015-12-22 at f8e8643)
+ blame: add support for --[no-]progress option
Originally merged to 'next' on 2015-12-22
"git blame" learned to produce the progress eye-candy when it takes
too much time before emitting the first line of the result.
* ep/make-phoney (2015-12-16) 1 commit
(merged to 'next' on 2015-12-22 at 27c7593)
+ Makefile: add missing phony target
Originally merged to 'next' on 2015-12-22
A slight update to the Makefile.
* nd/stop-setenv-work-tree (2015-12-22) 1 commit
(merged to 'next' on 2015-12-22 at 6d7bb0c)
+ Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"
(this branch is used by nd/clear-gitenv-upon-use-of-alias.)
Originally merged to 'next' on 2015-12-22
An earlier change in 2.5.x-era broke users' hooks and aliases by
exporting GIT_WORK_TREE to point at the root of the working tree,
interfering when they tried to use a different working tree without
setting GIT_WORK_TREE environment themselves.
* ps/push-delete-option (2015-12-16) 2 commits
(merged to 'next' on 2015-12-22 at d83cc1d)
+ push: add '-d' as shorthand for '--delete'
+ push: add '--delete' flag to synopsis
Originally merged to 'next' on 2015-12-22
"branch --delete" has "branch -d" but "push --delete" does not.
* sb/submodule-parallel-fetch (2015-12-16) 7 commits
(merged to 'next' on 2015-12-22 at 44e84ff)
+ submodules: allow parallel fetching, add tests and documentation
+ fetch_populated_submodules: use new parallel job processing
+ run-command: add an asynchronous parallel child processor
+ sigchain: add command to pop all common signals
+ strbuf: add strbuf_read_once to read without blocking
+ xread: poll on non blocking fds
+ submodule.c: write "Fetching submodule <foo>" to stderr
(this branch is used by sb/submodule-parallel-update.)
Originally merged to 'next' on 2015-12-22
Add a framework to spawn a group of processes in parallel, and use
it to run "git fetch --recurse-submodules" in parallel.
Rerolled and this seems to be a lot cleaner. The merge of the
earlier one to 'next' has been reverted.
* vl/grep-configurable-threads (2015-12-16) 3 commits
(merged to 'next' on 2015-12-22 at 8954705)
+ grep: add --threads=<num> option and grep.threads configuration
+ grep: slight refactoring to the code that disables threading
+ grep: allow threading even on a single-core machine
Originally merged to 'next' on 2015-12-22
"git grep" can now be configured (or told from the command line)
how many threads to use when searching in the working tree files.
--------------------------------------------------
[New Topics]
* ho/gitweb-squelch-undef-warning (2016-01-12) 1 commit
(merged to 'next' on 2016-01-12 at ef4fc5f)
+ gitweb: squelch "uninitialized value" warning
Asking gitweb for a nonexistent commit left a warning in the server
log.
Somebody may want to follow this up with a new test, perhaps?
IIRC, we do test that no Perl warnings are given to the server log,
so this should have been caught if our test coverage were good.
Will merge to 'master'.
* tg/grep-no-index-fallback (2016-01-12) 2 commits
(merged to 'next' on 2016-01-12 at 8960bdd)
+ builtin/grep: add grep.fallbackToNoIndex config
+ t7810: correct --no-index test
"git grep" by default does not fall back to its --no-index
behaviour outside a directory under Git's control (otherwise the
user may by mistake end up running a huge recursive search); with a
new configuration (set in $HOME/.gitconfig--by definition this
cannot be set in the config file per project), this safety can be
disabled.
Will merge to 'master'.
* js/pull-rebase-i (2016-01-13) 3 commits
- completion: add missing branch.*.rebase values
- remote: handle the config setting branch.*.rebase=interactive
- pull: allow interactive rebase with --rebase=interactive
"git pull --rebase" has been extended to allow invoking
"rebase -i".
Will merge to 'next'.
* jk/ok-to-fail-gc-auto-in-rebase (2016-01-13) 1 commit
- rebase: ignore failures from "gc --auto"
"git rebase", unlike all other callers of "gc --auto", did not
ignore the exit code from "gc --auto".
Will merge to 'next'.
* js/close-packs-before-gc (2016-01-13) 4 commits
- receive-pack: release pack files before garbage-collecting
- merge: release pack files before garbage-collecting
- am: release pack files before garbage-collecting
- fetch: release pack files before garbage-collecting
Many codepaths that run "gc --auto" before exiting kept packfiles
mapped and left the file descriptors to them open, which was not
friendly to systems that cannot remove files that are open. They
now close the packs before doing so.
Will merge to 'next'.
* js/msys2 (2016-01-13) 5 commits
- compat/winansi: support compiling with MSys2
- compat/mingw: support MSys2-based MinGW build
- nedmalloc: allow compiling with MSys2's compiler
- config.mak.uname: supporting 64-bit MSys2
- config.mak.uname: support MSys2
Beginning of the upstreaming process of Git for Windows effort.
Waiting for review.
($gmane/283975).
* rp/p4-filetype-change (2016-01-13) 1 commit
- git-p4.py: add support for filetype change
Will merge to 'next'.
* tk/interpret-trailers-in-place (2016-01-13) 2 commits
- interpret-trailers: add option for in-place editing
- trailer: use fprintf instead of printf
"interpret-trailers" has been taught to optionally update a file in
place, instead of always writing the result to the standard output.
Test may need to be updated to ensure a failing rewrite does not
clobber the original input.
Waiting for review.
($gmane/283959).
--------------------------------------------------
[Stalled]
* kf/http-proxy-auth-methods (2015-11-04) 3 commits
. SQUASH???
. http: use credential API to handle proxy authentication
. http: allow selection of proxy authentication method
New http.proxyAuthMethod configuration variable can be used to
specify what authentication method to use, as a way to work around
proxies that do not give error response expected by libcurl when
CURLAUTH_ANY is used. Also, the codepath for proxy authentication
has been taught to use credential API to store the authentication
material in user's keyrings.
I ejected this from pu for the moment, as it conflicts with the
pt/http-socks-proxy topic. That is now in master, so it can
be re-rolled on top.
Anybody wants to help rerolling this? Otherwise will discard.
* mg/httpd-tests-update-for-apache-2.4 (2015-04-08) 2 commits
- t/lib-git-svn: check same httpd module dirs as lib-httpd
- t/lib-httpd: load mod_unixd
This is the first two commits in a three-patch series $gmane/266962
Becoming tired of waiting for a reroll.
with updated log message ($gmane/268061).
Will discard.
* jc/diff-b-m (2015-02-23) 5 commits
. WIPWIP
. WIP: diff-b-m
- diffcore-rename: allow easier debugging
- diffcore-rename.c: add locate_rename_src()
- diffcore-break: allow debugging
"git diff -B -M" produced incorrect patch when the postimage of a
completely rewritten file is similar to the preimage of a removed
file; such a resulting file must not be expressed as a rename from
other place.
The fix in this patch is broken, unfortunately.
Will discard.
--------------------------------------------------
[Cooking]
* dw/signoff-doc (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at 1b08b48)
+ Expand documentation describing --signoff
The documentation has been updated to hint the connection between
the '--signoff' option and DCO.
Will merge to 'master'.
* ew/for-each-ref-doc (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at e5c4e75)
+ for-each-ref: document `creatordate` and `creator` fields
Will merge to 'master'.
* sg/t6050-failing-editor-test-fix (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at dc08a19)
+ t6050-replace: make failing editor test more robust
Will merge to 'master'.
* js/dirname-basename (2016-01-12) 4 commits
(merged to 'next' on 2016-01-12 at c3c970a)
+ t0060: verify that basename() and dirname() work as expected
+ compat/basename.c: provide a dirname() compatibility function
+ compat/basename: make basename() conform to POSIX
+ Refactor skipping DOS drive prefixes
dirname() emulation has been added, as Msys2 lacks it.
The test needs to be loosened to allow implementation defined
behaviour; currently it fails on Macs.
Waiting for an update.
($gmane/283968).
* js/fopen-harder (2016-01-11) 2 commits
(merged to 'next' on 2016-01-12 at c6ef194)
+ Handle more file writes correctly in shared repos
+ commit: allow editing the commit message even in shared repos
Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
(e.g. COMMIT_EDITMSG) that is meant to be left after the command is
done. This however did not work well if the repository is set to
be shared with core.sharedRepository and the umask of the previous
user is tighter. Make them work better by calling unlink(2) and
retrying after fopen(3) fails with EPERM.
Will merge to 'master'.
* nd/exclusion-regression-fix (2016-01-08) 1 commit
(merged to 'next' on 2016-01-12 at 0eb98a5)
+ Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
The ignore mechanism saw a few regressions around untracked file
listing and sparse checkout selection areas in 2.7.0; the change
that is responsible for the regression has been reverted.
Will merge to 'master'.
* ss/clone-depth-single-doc (2016-01-08) 3 commits
(merged to 'next' on 2016-01-12 at 16ded8c)
+ docs: clarify that --depth for git-fetch works with newly initialized repos
+ docs: say "commits" in the --depth option wording for git-clone
+ docs: clarify that passing --depth to git-clone implies --single-branch
Updates documents to clarify "git fetch --depth".
Will merge to 'master'.
* wp/sha1-name-negative-match (2016-01-13) 2 commits
- object name: introduce '^{/!-<negative pattern>}' notation
- test for '!' handling in rev-parse's named commits
Introduce "<branch>^{/!-<pattern>}" notation to name a commit
reachable from <branch> that does not match the given <pattern>.
A questionable corner case where commit has no message remains.
Waiting for review.
($gmane/283971)
* ak/format-patch-odir-config (2016-01-13) 1 commit
- format-patch: introduce format.outputDirectory configuration
Allow "-o <dir>" option to be omitted on the command line of "git
format-patch" if you always use the same directory in your
workflow.
Will merge to 'next'.
* jk/notes-merge-from-anywhere (2015-12-29) 1 commit
- notes: allow merging from arbitrary references
"git notes merge" used to limit the source of the merged notes tree
to somewhere under refs/notes/ hierarchy, which was too limiting
when inventing a workflow to exchange notes with remote
repositories using remote-tracking notes trees (located in e.g.
refs/remote-notes/ or somesuch).
Needs review.
* dk/reflog-walk-with-non-commit (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at 5f7b10e)
+ reflog-walk: don't segfault on non-commit sha1's in the reflog
"git reflog" incorrectly assumed that all objects that used to be
at the tip of a ref must be commits, which caused it to segfault.
Will merge to 'master'.
* ew/send-email-mutt-alias-fix (2016-01-04) 1 commit
(merged to 'next' on 2016-01-12 at 84d1329)
+ git-send-email: do not double-escape quotes from mutt
"git send-email" was confused by escaped quotes stored in the alias
files saved by "mutt".
Will merge to 'master'.
* jk/clang-pedantic (2016-01-04) 2 commits
(merged to 'next' on 2016-01-12 at b5be271)
+ bswap: add NO_UNALIGNED_LOADS define
+ avoid shifting signed integers 31 bits
A few unportable C construct have been spotted by clang compiler
and have been fixed.
Will merge to 'master'.
* dt/unpack-compare-entry-optim (2016-01-05) 1 commit
- do_compare_entry: use already-computed path
Will merge to 'next'.
* jk/pack-revindex (2015-12-21) 2 commits
(merged to 'next' on 2016-01-12 at 2e39a16)
+ pack-revindex: store entries directly in packed_git
+ pack-revindex: drop hash table
Will merge to 'master'.
* jk/symbolic-ref (2016-01-13) 6 commits
- lock_ref_sha1_basic: handle REF_NODEREF with invalid refs
- lock_ref_sha1_basic: always fill old_oid while holding lock
- checkout,clone: check return value of create_symref
- create_symref: write reflog while holding lock
- create_symref: use existing ref-lock code
- create_symref: modernize variable names
The low-level code that is used to create symbolic references has
been updated to share more code with the code that deals with
normal references.
Will merge to 'next'.
* ep/shell-command-substitution-style (2016-01-12) 92 commits
- t9901-git-web--browse.sh: use the $( ... ) construct for command substitution
- t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct for command substitution
- t9350-fast-export.sh: use the $( ... ) construct for command substitution
- t9300-fast-import.sh: use the $( ... ) construct for command substitution
- t9150-svk-mergetickets.sh: use the $( ... ) construct for command substitution
- t9145-git-svn-master-branch.sh: use the $( ... ) construct for command substitution
- t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command substitution
- t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct for command substitution
- t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for command substitution
- t9130-git-svn-authors-file.sh: use the $( ... ) construct for command substitution
- t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for command substitution
- t9119-git-svn-info.sh: use the $( ... ) construct for command substitution
- t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for command substitution
- t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command substitution
- t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command substitution
- t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command substitution
- t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution
- t9107-git-svn-migrate.sh: use the $( ... ) construct for command substitution
- t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command substitution
- t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command substitution
- t9101-git-svn-props.sh: use the $( ... ) construct for command substitution
- t9100-git-svn-basic.sh: use the $( ... ) construct for command substitution
- t/t9001-send-email.sh: use the $( ... ) construct for command substitution
- t/t8003-blame-corner-cases.sh: use the $( ... ) construct for command substitution
- t/t7700-repack.sh: use the $( ... ) construct for command substitution
- t/t7602-merge-octopus-many.sh: use the $( ... ) construct for command substitution
- t/t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for command substitution
- t/t7504-commit-msg-hook.sh: use the $( ... ) construct for command substitution
- t/t7408-submodule-reference.sh: use the $( ... ) construct for command substitution
- t/t7406-submodule-update.sh: use the $( ... ) construct for command substitution
- t/t7103-reset-bare.sh: use the $( ... ) construct for command substitution
- t/t7006-pager.sh: use the $( ... ) construct for command substitution
- t/t7004-tag.sh: use the $( ... ) construct for command substitution
- t/t7003-filter-branch.sh: use the $( ... ) construct for command substitution
- t/t7001-mv.sh: use the $( ... ) construct for command substitution
- t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution
- t/t6032-merge-large-rename.sh: use the $( ... ) construct for command substitution
- t/t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for command substitution
- t/t6002-rev-list-bisect.sh: use the $( ... ) construct for command substitution
- t/t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution
- t/t5900-repo-selection.sh: use the $( ... ) construct for command substitution
- t/t5710-info-alternate.sh: use the $( ... ) construct for command substitution
- t/t5700-clone-reference.sh: use the $( ... ) construct for command substitution
- t/t5601-clone.sh: use the $( ... ) construct for command substitution
- t/t5570-git-daemon.sh: use the $( ... ) construct for command substitution
- t/t5550-http-fetch-dumb.sh: use the $( ... ) construct for command substitution
- t/t5538-push-shallow.sh: use the $( ... ) construct for command substitution
- t/t5537-fetch-shallow.sh: use the $( ... ) construct for command substitution
- t/t5532-fetch-proxy.sh: use the $( ... ) construct for command substitution
- t/t5530-upload-pack-error.sh: use the $( ... ) construct for command substitution
- t/t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
- t/t5517-push-mirror.sh: use the $( ... ) construct for command substitution
- t/t5516-fetch-push.sh: use the $( ... ) construct for command substitution
- t/t5515-fetch-merge-logic.sh: use the $( ... ) construct for command substitution
- t/t5510-fetch.sh: use the $( ... ) construct for command substitution
- t/t5506-remote-groups.sh: use the $( ... ) construct for command substitution
- t/t5505-remote.sh: use the $( ... ) construct for command substitution
- t/t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
- t/t5305-include-tag.sh: use the $( ... ) construct for command substitution
- t/t5304-prune.sh: use the $( ... ) construct for command substitution
- t/t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substitution
- t/t5100: no need to use 'echo' command substitutions for globbing
- t/t5302-pack-index.sh: use the $( ... ) construct for command substitution
- t/t5301-sliding-window.sh: use the $( ... ) construct for command substitution
- t/t5300-pack-object.sh: use the $( ... ) construct for command substitution
- t/t5100-mailinfo.sh: use the $( ... ) construct for command substitution
- t/t3700-add.sh: use the $( ... ) construct for command substitution
- t/t3600-rm.sh: use the $( ... ) construct for command substitution
- t/t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution
- t/t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
- t/t3210-pack-refs.sh: use the $( ... ) construct for command substitution
- t/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution
- t/t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution
- t/t3030-merge-recursive.sh: use the $( ... ) construct for command substitution
- t/t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution
- t/t2025-worktree-add.sh: use the $( ... ) construct for command substitution
- t/t1700-split-index.sh: use the $( ... ) construct for command substitution
- t/t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution
- t/t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution
- t/t1410-reflog.sh: use the $( ... ) construct for command substitution
- t/t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
- t/t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution
- unimplemented.sh: use the $( ... ) construct for command substitution
- test-sha1.sh: use the $( ... ) construct for command substitution
- t/lib-httpd.sh: use the $( ... ) construct for command substitution
- git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution
- contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-revert.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-repack.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-merge.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-fetch.sh: use the $( ... ) construct for command substitution
- contrib/examples/git-commit.sh: use the $( ... ) construct for command substitution
A shell script style update to change `command substitution` into
$(command substitution). Coverts contrib/ and much of the t/
directory contents.
Will merge to 'next'.
* nd/dir-exclude-cleanup (2015-12-28) 1 commit
(merged to 'next' on 2016-01-12 at e6584c9)
+ dir.c: clean the entire struct in clear_exclude_list()
The "exclude_list" structure has the usual "alloc, nr" pair of
fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot
to reset 'alloc' to 0 when it cleared 'nr' and discarded the
managed array.
Will merge to 'master'.
* ss/user-manual (2015-12-30) 4 commits
(merged to 'next' on 2016-01-12 at c7f0328)
+ user-manual: add addition gitweb information
+ user-manual: add section documenting shallow clones
+ glossary: define the term shallow clone
+ user-manual: remove temporary branch entry from todo list
Drop a few old "todo" items by deciding that the change one of them
suggests is not such a good idea, and doing the change the other
one suggested to do.
Will merge to 'master'.
* nd/ita-cleanup (2015-12-28) 3 commits
(merged to 'next' on 2016-01-12 at 008a6e3)
+ grep: make it clear i-t-a entries are ignored
+ add and use a convenience macro ce_intent_to_add()
+ blame: remove obsolete comment
Paths that have been told the index about with "add -N" are not
quite yet in the index, but a few commands behaved as if they
already are in a harmful way.
Here are only the obviously correct bits; some other changes were
in the posted series, but not quite ready to be queued here.
Will merge to 'master'.
* cc/untracked (2015-12-29) 10 commits
- t7063: add tests for core.untrackedCache
- config: add core.untrackedCache
- dir: simplify untracked cache "ident" field
- dir: add remove_untracked_cache()
- dir: add {new,add}_untracked_cache()
- update-index: move 'uc' var declaration
- update-index: add untracked cache notifications
- update-index: add --test-untracked-cache
- update-index: use enum for untracked cache options
- dir: free untracked cache when removing it
Update the untracked cache subsystem and change its primary UI from
"git update-index" to "git config".
Still being discussed and worked on.
$gmane/283080
* dt/refs-backend-lmdb (2016-01-12) 22 commits
. DONTMERGE: compilation fix
. refs: tests for lmdb backend
. refs: add LMDB refs backend
. svn: learn ref-storage argument
. refs: allow ref backend to be set for clone
. clone: use child_process for recursive checkouts
. refs: check submodules ref storage config
. init: allow alternate backends to be set for new repos
. refs: always handle non-normal refs in files backend
. refs: resolve symbolic refs first
. refs: allow log-only updates
. refs: move duplicate check to common code
. refs: make lock generic
. refs: add method to rename refs
. refs: add methods to init refs db
. refs: add method for delete_refs
. refs: add method for initial ref transaction commit
. refs: add methods for reflog
. refs: add do_for_each_per_worktree_ref
. refs: add methods for the ref iterators
. refs: add methods for misc ref operations
. refs: add a backend method structure with transaction functions
Building on top of a few refs-backend preparatory series, LMDB
based refs backend has been plugged into the system.
Rerolled, but left out of 'pu' for now due to conflicts.
* dw/subtree-split-do-not-drop-merge (2015-12-10) 1 commit
- contrib/subtree: fix "subtree split" skipped-merge bug
The "split" subcommand of "git subtree" (in contrib/) incorrectly
skipped merges when it shouldn't, which was corrected.
Still being worked on.
($gmane/283874)
* nd/clear-gitenv-upon-use-of-alias (2015-12-29) 5 commits
(merged to 'next' on 2016-01-12 at 696b1f5)
+ run-command: don't warn on SIGPIPE deaths
+ git.c: make sure we do not leak GIT_* to alias scripts
+ setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..
+ git.c: make it clear save_env() is for alias handling only
+ Merge branch 'nd/stop-setenv-work-tree' into nd/clear-gitenv-upon-use-of-alias
d95138e6 (setup: set env $GIT_WORK_TREE when work tree is set, like
$GIT_DIR, 2015-06-26) attempted to work around a glitch in alias
handling by overwriting GIT_WORK_TREE environment variable to
affect subprocesses when set_git_work_tree() gets called, which
resulted in a rather unpleasant regression to "clone" and "init".
Try to address the same issue by always restoring the environment
and respawning the real underlying command when handling alias.
Will merge to 'master'.
* kn/ref-filter-atom-parsing (2016-01-05) 15 commits
- ref-filter: introduce objectname_atom_parser()
- ref-filter: introduce contents_atom_parser()
- ref-filter: introduce remote_ref_atom_parser()
- ref-filter: align: introduce long-form syntax
- ref-filter: convert variable 'width' to an unsigned int
- ref-filter: introduce parse_align_position()
- ref-filter: introduce align_atom_parser()
- ref-filter: introduce color_atom_parser()
- ref-filter: skip deref specifier in match_atom_name()
- ref-fitler: bump match_atom() name to the top
- ref-filter: introduce parsing functions for each valid atom
- ref-filter: introduce struct used_atom
- ref-filter: bump 'used_atom' and related code to the top
- ref-filter: use strbuf_split_str_omit_term()
- strbuf: introduce strbuf_split_str_omit_term()
Refactoring of ref-filter's format-parsing code, in preparation
for "branch --format" and friends.
This replaces (for now) kn/for-each-ref-remainder, which will be built
on top.
Still being discussed and worked on.
* bb/merge-marker-crlf (2015-11-24) 1 commit
- merge-file: consider core.crlf when writing merge markers
Write out merge markers using system end-of-line convention.
Waiting for a re-roll to handle gitattributes.
($gmane/281701)
* dk/gc-more-wo-pack (2016-01-13) 4 commits
- gc: clean garbage .bitmap files from pack dir
- t5304: ensure non-garbage files are not deleted
- t5304: test .bitmap garbage files
- prepare_packed_git(): find more garbage
Follow-on to dk/gc-idx-wo-pack topic, to clean up stale
.bitmap and .keep files.
Waiting for review.
* rm/subtree-unwrap-tags (2015-11-24) 1 commit
- contrib/subtree: unwrap tag refs
"git subtree" (in contrib/) records the tag object name in the
commit log message when a subtree is added using a tag, without
peeling it down to the underlying commit. The tag needs to be
peeled when "git subtree split" wants to work on the commit, but
the command forgot to do so.
Will merge to 'next'.
* sg/sh-require-clean-orphan (2015-11-24) 2 commits
- sh-setup: make require_clean_work_tree() work on orphan branches
- Add tests for git-sh-setup's require_clean_work_tree()
Allow users of git-sh-setup to handle orphan branch state.
This series takes the conservative route of requiring scripts to opt
into the looser behavior, at the expense of carrying around a new
option-flag forever. I'm not sure if we need to do so.
Needs review.
* tb/ls-files-eol (2016-01-07) 1 commit
- ls-files: add eol diagnostics
Add options to ls-files to help diagnose end-of-line problems.
Will merge to 'next'.
* ec/annotate-deleted (2015-11-20) 1 commit
- annotate: skip checking working tree if a revision is provided
Usability fix for annotate-specific "<file> <rev>" syntax with deleted
files.
Waiting for review.
* sb/submodule-parallel-update (2016-01-12) 8 commits
- clone: allow an explicit argument for parallel submodule clones
- submodule update: expose parallelism to the user
- git submodule update: have a dedicated helper for cloning
- fetching submodules: respect `submodule.fetchJobs` config option
- submodule-config: introduce parse_generic_submodule_config
- submodule-config: remove name_and_item_from_var
- submodule-config: drop check against NULL
- submodule-config: keep update strategy around
Builds on top of the "fetch --recurse-submodules" work to introduce
parallel downloading into multiple submodules for "submodule update".
Needs review.
* jc/strbuf-gets (2015-12-16) 17 commits
- test-sha1-array: read command stream with strbuf_getline_crlf()
- grep: read -f file with strbuf_getline_crlf()
- send-pack: read list of refs with strbuf_getline_crlf()
- column: read lines with strbuf_getline_crlf()
- cat-file: read batch stream with strbuf_getline_crlf()
- transport-helper: read helper response with strbuf_getline_crlf()
- clone/sha1_file: read info/alternates with strbuf_getline_crlf()
- remote.c: read $GIT_DIR/remotes/* with strbuf_getline_crlf()
- ident.c: read /etc/mailname with strbuf_getline_crlf()
- rev-parse: read parseopt spec with strbuf_getline_crlf()
- revision: read --stdin with strbuf_getline_crlf()
- hash-object: read --stdin-paths with strbuf_getline_crlf()
- mktree: read textual tree representation with strbuf_getline_crlf()
- update-index: read list of paths with strbuf_getline_crlf() under --stdin
- update-index: read --index-info with strbuf_getline_crlf()
- check-attr, check-ignore, checkout-index: read paths with strbuf_getline_crlf()
- strbuf: make strbuf_getline_crlf() global
Teach codepaths that communicate with users by reading text files
to be more lenient to editors that write CRLF-terminated lines.
Note that this is only about communication with Git, like feeding
list of object names from the standard input instead of from the
command line, and does not involve files in the working tree.
Will be rerolled.
* mh/notes-allow-reading-treeish (2016-01-12) 1 commit
(merged to 'next' on 2016-01-12 at 7aa311f)
+ notes: allow treeish expressions as notes ref
Originally merged to 'next' on 2015-10-23
Some "git notes" operations, e.g. "git log --notes=<note>", should
be able to read notes from any tree-ish that is shaped like a notes
tree, but the notes infrastructure required that the argument must
be a ref under refs/notes/. Loosen it to require a valid ref only
when the operation would update the notes (in which case we must
have a place to store the updated notes tree, iow, a ref).
Will merge to 'master'.
* js/am-3-merge-recursive-direct (2015-10-12) 2 commits
- am: make a direct call to merge_recursive
- merge_recursive_options: introduce the "gently" flag
The merge_recursive_generic() function has been made a bit safer to
call from inside a process. "git am -3" was taught to make a direct
call to the function when falling back to three-way merge.
Being able to make a direct call would be good in general, but as a
performance thing, we would want to see it backed up by numbers.
I haven't gone through the "gently" change with fine toothed comb;
I can see that the change avoids calling die(), but I haven't made
sure that the program states (e.g. what's in the in-core index) are
adjusted sensibly when it returns to the caller instead of dying,
or the codepaths that used to die() are free of resource leaks.
The original code certainly did not care the program states at the
point of dying exactly because it knew it is going to exit, but now
they have to care, and they need to be audited.
* ad/cygwin-wants-rename (2015-08-07) 1 commit
- config.mak.uname: Cygwin needs OBJECT_CREATION_USES_RENAMES
Will hold.
($gmane/275680).
* jc/rerere-multi (2015-09-14) 7 commits
- rerere: do use multiple variants
- t4200: rerere a merge with two identical conflicts
- rerere: allow multiple variants to exist
- rerere: delay the recording of preimage
- rerere: handle leftover rr-cache/$ID directory and postimage files
- rerere: scan $GIT_DIR/rr-cache/$ID when instantiating a rerere_id
- rerere: split conflict ID further
"git rerere" can encounter two or more files with the same conflict
signature that have to be resolved in different ways, but there was
no way to record these separate resolutions.
Needs review.
* jc/merge-drop-old-syntax (2015-04-29) 1 commit
- merge: drop 'git merge <message> HEAD <commit>' syntax
Stop supporting "git merge <message> HEAD <commit>" syntax that has
been deprecated since October 2007. It has been reported that
git-gui still uses the deprecated syntax, which needs to be fixed
before this final step can proceed.
($gmane/282594)
^ permalink raw reply [relevance 1%]
* What's cooking in git.git (Jan 2016, #04; Wed, 20)
@ 2016-01-20 23:33 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2016-01-20 23:33 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'. The ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.
The tip of 'master' now has second batch of topics merged, some of
which should later be merged to 'maint'. There are a few topics
that are v2.7.0 regression fixes still cooking outside 'master',
which also need to be merged to 'maint' for the maintenance release.
You can find the changes described here in the integration branches of the
repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[Graduated to "master"]
* dk/reflog-walk-with-non-commit (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at 5f7b10e)
+ reflog-walk: don't segfault on non-commit sha1's in the reflog
"git reflog" incorrectly assumed that all objects that used to be
at the tip of a ref must be commits, which caused it to segfault.
* dw/signoff-doc (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at 1b08b48)
+ Expand documentation describing --signoff
The documentation has been updated to hint the connection between
the '--signoff' option and DCO.
* ew/for-each-ref-doc (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at e5c4e75)
+ for-each-ref: document `creatordate` and `creator` fields
* ew/send-email-mutt-alias-fix (2016-01-04) 1 commit
(merged to 'next' on 2016-01-12 at 84d1329)
+ git-send-email: do not double-escape quotes from mutt
"git send-email" was confused by escaped quotes stored in the alias
files saved by "mutt", which has been corrected.
* ho/gitweb-squelch-undef-warning (2016-01-12) 1 commit
(merged to 'next' on 2016-01-12 at ef4fc5f)
+ gitweb: squelch "uninitialized value" warning
Asking gitweb for a nonexistent commit left a warning in the server
log.
Somebody may want to follow this up with a new test, perhaps?
IIRC, we do test that no Perl warnings are given to the server log,
so this should have been caught if our test coverage were good.
* jk/clang-pedantic (2016-01-04) 2 commits
(merged to 'next' on 2016-01-12 at b5be271)
+ bswap: add NO_UNALIGNED_LOADS define
+ avoid shifting signed integers 31 bits
A few unportable C construct have been spotted by clang compiler
and have been fixed.
* jk/pack-revindex (2015-12-21) 2 commits
(merged to 'next' on 2016-01-12 at 2e39a16)
+ pack-revindex: store entries directly in packed_git
+ pack-revindex: drop hash table
In-core storage of the reverse index for .pack files (which lets
you go from a pack offset to an object name) has been streamlined.
* js/fopen-harder (2016-01-11) 2 commits
(merged to 'next' on 2016-01-12 at c6ef194)
+ Handle more file writes correctly in shared repos
+ commit: allow editing the commit message even in shared repos
Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
(e.g. COMMIT_EDITMSG) that is meant to be left after the command is
done. This however did not work well if the repository is set to
be shared with core.sharedRepository and the umask of the previous
user is tighter. They have been made to work better by calling
unlink(2) and retrying after fopen(3) fails with EPERM.
* mh/notes-allow-reading-treeish (2016-01-12) 1 commit
(merged to 'next' on 2016-01-12 at 7aa311f)
+ notes: allow treeish expressions as notes ref
Originally merged to 'next' on 2015-10-23
Some "git notes" operations, e.g. "git log --notes=<note>", should
be able to read notes from any tree-ish that is shaped like a notes
tree, but the notes infrastructure required that the argument must
be a ref under refs/notes/. Loosen it to require a valid ref only
when the operation would update the notes (in which case we must
have a place to store the updated notes tree, iow, a ref).
* nd/clear-gitenv-upon-use-of-alias (2015-12-29) 5 commits
(merged to 'next' on 2016-01-12 at 696b1f5)
+ run-command: don't warn on SIGPIPE deaths
+ git.c: make sure we do not leak GIT_* to alias scripts
+ setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..
+ git.c: make it clear save_env() is for alias handling only
+ Merge branch 'nd/stop-setenv-work-tree' into nd/clear-gitenv-upon-use-of-alias
d95138e6 (setup: set env $GIT_WORK_TREE when work tree is set, like
$GIT_DIR, 2015-06-26) attempted to work around a glitch in alias
handling by overwriting GIT_WORK_TREE environment variable to
affect subprocesses when set_git_work_tree() gets called, which
resulted in a rather unpleasant regression to "clone" and "init".
Try to address the same issue by always restoring the environment
and respawning the real underlying command when handling alias.
* nd/dir-exclude-cleanup (2015-12-28) 1 commit
(merged to 'next' on 2016-01-12 at e6584c9)
+ dir.c: clean the entire struct in clear_exclude_list()
The "exclude_list" structure has the usual "alloc, nr" pair of
fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot
to reset 'alloc' to 0 when it cleared 'nr' to discard the managed
array.
* nd/exclusion-regression-fix (2016-01-08) 1 commit
(merged to 'next' on 2016-01-12 at 0eb98a5)
+ Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
The ignore mechanism saw a few regressions around untracked file
listing and sparse checkout selection areas in 2.7.0; the change
that is responsible for the regression has been reverted.
* nd/ita-cleanup (2015-12-28) 3 commits
(merged to 'next' on 2016-01-12 at 008a6e3)
+ grep: make it clear i-t-a entries are ignored
+ add and use a convenience macro ce_intent_to_add()
+ blame: remove obsolete comment
Paths that have been told the index about with "add -N" are not
quite yet in the index, but a few commands behaved as if they
already are in a harmful way.
* sg/t6050-failing-editor-test-fix (2016-01-05) 1 commit
(merged to 'next' on 2016-01-12 at dc08a19)
+ t6050-replace: make failing editor test more robust
* ss/clone-depth-single-doc (2016-01-08) 3 commits
(merged to 'next' on 2016-01-12 at 16ded8c)
+ docs: clarify that --depth for git-fetch works with newly initialized repos
+ docs: say "commits" in the --depth option wording for git-clone
+ docs: clarify that passing --depth to git-clone implies --single-branch
Documentation for "git fetch --depth" has been updated for clarity.
* ss/user-manual (2015-12-30) 4 commits
(merged to 'next' on 2016-01-12 at c7f0328)
+ user-manual: add addition gitweb information
+ user-manual: add section documenting shallow clones
+ glossary: define the term shallow clone
+ user-manual: remove temporary branch entry from todo list
Drop a few old "todo" items by deciding that the change one of them
suggests is not such a good idea, and doing the change the other
one suggested to do.
* tg/grep-no-index-fallback (2016-01-12) 2 commits
(merged to 'next' on 2016-01-12 at 8960bdd)
+ builtin/grep: add grep.fallbackToNoIndex config
+ t7810: correct --no-index test
"git grep" by default does not fall back to its "--no-index"
behaviour outside a directory under Git's control (otherwise the
user may by mistake end up running a huge recursive search); with a
new configuration (set in $HOME/.gitconfig--by definition this
cannot be set in the config file per project), this safety can be
disabled.
--------------------------------------------------
[New Topics]
* dg/subtree-rebase-test (2016-01-19) 1 commit
- contrib/subtree: Add a test for subtree rebase that loses commits
Reviewed up to v5.
Will be rerolled.
($gmane/284426)
* jk/shortlog (2016-01-19) 7 commits
- shortlog: don't warn on empty author
- shortlog: optimize out useless string list
- shortlog: optimize out useless "<none>" normalization
- shortlog: optimize "--summary" mode
- shortlog: replace hand-parsing of author with pretty-printer
- shortlog: use strbufs to read from stdin
- shortlog: match both "Author:" and "author" on stdin
"git shortlog" used to accumulate various pieces of information
regardless of what was asked to be shown in the final output. It
has been optimized by noticing what need not to be collected
(e.g. there is no need to collect the log messages when showing
only the number of changes).
Will merge to 'next'.
* jc/peace-with-crlf (2016-01-15) 12 commits
- test-sha1-array: read command stream with strbuf_getline()
- grep: read -f file with strbuf_getline()
- send-pack: read list of refs with strbuf_getline()
- column: read lines with strbuf_getline()
- cat-file: read batch stream with strbuf_getline()
- transport-helper: read helper response with strbuf_getline()
- clone/sha1_file: read info/alternates with strbuf_getline()
- remote.c: read $GIT_DIR/remotes/* with strbuf_getline()
- ident.c: read /etc/mailname with strbuf_getline()
- rev-parse: read parseopt spec with strbuf_getline()
- revision: read --stdin with strbuf_getline()
- hash-object: read --stdin-paths with strbuf_getline()
(this branch uses jc/strbuf-getline.)
Teach codepaths that communicate with users by reading text files
to be more lenient to editors that write CRLF-terminated lines.
Note that this is only about communication with Git, like feeding
list of object names from the standard input instead of from the
command line, and does not involve files in the working tree.
Will merge to 'next'.
* dg/subtree-test (2016-01-19) 1 commit
- contrib/subtree: Make testing easier
Needs review.
($gmane/284277)
* jk/filter-branch-no-index (2016-01-19) 1 commit
- filter-branch: resolve $commit^{tree} in no-index case
A recent optimization to filter-branch in v2.7.0 introduced a
regression when --prune-empty filter is used, which has been
corrected.
Will merge to 'next'.
* jk/sanity (2016-01-19) 1 commit
- test-lib: clarify and tighten SANITY
The description for SANITY prerequisite the test suite uses has
been clarified both in the comment and in the implementation.
Will merge to 'next'.
* ls/travis-prove-order (2016-01-19) 1 commit
- travis-ci: run previously failed tests first, then slowest to fastest
By persisting runtime statistics of previous "prove" run, execute
tests that take longer before other ones, to reduce the total
wallclock time when running with Travis CI.
Waiting for a reroll.
($gmane/284431)
* nd/do-not-move-worktree-manually (2016-01-19) 2 commits
- worktree: stop supporting moving worktrees manually
- worktree.c: fix indentation
"git worktree" had a broken code that attempted to auto-fix
possible inconsistency that results from end-users moving a
worktree to different places without telling Git (the original
repository needs to maintain backpointers to its worktrees, but
"mv" run by end-users who are not familiar with that fact will
obviously not adjust them), which actually made things worse
when triggered.
Will merge to 'next'.
* sb/submodule-init (2016-01-20) 2 commits
- submodule: port init from shell to C
- submodule: port resolve_relative_url from shell to C
(this branch uses sb/submodule-parallel-update.)
Needs review.
($gmane/284419)
--------------------------------------------------
[Stalled]
* kf/http-proxy-auth-methods (2015-11-04) 3 commits
. SQUASH???
. http: use credential API to handle proxy authentication
. http: allow selection of proxy authentication method
New http.proxyAuthMethod configuration variable can be used to
specify what authentication method to use, as a way to work around
proxies that do not give error response expected by libcurl when
CURLAUTH_ANY is used. Also, the codepath for proxy authentication
has been taught to use credential API to store the authentication
material in user's keyrings.
I ejected this from pu for the moment, as it conflicts with the
pt/http-socks-proxy topic. That is now in master, so it can
be re-rolled on top.
Anybody wants to help rerolling this? Otherwise will discard.
* mg/httpd-tests-update-for-apache-2.4 (2015-04-08) 2 commits
- t/lib-git-svn: check same httpd module dirs as lib-httpd
- t/lib-httpd: load mod_unixd
This is the first two commits in a three-patch series $gmane/266962
Becoming tired of waiting for a reroll.
with updated log message ($gmane/268061).
Will discard.
* jc/diff-b-m (2015-02-23) 5 commits
. WIPWIP
. WIP: diff-b-m
- diffcore-rename: allow easier debugging
- diffcore-rename.c: add locate_rename_src()
- diffcore-break: allow debugging
"git diff -B -M" produced incorrect patch when the postimage of a
completely rewritten file is similar to the preimage of a removed
file; such a resulting file must not be expressed as a rename from
other place.
The fix in this patch is broken, unfortunately.
Will discard.
--------------------------------------------------
[Cooking]
* js/pull-rebase-i (2016-01-13) 3 commits
(merged to 'next' on 2016-01-20 at a0c5440)
+ completion: add missing branch.*.rebase values
+ remote: handle the config setting branch.*.rebase=interactive
+ pull: allow interactive rebase with --rebase=interactive
"git pull --rebase" has been extended to allow invoking
"rebase -i".
Will merge to 'master'.
* jk/ok-to-fail-gc-auto-in-rebase (2016-01-13) 1 commit
(merged to 'next' on 2016-01-20 at c9a8e82)
+ rebase: ignore failures from "gc --auto"
"git rebase", unlike all other callers of "gc --auto", did not
ignore the exit code from "gc --auto".
Will merge to 'master'.
* js/close-packs-before-gc (2016-01-13) 4 commits
(merged to 'next' on 2016-01-20 at 16cf87b)
+ receive-pack: release pack files before garbage-collecting
+ merge: release pack files before garbage-collecting
+ am: release pack files before garbage-collecting
+ fetch: release pack files before garbage-collecting
Many codepaths that run "gc --auto" before exiting kept packfiles
mapped and left the file descriptors to them open, which was not
friendly to systems that cannot remove files that are open. They
now close the packs before doing so.
Will merge to 'master'.
* js/msys2 (2016-01-15) 9 commits
- mingw: uglify (a, 0) definitions to shut up warnings
- mingw: squash another warning about a cast
- mingw: avoid warnings when casting HANDLEs to int
- mingw: avoid redefining S_* constants
- compat/winansi: support compiling with MSys2
- compat/mingw: support MSys2-based MinGW build
- nedmalloc: allow compiling with MSys2's compiler
- config.mak.uname: supporting 64-bit MSys2
- config.mak.uname: support MSys2
Beginning of the upstreaming process of Git for Windows effort.
Will merge to 'next'.
* rp/p4-filetype-change (2016-01-13) 1 commit
(merged to 'next' on 2016-01-20 at 7b5954b)
+ git-p4.py: add support for filetype change
Will merge to 'master'.
* tk/interpret-trailers-in-place (2016-01-14) 2 commits
- interpret-trailers: add option for in-place editing
- trailer: allow to write to files other than stdout
"interpret-trailers" has been taught to optionally update a file in
place, instead of always writing the result to the standard output.
Will merge to 'next'.
* js/dirname-basename (2016-01-15) 5 commits
(merged to 'next' on 2016-01-20 at d198512)
+ t0060: loosen overly strict expectations
(merged to 'next' on 2016-01-12 at c3c970a)
+ t0060: verify that basename() and dirname() work as expected
+ compat/basename.c: provide a dirname() compatibility function
+ compat/basename: make basename() conform to POSIX
+ Refactor skipping DOS drive prefixes
dirname() emulation has been added, as Msys2 lacks it.
Will merge to 'master'.
* wp/sha1-name-negative-match (2016-01-13) 2 commits
- object name: introduce '^{/!-<negative pattern>}' notation
- test for '!' handling in rev-parse's named commits
Introduce "<branch>^{/!-<pattern>}" notation to name a commit
reachable from <branch> that does not match the given <pattern>.
A questionable corner case where commit has no message remains.
Waiting for review.
($gmane/283971)
* ak/format-patch-odir-config (2016-01-13) 1 commit
(merged to 'next' on 2016-01-20 at 97c699b)
+ format-patch: introduce format.outputDirectory configuration
Allow "-o <dir>" option to be omitted on the command line of "git
format-patch" if you always use the same directory in your
workflow.
Will merge to 'master'.
* jk/notes-merge-from-anywhere (2016-01-17) 1 commit
- notes: allow merging from arbitrary references
"git notes merge" used to limit the source of the merged notes tree
to somewhere under refs/notes/ hierarchy, which was too limiting
when inventing a workflow to exchange notes with remote
repositories using remote-tracking notes trees (located in e.g.
refs/remote-notes/ or somesuch).
Will merge to 'next'.
* dt/unpack-compare-entry-optim (2016-01-05) 1 commit
(merged to 'next' on 2016-01-20 at 180dccf)
+ do_compare_entry: use already-computed path
Will merge to 'master'.
* jk/symbolic-ref (2016-01-13) 6 commits
(merged to 'next' on 2016-01-20 at 30b5408)
+ lock_ref_sha1_basic: handle REF_NODEREF with invalid refs
+ lock_ref_sha1_basic: always fill old_oid while holding lock
+ checkout,clone: check return value of create_symref
+ create_symref: write reflog while holding lock
+ create_symref: use existing ref-lock code
+ create_symref: modernize variable names
The low-level code that is used to create symbolic references has
been updated to share more code with the code that deals with
normal references.
Will merge to 'master'.
* ep/shell-command-substitution-style (2016-01-12) 92 commits
(merged to 'next' on 2016-01-20 at ae1b1d8)
+ t9901-git-web--browse.sh: use the $( ... ) construct for command substitution
+ t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct for command substitution
+ t9350-fast-export.sh: use the $( ... ) construct for command substitution
+ t9300-fast-import.sh: use the $( ... ) construct for command substitution
+ t9150-svk-mergetickets.sh: use the $( ... ) construct for command substitution
+ t9145-git-svn-master-branch.sh: use the $( ... ) construct for command substitution
+ t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command substitution
+ t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct for command substitution
+ t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for command substitution
+ t9130-git-svn-authors-file.sh: use the $( ... ) construct for command substitution
+ t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for command substitution
+ t9119-git-svn-info.sh: use the $( ... ) construct for command substitution
+ t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for command substitution
+ t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command substitution
+ t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command substitution
+ t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command substitution
+ t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution
+ t9107-git-svn-migrate.sh: use the $( ... ) construct for command substitution
+ t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command substitution
+ t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command substitution
+ t9101-git-svn-props.sh: use the $( ... ) construct for command substitution
+ t9100-git-svn-basic.sh: use the $( ... ) construct for command substitution
+ t/t9001-send-email.sh: use the $( ... ) construct for command substitution
+ t/t8003-blame-corner-cases.sh: use the $( ... ) construct for command substitution
+ t/t7700-repack.sh: use the $( ... ) construct for command substitution
+ t/t7602-merge-octopus-many.sh: use the $( ... ) construct for command substitution
+ t/t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for command substitution
+ t/t7504-commit-msg-hook.sh: use the $( ... ) construct for command substitution
+ t/t7408-submodule-reference.sh: use the $( ... ) construct for command substitution
+ t/t7406-submodule-update.sh: use the $( ... ) construct for command substitution
+ t/t7103-reset-bare.sh: use the $( ... ) construct for command substitution
+ t/t7006-pager.sh: use the $( ... ) construct for command substitution
+ t/t7004-tag.sh: use the $( ... ) construct for command substitution
+ t/t7003-filter-branch.sh: use the $( ... ) construct for command substitution
+ t/t7001-mv.sh: use the $( ... ) construct for command substitution
+ t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution
+ t/t6032-merge-large-rename.sh: use the $( ... ) construct for command substitution
+ t/t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for command substitution
+ t/t6002-rev-list-bisect.sh: use the $( ... ) construct for command substitution
+ t/t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution
+ t/t5900-repo-selection.sh: use the $( ... ) construct for command substitution
+ t/t5710-info-alternate.sh: use the $( ... ) construct for command substitution
+ t/t5700-clone-reference.sh: use the $( ... ) construct for command substitution
+ t/t5601-clone.sh: use the $( ... ) construct for command substitution
+ t/t5570-git-daemon.sh: use the $( ... ) construct for command substitution
+ t/t5550-http-fetch-dumb.sh: use the $( ... ) construct for command substitution
+ t/t5538-push-shallow.sh: use the $( ... ) construct for command substitution
+ t/t5537-fetch-shallow.sh: use the $( ... ) construct for command substitution
+ t/t5532-fetch-proxy.sh: use the $( ... ) construct for command substitution
+ t/t5530-upload-pack-error.sh: use the $( ... ) construct for command substitution
+ t/t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
+ t/t5517-push-mirror.sh: use the $( ... ) construct for command substitution
+ t/t5516-fetch-push.sh: use the $( ... ) construct for command substitution
+ t/t5515-fetch-merge-logic.sh: use the $( ... ) construct for command substitution
+ t/t5510-fetch.sh: use the $( ... ) construct for command substitution
+ t/t5506-remote-groups.sh: use the $( ... ) construct for command substitution
+ t/t5505-remote.sh: use the $( ... ) construct for command substitution
+ t/t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
+ t/t5305-include-tag.sh: use the $( ... ) construct for command substitution
+ t/t5304-prune.sh: use the $( ... ) construct for command substitution
+ t/t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substitution
+ t/t5100: no need to use 'echo' command substitutions for globbing
+ t/t5302-pack-index.sh: use the $( ... ) construct for command substitution
+ t/t5301-sliding-window.sh: use the $( ... ) construct for command substitution
+ t/t5300-pack-object.sh: use the $( ... ) construct for command substitution
+ t/t5100-mailinfo.sh: use the $( ... ) construct for command substitution
+ t/t3700-add.sh: use the $( ... ) construct for command substitution
+ t/t3600-rm.sh: use the $( ... ) construct for command substitution
+ t/t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution
+ t/t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
+ t/t3210-pack-refs.sh: use the $( ... ) construct for command substitution
+ t/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution
+ t/t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution
+ t/t3030-merge-recursive.sh: use the $( ... ) construct for command substitution
+ t/t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution
+ t/t2025-worktree-add.sh: use the $( ... ) construct for command substitution
+ t/t1700-split-index.sh: use the $( ... ) construct for command substitution
+ t/t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution
+ t/t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution
+ t/t1410-reflog.sh: use the $( ... ) construct for command substitution
+ t/t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
+ t/t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution
+ unimplemented.sh: use the $( ... ) construct for command substitution
+ test-sha1.sh: use the $( ... ) construct for command substitution
+ t/lib-httpd.sh: use the $( ... ) construct for command substitution
+ git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution
+ contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-revert.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-repack.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-merge.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-fetch.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-commit.sh: use the $( ... ) construct for command substitution
A shell script style update to change `command substitution` into
$(command substitution). Coverts contrib/ and much of the t/
directory contents.
Will merge to 'master'.
* cc/untracked (2016-01-20) 11 commits
- t7063: add tests for core.untrackedCache
- test-dump-untracked-cache: don't modify the untracked cache
- config: add core.untrackedCache
- dir: simplify untracked cache "ident" field
- dir: add remove_untracked_cache()
- dir: add {new,add}_untracked_cache()
- update-index: move 'uc' var declaration
- update-index: add untracked cache notifications
- update-index: add --test-untracked-cache
- update-index: use enum for untracked cache options
- dir: free untracked cache when removing it
Update the untracked cache subsystem and change its primary UI from
"git update-index" to "git config".
Will merge to 'next'.
* dt/refs-backend-lmdb (2016-01-12) 22 commits
. DONTMERGE: compilation fix
. refs: tests for lmdb backend
. refs: add LMDB refs backend
. svn: learn ref-storage argument
. refs: allow ref backend to be set for clone
. clone: use child_process for recursive checkouts
. refs: check submodules ref storage config
. init: allow alternate backends to be set for new repos
. refs: always handle non-normal refs in files backend
. refs: resolve symbolic refs first
. refs: allow log-only updates
. refs: move duplicate check to common code
. refs: make lock generic
. refs: add method to rename refs
. refs: add methods to init refs db
. refs: add method for delete_refs
. refs: add method for initial ref transaction commit
. refs: add methods for reflog
. refs: add do_for_each_per_worktree_ref
. refs: add methods for the ref iterators
. refs: add methods for misc ref operations
. refs: add a backend method structure with transaction functions
Building on top of a few refs-backend preparatory series, LMDB
based refs backend has been plugged into the system.
Rerolled, but left out of 'pu' for now due to conflicts.
* dw/subtree-split-do-not-drop-merge (2016-01-20) 1 commit
- contrib/subtree: fix "subtree split" skipped-merge bug
The "split" subcommand of "git subtree" (in contrib/) incorrectly
skipped merges when it shouldn't, which was corrected.
Will merge to 'next'.
* kn/ref-filter-atom-parsing (2016-01-05) 15 commits
- ref-filter: introduce objectname_atom_parser()
- ref-filter: introduce contents_atom_parser()
- ref-filter: introduce remote_ref_atom_parser()
- ref-filter: align: introduce long-form syntax
- ref-filter: convert variable 'width' to an unsigned int
- ref-filter: introduce parse_align_position()
- ref-filter: introduce align_atom_parser()
- ref-filter: introduce color_atom_parser()
- ref-filter: skip deref specifier in match_atom_name()
- ref-fitler: bump match_atom() name to the top
- ref-filter: introduce parsing functions for each valid atom
- ref-filter: introduce struct used_atom
- ref-filter: bump 'used_atom' and related code to the top
- ref-filter: use strbuf_split_str_omit_term()
- strbuf: introduce strbuf_split_str_omit_term()
Refactoring of ref-filter's format-parsing code, in preparation
for "branch --format" and friends.
This replaces (for now) kn/for-each-ref-remainder, which will be built
on top.
Still being discussed and worked on.
* bb/merge-marker-crlf (2015-11-24) 1 commit
- merge-file: consider core.crlf when writing merge markers
Write out merge markers using system end-of-line convention.
Waiting for a re-roll to handle gitattributes.
($gmane/281701)
* dk/gc-more-wo-pack (2016-01-13) 4 commits
- gc: clean garbage .bitmap files from pack dir
- t5304: ensure non-garbage files are not deleted
- t5304: test .bitmap garbage files
- prepare_packed_git(): find more garbage
Follow-on to dk/gc-idx-wo-pack topic, to clean up stale
.bitmap and .keep files.
Waiting for a reroll.
($gmane/284368).
* rm/subtree-unwrap-tags (2015-11-24) 1 commit
(merged to 'next' on 2016-01-20 at 6373d95)
+ contrib/subtree: unwrap tag refs
"git subtree" (in contrib/) records the tag object name in the
commit log message when a subtree is added using a tag, without
peeling it down to the underlying commit. The tag needs to be
peeled when "git subtree split" wants to work on the commit, but
the command forgot to do so.
Will merge to 'master'.
* sg/sh-require-clean-orphan (2015-11-24) 2 commits
- sh-setup: make require_clean_work_tree() work on orphan branches
- Add tests for git-sh-setup's require_clean_work_tree()
Allow users of git-sh-setup to handle orphan branch state.
This series takes the conservative route of requiring scripts to opt
into the looser behavior, at the expense of carrying around a new
option-flag forever. I'm not sure if we need to do so.
Needs review.
* tb/ls-files-eol (2016-01-18) 1 commit
- ls-files: add eol diagnostics
Add options to ls-files to help diagnose end-of-line problems.
Will merge to 'next'.
* ec/annotate-deleted (2015-11-20) 1 commit
- annotate: skip checking working tree if a revision is provided
Usability fix for annotate-specific "<file> <rev>" syntax with deleted
files.
Waiting for review.
* sb/submodule-parallel-update (2016-01-12) 8 commits
- clone: allow an explicit argument for parallel submodule clones
- submodule update: expose parallelism to the user
- git submodule update: have a dedicated helper for cloning
- fetching submodules: respect `submodule.fetchJobs` config option
- submodule-config: introduce parse_generic_submodule_config
- submodule-config: remove name_and_item_from_var
- submodule-config: drop check against NULL
- submodule-config: keep update strategy around
(this branch is used by sb/submodule-init.)
Builds on top of the "fetch --recurse-submodules" work to introduce
parallel downloading into multiple submodules for "submodule update".
Needs review.
* jc/strbuf-getline (2016-01-15) 9 commits
- strbuf: give strbuf_getline() to the "most text friendly" variant
- checkout-index: there are only two possible line terminations
- update-index: there are only two possible line terminations
- check-ignore: there are only two possible line terminations
- check-attr: there are only two possible line terminations
- mktree: there are only two possible line terminations
- strbuf: introduce strbuf_getline_{lf,nul}()
- strbuf: make strbuf_getline_crlf() global
- strbuf: miniscule style fix
(this branch is used by jc/peace-with-crlf.)
The preliminary clean-up for jc/peace-with-crlf topic.
Will merge to 'next'.
* js/am-3-merge-recursive-direct (2015-10-12) 2 commits
- am: make a direct call to merge_recursive
- merge_recursive_options: introduce the "gently" flag
The merge_recursive_generic() function has been made a bit safer to
call from inside a process. "git am -3" was taught to make a direct
call to the function when falling back to three-way merge.
Being able to make a direct call would be good in general, but as a
performance thing, the change needs to be backed up by numbers.
Needs review.
I haven't gone through the "gently" change with fine toothed comb;
I can see that the change avoids calling die(), but I haven't made
sure that the program states (e.g. what's in the in-core index) are
adjusted sensibly when it returns to the caller instead of dying,
or the codepaths that used to die() are free of resource leaks.
The original code certainly did not care the program states at the
point of dying exactly because it knew it is going to exit, but now
they have to care, and they need to be audited.
* ad/cygwin-wants-rename (2015-08-07) 1 commit
- config.mak.uname: Cygwin needs OBJECT_CREATION_USES_RENAMES
Will hold.
($gmane/275680).
* jc/rerere-multi (2015-09-14) 7 commits
- rerere: do use multiple variants
- t4200: rerere a merge with two identical conflicts
- rerere: allow multiple variants to exist
- rerere: delay the recording of preimage
- rerere: handle leftover rr-cache/$ID directory and postimage files
- rerere: scan $GIT_DIR/rr-cache/$ID when instantiating a rerere_id
- rerere: split conflict ID further
"git rerere" can encounter two or more files with the same conflict
signature that have to be resolved in different ways, but there was
no way to record these separate resolutions.
Needs review.
* jc/merge-drop-old-syntax (2015-04-29) 1 commit
- merge: drop 'git merge <message> HEAD <commit>' syntax
Stop supporting "git merge <message> HEAD <commit>" syntax that has
been deprecated since October 2007. It has been reported that
git-gui still uses the deprecated syntax, which needs to be fixed
before this final step can proceed.
($gmane/282594)
^ permalink raw reply [relevance 1%]
* What's cooking in git.git (Jan 2016, #05; Tue, 26)
@ 2016-01-27 0:27 1% Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2016-01-27 0:27 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'. The ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.
The tip of 'master' now has a few batches of topics merged, some of
which should later be merged to 'maint'. There are a few topics
that are v2.7.0 regression fixes still cooking outside 'master',
which also need to be merged to 'maint' for the maintenance release.
Quite a many topics have been merged to 'next', all of them feel
quite solid. Hopefully more to follow in the rest of the week.
A big thank-you to Elia Pinto for resurrecting a long-stalled http
proxy-auth topic.
You can find the changes described here in the integration branches of the
repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[Graduated to "master"]
* ak/format-patch-odir-config (2016-01-13) 1 commit
(merged to 'next' on 2016-01-20 at 97c699b)
+ format-patch: introduce format.outputDirectory configuration
"git format-patch" learned to notice format.outputDirectory
configuration variable. This allows "-o <dir>" option to be
omitted on the command line if you always use the same directory in
your workflow.
* ep/shell-command-substitution-style (2016-01-12) 92 commits
(merged to 'next' on 2016-01-20 at ae1b1d8)
+ t9901-git-web--browse.sh: use the $( ... ) construct for command substitution
+ t9501-gitweb-standalone-http-status.sh: use the $( ... ) construct for command substitution
+ t9350-fast-export.sh: use the $( ... ) construct for command substitution
+ t9300-fast-import.sh: use the $( ... ) construct for command substitution
+ t9150-svk-mergetickets.sh: use the $( ... ) construct for command substitution
+ t9145-git-svn-master-branch.sh: use the $( ... ) construct for command substitution
+ t9138-git-svn-authors-prog.sh: use the $( ... ) construct for command substitution
+ t9137-git-svn-dcommit-clobber-series.sh: use the $( ... ) construct for command substitution
+ t9132-git-svn-broken-symlink.sh: use the $( ... ) construct for command substitution
+ t9130-git-svn-authors-file.sh: use the $( ... ) construct for command substitution
+ t9129-git-svn-i18n-commitencoding.sh: use the $( ... ) construct for command substitution
+ t9119-git-svn-info.sh: use the $( ... ) construct for command substitution
+ t9118-git-svn-funky-branch-names.sh: use the $( ... ) construct for command substitution
+ t9114-git-svn-dcommit-merge.sh: use the $( ... ) construct for command substitution
+ t9110-git-svn-use-svm-props.sh: use the $( ... ) construct for command substitution
+ t9109-git-svn-multi-glob.sh: use the $( ... ) construct for command substitution
+ t9108-git-svn-glob.sh: use the $( ... ) construct for command substitution
+ t9107-git-svn-migrate.sh: use the $( ... ) construct for command substitution
+ t9105-git-svn-commit-diff.sh: use the $( ... ) construct for command substitution
+ t9104-git-svn-follow-parent.sh: use the $( ... ) construct for command substitution
+ t9101-git-svn-props.sh: use the $( ... ) construct for command substitution
+ t9100-git-svn-basic.sh: use the $( ... ) construct for command substitution
+ t/t9001-send-email.sh: use the $( ... ) construct for command substitution
+ t/t8003-blame-corner-cases.sh: use the $( ... ) construct for command substitution
+ t/t7700-repack.sh: use the $( ... ) construct for command substitution
+ t/t7602-merge-octopus-many.sh: use the $( ... ) construct for command substitution
+ t/t7505-prepare-commit-msg-hook.sh: use the $( ... ) construct for command substitution
+ t/t7504-commit-msg-hook.sh: use the $( ... ) construct for command substitution
+ t/t7408-submodule-reference.sh: use the $( ... ) construct for command substitution
+ t/t7406-submodule-update.sh: use the $( ... ) construct for command substitution
+ t/t7103-reset-bare.sh: use the $( ... ) construct for command substitution
+ t/t7006-pager.sh: use the $( ... ) construct for command substitution
+ t/t7004-tag.sh: use the $( ... ) construct for command substitution
+ t/t7003-filter-branch.sh: use the $( ... ) construct for command substitution
+ t/t7001-mv.sh: use the $( ... ) construct for command substitution
+ t/t6132-pathspec-exclude.sh: use the $( ... ) construct for command substitution
+ t/t6032-merge-large-rename.sh: use the $( ... ) construct for command substitution
+ t/t6015-rev-list-show-all-parents.sh: use the $( ... ) construct for command substitution
+ t/t6002-rev-list-bisect.sh: use the $( ... ) construct for command substitution
+ t/t6001-rev-list-graft.sh: use the $( ... ) construct for command substitution
+ t/t5900-repo-selection.sh: use the $( ... ) construct for command substitution
+ t/t5710-info-alternate.sh: use the $( ... ) construct for command substitution
+ t/t5700-clone-reference.sh: use the $( ... ) construct for command substitution
+ t/t5601-clone.sh: use the $( ... ) construct for command substitution
+ t/t5570-git-daemon.sh: use the $( ... ) construct for command substitution
+ t/t5550-http-fetch-dumb.sh: use the $( ... ) construct for command substitution
+ t/t5538-push-shallow.sh: use the $( ... ) construct for command substitution
+ t/t5537-fetch-shallow.sh: use the $( ... ) construct for command substitution
+ t/t5532-fetch-proxy.sh: use the $( ... ) construct for command substitution
+ t/t5530-upload-pack-error.sh: use the $( ... ) construct for command substitution
+ t/t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
+ t/t5517-push-mirror.sh: use the $( ... ) construct for command substitution
+ t/t5516-fetch-push.sh: use the $( ... ) construct for command substitution
+ t/t5515-fetch-merge-logic.sh: use the $( ... ) construct for command substitution
+ t/t5510-fetch.sh: use the $( ... ) construct for command substitution
+ t/t5506-remote-groups.sh: use the $( ... ) construct for command substitution
+ t/t5505-remote.sh: use the $( ... ) construct for command substitution
+ t/t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
+ t/t5305-include-tag.sh: use the $( ... ) construct for command substitution
+ t/t5304-prune.sh: use the $( ... ) construct for command substitution
+ t/t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substitution
+ t/t5100: no need to use 'echo' command substitutions for globbing
+ t/t5302-pack-index.sh: use the $( ... ) construct for command substitution
+ t/t5301-sliding-window.sh: use the $( ... ) construct for command substitution
+ t/t5300-pack-object.sh: use the $( ... ) construct for command substitution
+ t/t5100-mailinfo.sh: use the $( ... ) construct for command substitution
+ t/t3700-add.sh: use the $( ... ) construct for command substitution
+ t/t3600-rm.sh: use the $( ... ) construct for command substitution
+ t/t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution
+ t/t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
+ t/t3210-pack-refs.sh: use the $( ... ) construct for command substitution
+ t/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution
+ t/t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution
+ t/t3030-merge-recursive.sh: use the $( ... ) construct for command substitution
+ t/t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution
+ t/t2025-worktree-add.sh: use the $( ... ) construct for command substitution
+ t/t1700-split-index.sh: use the $( ... ) construct for command substitution
+ t/t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution
+ t/t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution
+ t/t1410-reflog.sh: use the $( ... ) construct for command substitution
+ t/t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
+ t/t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution
+ unimplemented.sh: use the $( ... ) construct for command substitution
+ test-sha1.sh: use the $( ... ) construct for command substitution
+ t/lib-httpd.sh: use the $( ... ) construct for command substitution
+ git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution
+ contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-revert.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-repack.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-merge.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-fetch.sh: use the $( ... ) construct for command substitution
+ contrib/examples/git-commit.sh: use the $( ... ) construct for command substitution
A shell script style update to change `command substitution` into
$(command substitution). Coverts contrib/ and much of the t/
directory contents.
* jk/ok-to-fail-gc-auto-in-rebase (2016-01-13) 1 commit
(merged to 'next' on 2016-01-20 at c9a8e82)
+ rebase: ignore failures from "gc --auto"
"git rebase", unlike all other callers of "gc --auto", did not
ignore the exit code from "gc --auto".
* jk/symbolic-ref (2016-01-13) 6 commits
(merged to 'next' on 2016-01-20 at 30b5408)
+ lock_ref_sha1_basic: handle REF_NODEREF with invalid refs
+ lock_ref_sha1_basic: always fill old_oid while holding lock
+ checkout,clone: check return value of create_symref
+ create_symref: write reflog while holding lock
+ create_symref: use existing ref-lock code
+ create_symref: modernize variable names
The low-level code that is used to create symbolic references has
been updated to share more code with the code that deals with
normal references.
* js/close-packs-before-gc (2016-01-13) 4 commits
(merged to 'next' on 2016-01-20 at 16cf87b)
+ receive-pack: release pack files before garbage-collecting
+ merge: release pack files before garbage-collecting
+ am: release pack files before garbage-collecting
+ fetch: release pack files before garbage-collecting
Many codepaths that run "gc --auto" before exiting kept packfiles
mapped and left the file descriptors to them open, which was not
friendly to systems that cannot remove files that are open. They
now close the packs before doing so.
* js/pull-rebase-i (2016-01-13) 3 commits
(merged to 'next' on 2016-01-20 at a0c5440)
+ completion: add missing branch.*.rebase values
+ remote: handle the config setting branch.*.rebase=interactive
+ pull: allow interactive rebase with --rebase=interactive
"git pull --rebase" has been extended to allow invoking
"rebase -i".
* rm/subtree-unwrap-tags (2015-11-24) 1 commit
(merged to 'next' on 2016-01-20 at 6373d95)
+ contrib/subtree: unwrap tag refs
"git subtree" (in contrib/) records the tag object name in the
commit log message when a subtree is added using a tag, without
peeling it down to the underlying commit. The tag needs to be
peeled when "git subtree split" wants to work on the commit, but
the command forgot to do so.
* rp/p4-filetype-change (2016-01-13) 1 commit
(merged to 'next' on 2016-01-20 at 7b5954b)
+ git-p4.py: add support for filetype change
"git p4" learned to cope with the type of a file getting changed.
--------------------------------------------------
[New Topics]
* lv/add-doc-working-tree (2016-01-21) 1 commit
(merged to 'next' on 2016-01-26 at c5b1ab1)
+ git-add doc: do not say working directory when you mean working tree
Will merge to 'master'.
* mk/asciidoctor-bq-workaround (2016-01-20) 1 commit
(merged to 'next' on 2016-01-26 at 19a742a)
+ Documentation: remove unnecessary backslashes
Will merge to 'master'.
* nd/diff-with-path-params (2016-01-21) 2 commits
(merged to 'next' on 2016-01-26 at b29a363)
+ diff: make -O and --output work in subdirectory
+ diff-no-index: do not take a redundant prefix argument
A few options of "git diff" did not work well when the command was
run from a subdirectory.
Will merge to 'master'.
* tb/complete-word-diff-regex (2016-01-20) 1 commit
(merged to 'next' on 2016-01-26 at a5beecc)
+ completion: complete "diff --word-diff-regex="
Will merge to 'master'.
* tg/ls-remote-symref (2016-01-19) 5 commits
(merged to 'next' on 2016-01-26 at e466ee2)
+ ls-remote: add support for showing symrefs
+ ls-remote: use parse-options api
+ ls-remote: fix synopsis
+ ls-remote: document --refs option
+ ls-remote: document --quiet option
Teach "ls-remote" an option to show which branch the remote
repository advertises as its primary by pointing its HEAD at.
Will merge to 'master'.
* jk/ref-cache-non-repository-optim (2016-01-25) 2 commits
(merged to 'next' on 2016-01-26 at 09057bc)
+ resolve_gitlink_ref: ignore non-repository paths
+ clean: make is_git_repository a public function
Teach the underlying machinery used by "ls-files -o" and other
commands not to create empty submodule ref cache for a directory
that is not a submodule. This removes a ton of wasted CPU cycles.
Will merge to 'master'.
* jk/completion-rebase (2016-01-25) 1 commit
(merged to 'next' on 2016-01-26 at def3e0b)
+ completion: add missing git-rebase options
Will merge to 'master'.
* jk/list-tag-2.7-regression (2016-01-26) 2 commits
(merged to 'next' on 2016-01-26 at fb9ccee)
+ tag: do not show ambiguous tag names as "tags/foo"
+ t6300: use test_atom for some un-modern tests
"git tag" started listing a tag "foo" as "tags/foo" when a branch
named "foo" exists in the same repository; remove this unnecessary
disambiguation, which is a regression introduced in v2.7.0.
Will merge to 'master'.
* pw/completion-show-branch (2016-01-25) 1 commit
(merged to 'next' on 2016-01-26 at d0d7735)
+ completion: complete show-branch "--date-order"
Will merge to 'master'.
* js/mingw-tests (2016-01-26) 20 commits
- mingw: skip a test in t9130 that cannot pass on Windows
- mingw: do not bother to test funny file names
- mingw: handle the missing POSIXPERM prereq in t9124
- mingw: avoid illegal filename in t9118
- mingw: mark t9100's test cases with appropriate prereqs
- Avoid absolute path in t0008
- mingw: work around pwd issues in the tests
- mingw: fix t9700's assumption about directory separators
- mingw: skip test in t1508 that fails due to path conversion
- tests: turn off git-daemon tests if FIFOs are not available
- mingw: disable mkfifo-based tests
- mingw: accomodate t0060-path-utils for MSYS2
- mingw: fix t5601-clone.sh
- mingw: let lstat() fail with errno == ENOTDIR when appropriate
- mingw: try to delete target directory before renaming
- mingw: prepare the TMPDIR environment variable for shell scripts
- mingw: factor out Windows specific environment setup
- Git.pm: stop assuming that absolute paths start with a slash
- mingw: do not trust MSYS2's MinGW gettext.sh
- mingw: let's use gettext with MSYS2
(this branch uses js/msys2.)
Updates test scripts to remove assumptions that are not portable
between Git for POSIX and Git for Windows, or to skip ones with
expectations that are not satisfiable on Git for Windows.
Looks mostly done, but I had to tweak a few things, so
Waiting for re-test.
* js/xmerge-maker-eol (2016-01-26) 2 commits
- merge-file: ensure that conflict sections match eol style
- merge-file: let conflict markers match end-of-line style of the context
The low-level merge machinery has been taught to use CRLF line
termination when inserting conflict markers to merged contents that
are themselves CRLF line-terminated.
Will merge to 'next'.
* nd/clear-gitenv-upon-use-of-alias (2016-01-26) 3 commits
- git: simplify environment save/restore logic
- git: protect against unbalanced calls to {save,restore}_env()
- git: remove an early return from save_env_before_alias()
The automatic typo correction applied to an alias was broken
with a recent change already in 'master'.
Waiting for a response.
This is my attempt to clarify an original from Duy by splitting it
into a minimal fix and clean-up.
* pw/completion-stash (2016-01-26) 1 commit
(merged to 'next' on 2016-01-26 at e41153c)
+ completion: update completion arguments for stash
Will merge to 'master'.
--------------------------------------------------
[Stalled]
* mg/httpd-tests-update-for-apache-2.4 (2015-04-08) 2 commits
- t/lib-git-svn: check same httpd module dirs as lib-httpd
- t/lib-httpd: load mod_unixd
This is the first two commits in a three-patch series $gmane/266962
Becoming tired of waiting for a reroll.
with updated log message ($gmane/268061).
Will discard.
* jc/diff-b-m (2015-02-23) 5 commits
. WIPWIP
. WIP: diff-b-m
- diffcore-rename: allow easier debugging
- diffcore-rename.c: add locate_rename_src()
- diffcore-break: allow debugging
"git diff -B -M" produced incorrect patch when the postimage of a
completely rewritten file is similar to the preimage of a removed
file; such a resulting file must not be expressed as a rename from
other place.
The fix in this patch is broken, unfortunately.
Will discard.
--------------------------------------------------
[Cooking]
* kf/http-proxy-auth-methods (2016-01-26) 2 commits
- http: use credential API to handle proxy authentication
- http: allow selection of proxy authentication method
New http.proxyAuthMethod configuration variable can be used to
specify what authentication method to use, as a way to work around
proxies that do not give error response expected by libcurl when
CURLAUTH_ANY is used. Also, the codepath for proxy authentication
has been taught to use credential API to store the authentication
material in user's keyrings.
Will merge to 'next'.
* dg/subtree-rebase-test (2016-01-19) 1 commit
- contrib/subtree: Add a test for subtree rebase that loses commits
Reviewed up to v5.
Will be rerolled.
($gmane/284426)
* jk/shortlog (2016-01-19) 7 commits
(merged to 'next' on 2016-01-22 at f1c688c)
+ shortlog: don't warn on empty author
+ shortlog: optimize out useless string list
+ shortlog: optimize out useless "<none>" normalization
+ shortlog: optimize "--summary" mode
+ shortlog: replace hand-parsing of author with pretty-printer
+ shortlog: use strbufs to read from stdin
+ shortlog: match both "Author:" and "author" on stdin
"git shortlog" used to accumulate various pieces of information
regardless of what was asked to be shown in the final output. It
has been optimized by noticing what need not to be collected
(e.g. there is no need to collect the log messages when showing
only the number of changes).
Will merge to 'master'.
* jc/peace-with-crlf (2016-01-15) 12 commits
(merged to 'next' on 2016-01-26 at 08724bc)
+ test-sha1-array: read command stream with strbuf_getline()
+ grep: read -f file with strbuf_getline()
+ send-pack: read list of refs with strbuf_getline()
+ column: read lines with strbuf_getline()
+ cat-file: read batch stream with strbuf_getline()
+ transport-helper: read helper response with strbuf_getline()
+ clone/sha1_file: read info/alternates with strbuf_getline()
+ remote.c: read $GIT_DIR/remotes/* with strbuf_getline()
+ ident.c: read /etc/mailname with strbuf_getline()
+ rev-parse: read parseopt spec with strbuf_getline()
+ revision: read --stdin with strbuf_getline()
+ hash-object: read --stdin-paths with strbuf_getline()
(this branch uses jc/strbuf-getline.)
Teach codepaths that communicate with users by reading text files
to be more lenient to editors that write CRLF-terminated lines.
Note that this is only about communication with Git, like feeding
list of object names from the standard input instead of from the
command line, and does not involve files in the working tree.
Will merge to 'master'.
* dg/subtree-test (2016-01-19) 1 commit
(merged to 'next' on 2016-01-26 at 81f1356)
+ contrib/subtree: Make testing easier
Will merge to 'master'.
* jk/filter-branch-no-index (2016-01-19) 1 commit
(merged to 'next' on 2016-01-22 at 312aa2c)
+ filter-branch: resolve $commit^{tree} in no-index case
A recent optimization to filter-branch in v2.7.0 introduced a
regression when --prune-empty filter is used, which has been
corrected.
Will merge to 'master'.
* jk/sanity (2016-01-19) 1 commit
(merged to 'next' on 2016-01-22 at 612cc5f)
+ test-lib: clarify and tighten SANITY
The description for SANITY prerequisite the test suite uses has
been clarified both in the comment and in the implementation.
Will merge to 'master'.
* ls/travis-prove-order (2016-01-26) 2 commits
(merged to 'next' on 2016-01-26 at d8e2a4a)
+ travis-ci: explicity use container-based infrastructure
+ travis-ci: run previously failed tests first, then slowest to fastest
By persisting runtime statistics of previous "prove" run, execute
tests that take longer before other ones, to reduce the total
wallclock time when running with Travis CI.
Will merge to 'master'.
* nd/do-not-move-worktree-manually (2016-01-22) 2 commits
(merged to 'next' on 2016-01-26 at c539221)
+ worktree: stop supporting moving worktrees manually
+ worktree.c: fix indentation
"git worktree" had a broken code that attempted to auto-fix
possible inconsistency that results from end-users moving a
worktree to different places without telling Git (the original
repository needs to maintain backpointers to its worktrees, but
"mv" run by end-users who are not familiar with that fact will
obviously not adjust them), which actually made things worse
when triggered.
Will merge to 'master'.
* sb/submodule-init (2016-01-25) 2 commits
- submodule: port init from shell to C
- submodule: port resolve_relative_url from shell to C
(this branch uses sb/submodule-parallel-update.)
Major part of "git submodule init" has been ported to C.
Will have to wait for 'sb/submodule-parallel-update'.
* js/msys2 (2016-01-15) 9 commits
(merged to 'next' on 2016-01-22 at 8bab6ab)
+ mingw: uglify (a, 0) definitions to shut up warnings
+ mingw: squash another warning about a cast
+ mingw: avoid warnings when casting HANDLEs to int
+ mingw: avoid redefining S_* constants
+ compat/winansi: support compiling with MSys2
+ compat/mingw: support MSys2-based MinGW build
+ nedmalloc: allow compiling with MSys2's compiler
+ config.mak.uname: supporting 64-bit MSys2
+ config.mak.uname: support MSys2
(this branch is used by js/mingw-tests.)
Beginning of the upstreaming process of Git for Windows effort.
Will merge to 'master'.
* tk/interpret-trailers-in-place (2016-01-14) 2 commits
(merged to 'next' on 2016-01-22 at 5db0cf8)
+ interpret-trailers: add option for in-place editing
+ trailer: allow to write to files other than stdout
"interpret-trailers" has been taught to optionally update a file in
place, instead of always writing the result to the standard output.
Will merge to 'master'.
* js/dirname-basename (2016-01-25) 6 commits
(merged to 'next' on 2016-01-26 at b16b2b8)
+ mingw: avoid linking to the C library's isalpha()
(merged to 'next' on 2016-01-20 at d198512)
+ t0060: loosen overly strict expectations
(merged to 'next' on 2016-01-12 at c3c970a)
+ t0060: verify that basename() and dirname() work as expected
+ compat/basename.c: provide a dirname() compatibility function
+ compat/basename: make basename() conform to POSIX
+ Refactor skipping DOS drive prefixes
dirname() emulation has been added, as Msys2 lacks it.
Will merge to 'master'.
* wp/sha1-name-negative-match (2016-01-13) 2 commits
- object name: introduce '^{/!-<negative pattern>}' notation
- test for '!' handling in rev-parse's named commits
Introduce "<branch>^{/!-<pattern>}" notation to name a commit
reachable from <branch> that does not match the given <pattern>.
A questionable corner case where commit has no message remains.
Waiting for review.
($gmane/283971)
* jk/notes-merge-from-anywhere (2016-01-17) 1 commit
(merged to 'next' on 2016-01-26 at c60ac66)
+ notes: allow merging from arbitrary references
"git notes merge" used to limit the source of the merged notes tree
to somewhere under refs/notes/ hierarchy, which was too limiting
when inventing a workflow to exchange notes with remote
repositories using remote-tracking notes trees (located in e.g.
refs/remote-notes/ or somesuch).
Will merge to 'master'.
* dt/unpack-compare-entry-optim (2016-01-22) 2 commits
(merged to 'next' on 2016-01-26 at 110e053)
+ unpack-trees: fix accidentally quadratic behavior
(merged to 'next' on 2016-01-20 at 180dccf)
+ do_compare_entry: use already-computed path
"git checkout $branch" (and other operations that share the same
underlying machinery) has been optimized.
Will merge to 'master'.
* cc/untracked (2016-01-25) 11 commits
- t7063: add tests for core.untrackedCache
- test-dump-untracked-cache: don't modify the untracked cache
- config: add core.untrackedCache
- dir: simplify untracked cache "ident" field
- dir: add remove_untracked_cache()
- dir: add {new,add}_untracked_cache()
- update-index: move 'uc' var declaration
- update-index: add untracked cache notifications
- update-index: add --test-untracked-cache
- update-index: use enum for untracked cache options
- dir: free untracked cache when removing it
Update the untracked cache subsystem and change its primary UI from
"git update-index" to "git config".
Will merge to 'next'.
* dt/refs-backend-lmdb (2016-01-12) 22 commits
. DONTMERGE: compilation fix
. refs: tests for lmdb backend
. refs: add LMDB refs backend
. svn: learn ref-storage argument
. refs: allow ref backend to be set for clone
. clone: use child_process for recursive checkouts
. refs: check submodules ref storage config
. init: allow alternate backends to be set for new repos
. refs: always handle non-normal refs in files backend
. refs: resolve symbolic refs first
. refs: allow log-only updates
. refs: move duplicate check to common code
. refs: make lock generic
. refs: add method to rename refs
. refs: add methods to init refs db
. refs: add method for delete_refs
. refs: add method for initial ref transaction commit
. refs: add methods for reflog
. refs: add do_for_each_per_worktree_ref
. refs: add methods for the ref iterators
. refs: add methods for misc ref operations
. refs: add a backend method structure with transaction functions
Building on top of a few refs-backend preparatory series, LMDB
based refs backend has been plugged into the system.
Rerolled, but left out of 'pu' for now due to conflicts.
* dw/subtree-split-do-not-drop-merge (2016-01-20) 1 commit
(merged to 'next' on 2016-01-26 at 3cfefef)
+ contrib/subtree: fix "subtree split" skipped-merge bug
The "split" subcommand of "git subtree" (in contrib/) incorrectly
skipped merges when it shouldn't, which was corrected.
Will merge to 'master'.
* kn/ref-filter-atom-parsing (2016-01-05) 15 commits
. ref-filter: introduce objectname_atom_parser()
. ref-filter: introduce contents_atom_parser()
. ref-filter: introduce remote_ref_atom_parser()
. ref-filter: align: introduce long-form syntax
. ref-filter: convert variable 'width' to an unsigned int
. ref-filter: introduce parse_align_position()
. ref-filter: introduce align_atom_parser()
. ref-filter: introduce color_atom_parser()
. ref-filter: skip deref specifier in match_atom_name()
. ref-fitler: bump match_atom() name to the top
. ref-filter: introduce parsing functions for each valid atom
. ref-filter: introduce struct used_atom
. ref-filter: bump 'used_atom' and related code to the top
. ref-filter: use strbuf_split_str_omit_term()
. strbuf: introduce strbuf_split_str_omit_term()
Refactoring of ref-filter's format-parsing code, in preparation
for "branch --format" and friends.
Ejected as this will need to be rerolled on top of regression fix
for "git tag" that started sharing the internal machinery with
ref-filter that happened in v2.7.0.
Needs reroll.
($gmane/284776).
* dk/gc-more-wo-pack (2016-01-13) 4 commits
- gc: clean garbage .bitmap files from pack dir
- t5304: ensure non-garbage files are not deleted
- t5304: test .bitmap garbage files
- prepare_packed_git(): find more garbage
Follow-on to dk/gc-idx-wo-pack topic, to clean up stale
.bitmap and .keep files.
Waiting for a reroll.
($gmane/284368).
* tb/ls-files-eol (2016-01-18) 1 commit
(merged to 'next' on 2016-01-26 at bc9246f)
+ ls-files: add eol diagnostics
Add options to ls-files to help diagnose end-of-line problems.
Will merge to 'master'.
* ec/annotate-deleted (2015-11-20) 1 commit
- annotate: skip checking working tree if a revision is provided
Usability fix for annotate-specific "<file> <rev>" syntax with deleted
files.
Waiting for review.
* sb/submodule-parallel-update (2016-01-12) 8 commits
- clone: allow an explicit argument for parallel submodule clones
- submodule update: expose parallelism to the user
- git submodule update: have a dedicated helper for cloning
- fetching submodules: respect `submodule.fetchJobs` config option
- submodule-config: introduce parse_generic_submodule_config
- submodule-config: remove name_and_item_from_var
- submodule-config: drop check against NULL
- submodule-config: keep update strategy around
(this branch is used by sb/submodule-init.)
Builds on top of the "fetch --recurse-submodules" work to introduce
parallel downloading into multiple submodules for "submodule update".
Needs review.
* jc/strbuf-getline (2016-01-15) 9 commits
(merged to 'next' on 2016-01-22 at 8c4e051)
+ strbuf: give strbuf_getline() to the "most text friendly" variant
+ checkout-index: there are only two possible line terminations
+ update-index: there are only two possible line terminations
+ check-ignore: there are only two possible line terminations
+ check-attr: there are only two possible line terminations
+ mktree: there are only two possible line terminations
+ strbuf: introduce strbuf_getline_{lf,nul}()
+ strbuf: make strbuf_getline_crlf() global
+ strbuf: miniscule style fix
(this branch is used by jc/peace-with-crlf.)
The preliminary clean-up for jc/peace-with-crlf topic.
Will merge to 'master'.
* js/am-3-merge-recursive-direct (2015-10-12) 2 commits
- am: make a direct call to merge_recursive
- merge_recursive_options: introduce the "gently" flag
The merge_recursive_generic() function has been made a bit safer to
call from inside a process. "git am -3" was taught to make a direct
call to the function when falling back to three-way merge.
Being able to make a direct call would be good in general, but as a
performance thing, the change needs to be backed up by numbers.
Needs review.
I haven't gone through the "gently" change with fine toothed comb;
I can see that the change avoids calling die(), but I haven't made
sure that the program states (e.g. what's in the in-core index) are
adjusted sensibly when it returns to the caller instead of dying,
or the codepaths that used to die() are free of resource leaks.
The original code certainly did not care the program states at the
point of dying exactly because it knew it is going to exit, but now
they have to care, and they need to be audited.
* ad/cygwin-wants-rename (2015-08-07) 1 commit
- config.mak.uname: Cygwin needs OBJECT_CREATION_USES_RENAMES
Will hold.
($gmane/275680).
* jc/rerere-multi (2016-01-21) 7 commits
- rerere: do use multiple variants
- t4200: rerere a merge with two identical conflicts
- rerere: allow multiple variants to exist
- rerere: delay the recording of preimage
- rerere: handle leftover rr-cache/$ID directory and postimage files
- rerere: scan $GIT_DIR/rr-cache/$ID when instantiating a rerere_id
- rerere: split conflict ID further
"git rerere" can encounter two or more files with the same conflict
signature that have to be resolved in different ways, but there was
no way to record these separate resolutions.
Needs further work on forget/gc.
* jc/merge-drop-old-syntax (2015-04-29) 1 commit
- merge: drop 'git merge <message> HEAD <commit>' syntax
Stop supporting "git merge <message> HEAD <commit>" syntax that has
been deprecated since October 2007. It has been reported that
git-gui still uses the deprecated syntax, which needs to be fixed
before this final step can proceed.
($gmane/282594)
--------------------------------------------------
[Discarded]
* bb/merge-marker-crlf (2015-11-24) 1 commit
. merge-file: consider core.crlf when writing merge markers
Resurrected as 'js/xmerge-maker-eol'.
* sg/sh-require-clean-orphan (2015-11-24) 2 commits
. sh-setup: make require_clean_work_tree() work on orphan branches
. Add tests for git-sh-setup's require_clean_work_tree()
Allow users of git-sh-setup to handle orphan branch state.
($gmane/284488)
^ permalink raw reply [relevance 1%]
* [PATCH 1/5] README: use markdown syntax
2016-02-23 17:40 5% [RFC/PATCH 0/5] Make README more pleasant to read Matthieu Moy
@ 2016-02-23 17:40 13% ` Matthieu Moy
2016-02-23 19:07 0% ` Junio C Hamano
2016-02-24 10:22 0% ` [RFC/PATCH 0/5] Make README more pleasant to read Jeff King
1 sibling, 1 reply; 200+ results
From: Matthieu Moy @ 2016-02-23 17:40 UTC (permalink / raw)
To: git; +Cc: emma.westby, Matthieu Moy
This allows repository browsers like GitHub to display the content of
the file nicely formatted.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
README => README.md | 6 +-----
t/t7001-mv.sh | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
rename README => README.md (93%)
diff --git a/README b/README.md
similarity index 93%
rename from README
rename to README.md
index 1083735..907eb3b 100644
--- a/README
+++ b/README.md
@@ -1,8 +1,4 @@
-////////////////////////////////////////////////////////////////
-
- Git - the stupid content tracker
-
-////////////////////////////////////////////////////////////////
+# Git - the stupid content tracker
"git" can mean anything, depending on your mood.
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 51dd2b4..4008fae 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -102,7 +102,7 @@ test_expect_success \
test_expect_success \
'adding another file' \
- 'cp "$TEST_DIRECTORY"/../README path0/README &&
+ 'cp "$TEST_DIRECTORY"/../README.md path0/README &&
git add path0/README &&
git commit -m add2 -a'
--
2.7.2.334.g35ed2ae.dirty
^ permalink raw reply related [relevance 13%]
* [RFC/PATCH 0/5] Make README more pleasant to read
@ 2016-02-23 17:40 5% Matthieu Moy
2016-02-23 17:40 13% ` [PATCH 1/5] README: use markdown syntax Matthieu Moy
2016-02-24 10:22 0% ` [RFC/PATCH 0/5] Make README more pleasant to read Jeff King
0 siblings, 2 replies; 200+ results
From: Matthieu Moy @ 2016-02-23 17:40 UTC (permalink / raw)
To: git; +Cc: emma.westby, Matthieu Moy
This patch series was inspired by a discussion I had with Emma Jane
after Git Merge last year. It tries both to make the README file less
agressive and generally more pleasant to read.
To get a quick overview, compare the old one:
https://github.com/git/git#readme
and my proposal:
https://github.com/moy/git/tree/git-readme#readme
Matthieu Moy (5):
README: use markdown syntax
README.md: add hyperlinks on filenames
README.md: move the link to git-scm.com up
README.md: don't call git stupid in the title
README.md: move down historical explanation about the name
README => README.md | 54 ++++++++++++++++++++++++++++-------------------------
t/t7001-mv.sh | 2 +-
2 files changed, 30 insertions(+), 26 deletions(-)
rename README => README.md (67%)
--
2.7.2.334.g35ed2ae.dirty
^ permalink raw reply [relevance 5%]
* Re: [PATCH 1/5] README: use markdown syntax
2016-02-23 17:40 13% ` [PATCH 1/5] README: use markdown syntax Matthieu Moy
@ 2016-02-23 19:07 0% ` Junio C Hamano
0 siblings, 0 replies; 200+ results
From: Junio C Hamano @ 2016-02-23 19:07 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git, emma.westby
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> This allows repository browsers like GitHub to display the content of
> the file nicely formatted.
>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
> ---
To be honest, I have the most problem with this step in the whole
series.
Markdown when rendered may be easier to read, but plain text is even
easier, and it somehow feels backward to cater to those who browse
at GitHub sacrificing those who use "less" in the source tree.
> README => README.md | 6 +-----
> t/t7001-mv.sh | 2 +-
> 2 files changed, 2 insertions(+), 6 deletions(-)
> rename README => README.md (93%)
>
> diff --git a/README b/README.md
> similarity index 93%
> rename from README
> rename to README.md
> index 1083735..907eb3b 100644
> --- a/README
> +++ b/README.md
> @@ -1,8 +1,4 @@
> -////////////////////////////////////////////////////////////////
> -
> - Git - the stupid content tracker
> -
> -////////////////////////////////////////////////////////////////
> +# Git - the stupid content tracker
>
> "git" can mean anything, depending on your mood.
>
> diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
> index 51dd2b4..4008fae 100755
> --- a/t/t7001-mv.sh
> +++ b/t/t7001-mv.sh
> @@ -102,7 +102,7 @@ test_expect_success \
>
> test_expect_success \
> 'adding another file' \
> - 'cp "$TEST_DIRECTORY"/../README path0/README &&
> + 'cp "$TEST_DIRECTORY"/../README.md path0/README &&
> git add path0/README &&
> git commit -m add2 -a'
^ permalink raw reply [relevance 0%]
* Re: [RFC/PATCH 0/5] Make README more pleasant to read
2016-02-23 17:40 5% [RFC/PATCH 0/5] Make README more pleasant to read Matthieu Moy
2016-02-23 17:40 13% ` [PATCH 1/5] README: use markdown syntax Matthieu Moy
@ 2016-02-24 10:22 0% ` Jeff King
1 sibling, 0 replies; 200+ results
From: Jeff King @ 2016-02-24 10:22 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git, emma.westby
On Tue, Feb 23, 2016 at 06:40:24PM +0100, Matthieu Moy wrote:
> This patch series was inspired by a discussion I had with Emma Jane
> after Git Merge last year. It tries both to make the README file less
> agressive and generally more pleasant to read.
>
> To get a quick overview, compare the old one:
>
> https://github.com/git/git#readme
>
> and my proposal:
>
> https://github.com/moy/git/tree/git-readme#readme
>
> Matthieu Moy (5):
> README: use markdown syntax
> README.md: add hyperlinks on filenames
> README.md: move the link to git-scm.com up
> README.md: don't call git stupid in the title
> README.md: move down historical explanation about the name
Thanks for working on this. I think the end product is much nicer on the
web, with very little downside for local viewing.
I'm especially happy about the final patch. I don't look at Git's README
often, but I always cringe when I see that intro paragraph and think
that it's some people's first introduction to what git is.
> README => README.md | 54 ++++++++++++++++++++++++++++-------------------------
> t/t7001-mv.sh | 2 +-
I do not overly care, but I wonder if it would be nice to keep README as
a symlink. I don't think that complicates things for people checking out
on Windows (we already have RelNotes as a symlink, and IIRC they just
get a file with the link contents. Not helpful, but not harmful to them
either).
-Peff
^ permalink raw reply [relevance 0%]
Results 1-200 of ~700 next (newer) | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2005-05-16 6:04 [PATCH 0/2] Introducing git-run-with-user-path program Junio C Hamano
2005-05-16 23:21 ` Junio C Hamano
2005-05-16 23:41 8% ` [PATCH 2/2] Add sample ignore logic to git-run-with-user-path command Junio C Hamano
2005-05-16 6:06 8% Junio C Hamano
2006-03-03 16:23 12% [PATCH] git-mv: fix moves into a subdir from outside Josef Weidendorfer
2006-07-25 16:10 Git.xs problem, was Re: [PATCH] cvsserver: avoid warning about active db handles Johannes Schindelin
2006-07-26 1:03 ` [PATCH] Eliminate Scalar::Util usage from private-Error.pm Petr Baudis
2006-07-26 2:01 5% ` Johannes Schindelin
2006-07-26 2:10 0% ` Petr Baudis
2006-07-26 2:25 0% ` Johannes Schindelin
2006-07-26 1:52 1% [PATCH] Make git-mv a builtin Johannes Schindelin
2006-07-26 13:44 13% ` [PATCH] Extend testing git-mv for renaming of subdirectories Josef Weidendorfer
2006-07-26 15:22 0% ` Johannes Schindelin
2006-07-26 17:41 19% [PATCH 1/2] t7001: add test for git-mv dir1 dir2/ Johannes Schindelin
2006-07-26 17:50 6% ` Jon Smirl
2006-07-26 18:23 5% ` Junio C Hamano
2006-07-26 18:31 5% ` Jon Smirl
2006-07-26 18:58 6% ` Junio C Hamano
2006-07-26 19:31 6% ` Junio C Hamano
2006-07-26 20:33 6% ` Jon Smirl
2006-07-26 18:47 6% ` Johannes Schindelin
2006-07-26 18:39 6% ` Josef Weidendorfer
2006-07-26 19:05 6% ` Junio C Hamano
2006-07-28 1:30 5% ` Petr Baudis
2006-07-28 2:41 6% ` Junio C Hamano
2006-07-28 2:56 6% ` Petr Baudis
2006-07-28 4:48 6% ` Junio C Hamano
2006-07-28 15:47 6% ` Petr Baudis
2006-07-26 17:47 10% [PATCH 2/2] builtin git-mv: support moving directories Johannes Schindelin
2006-08-13 3:17 1% [ANNOUNCE] GIT 1.4.2 Junio C Hamano
2006-08-15 20:51 git-mv is broken in master Fredrik Kuivinen
2006-08-15 21:02 ` David Rientjes
2006-08-16 0:20 12% ` [PATCH] git-mv: succeed even if source is a prefix of destination Johannes Schindelin
2006-08-18 5:59 [PATCH] cleans up builtin-mv David Rientjes
2006-08-18 6:12 ` David Rientjes
2006-08-18 9:51 ` Johannes Schindelin
2006-08-18 19:33 ` Junio C Hamano
2006-08-19 1:26 5% ` Johannes Schindelin
2006-08-18 7:23 Another git-mv bug Fredrik Kuivinen
2006-08-18 10:42 12% ` [PATCH] git-mv: special case destination "." Johannes Schindelin
2006-08-21 20:22 5% [PATCH] git-mv: fix off-by-one error Johannes Schindelin
2006-12-17 14:46 [PATCH] Adjust t5510 to put remotes in config Johannes Schindelin
[not found] ` <7v7iwox59i.fsf@assigned-by-dhcp.cox.net>
2006-12-18 22:28 ` Johannes Schindelin
2006-12-18 22:42 ` Junio C Hamano
2006-12-18 22:47 ` Johannes Schindelin
2006-12-18 22:49 ` Johannes Schindelin
2006-12-18 22:58 ` Junio C Hamano
2006-12-18 23:27 8% ` Junio C Hamano
2007-01-12 21:01 5% [PATCH] use 'init' instead of 'init-db' for shipped docs and tools Nicolas Pitre
2007-10-22 6:11 What's in git/spearce.git (stable) Shawn O. Pearce
2007-11-01 5:39 ` What's in git.git (stable) Junio C Hamano
2007-11-04 3:52 ` Junio C Hamano
2007-11-08 8:06 ` Junio C Hamano
2007-11-12 7:06 ` Junio C Hamano
2007-11-15 0:20 ` Junio C Hamano
2007-11-17 21:00 ` Junio C Hamano
2007-11-25 20:45 ` Junio C Hamano
2007-12-01 2:05 ` Junio C Hamano
2007-12-04 8:43 ` Junio C Hamano
2007-12-05 10:57 ` Junio C Hamano
2007-12-07 9:50 ` Junio C Hamano
2007-12-09 10:32 ` Junio C Hamano
2007-12-13 2:47 ` What's in git.git (stable frozen) Junio C Hamano
2007-12-17 8:40 ` Junio C Hamano
2007-12-23 9:21 ` Junio C Hamano
2008-01-05 10:46 3% ` Junio C Hamano
2007-12-30 16:03 [PATCH] git-filter-branch could be confused by similar names Johannes Schindelin
2007-12-30 18:51 ` Dmitry Potapov
2008-01-03 21:27 ` Junio C Hamano
2008-01-04 15:51 ` Dmitry Potapov
2008-01-05 1:17 4% ` Junio C Hamano
2008-01-12 7:11 2% [ANNOUNCE] GIT 1.5.4-rc3 Junio C Hamano
2008-01-12 7:26 ` Ismail Dönmez
2008-01-12 7:34 ` Junio C Hamano
2008-01-12 7:47 ` Ismail Dönmez
2008-01-12 9:04 ` Jeff King
2008-01-12 11:10 ` valgrind test script integration Jeff King
2008-01-12 11:36 4% ` Jeff King
2008-01-23 15:40 git-clean buglet Johannes Sixt
2008-01-27 19:55 ` [PATCH] Fix off by one error in prep_exclude Shawn Bohrer
2008-01-27 20:44 ` Johannes Schindelin
2008-01-27 22:34 ` Junio C Hamano
2008-01-28 0:34 ` Shawn Bohrer
2008-01-28 2:52 ` Junio C Hamano
2008-01-28 7:12 ` Johannes Sixt
2008-01-28 8:46 ` Junio C Hamano
2008-01-28 9:05 ` Johannes Sixt
2008-01-28 12:33 4% ` [RFH/PATCH] prefix_path(): disallow absolute paths Johannes Schindelin
2008-01-29 1:23 0% ` Junio C Hamano
2008-01-29 7:02 ` Junio C Hamano
2008-01-29 8:29 ` [PATCH] setup: sanitize absolute and funny paths in get_pathspec() Junio C Hamano
2008-02-01 4:34 ` [PATCH] More test cases for sanitized path names Robin Rosenberg
2008-02-01 7:17 ` Junio C Hamano
2008-02-01 9:50 2% ` [PATCH for post 1.5.4] Sane use of test_expect_failure Junio C Hamano
2008-02-04 7:03 [PATCH] fix misuse of prefix_path() Junio C Hamano
2008-02-04 8:09 11% ` [PATCH] builtin-mv: minimum fix to avoid losing files Junio C Hamano
2008-07-11 0:12 3% [PATCH 0/5] Extend make remove-dashes Miklos Vajna
2008-07-12 15:47 [PATCH 1/2] t/test-lib.sh: Let test_must_fail fail on signals only Stephan Beyer
2008-07-12 15:47 2% ` [PATCH 2/2] t/: Use "test_must_fail git" instead of "! git" Stephan Beyer
2008-07-17 13:06 [PATCH 5/7] git mv: Support moving submodules Petr Baudis
2008-07-17 22:31 8% ` [PATCH] git-mv: Keep moved index entries inact Petr Baudis
2008-07-19 23:54 0% ` Junio C Hamano
2008-07-21 0:23 0% ` Petr Baudis
2008-07-21 0:25 8% ` [PATCHv2] " Petr Baudis
2008-07-26 6:46 ` Junio C Hamano
2008-07-28 14:20 6% ` SZEDER Gábor
2008-07-28 15:06 13% ` Johannes Schindelin
2008-07-28 15:14 0% ` Johannes Schindelin
2008-07-28 18:24 5% ` Johannes Schindelin
2008-07-28 19:19 0% ` Junio C Hamano
2008-07-28 23:41 0% ` Johannes Schindelin
2008-07-28 23:55 13% ` Johannes Schindelin
2008-07-29 0:17 ` Petr Baudis
2008-07-29 0:46 ` Junio C Hamano
2008-07-29 5:23 12% ` Junio C Hamano
2008-07-27 13:41 Petr Baudis
2008-07-27 13:47 18% ` [PATCH] t/t7001-mv.sh: Propose ability to use git-mv on conflicting entries Petr Baudis
2008-07-28 1:13 16% ` Junio C Hamano
2008-07-28 1:21 6% ` Junio C Hamano
2008-08-01 1:02 3% What's in git.git (Jul 2008, #09; Thu, 31) Junio C Hamano
2008-08-01 16:49 11% [PATCH] git mv: try harder to keep index entries intact Johannes Schindelin
2008-08-07 0:31 3% [ANNOUNCE] GIT 1.6.0-rc2 Junio C Hamano
2008-08-08 5:59 [PATCH 0/3] Enable parallelized tests Johannes Schindelin
2008-08-08 5:59 ` [PATCH 3/3] Enable parallel tests Johannes Schindelin
2008-08-08 7:44 ` René Scharfe
2008-08-08 8:28 ` Junio C Hamano
2008-08-08 9:31 3% ` [PATCH] tests: use $TEST_DIRECTORY to refer to the t/ directory Junio C Hamano
2008-08-08 10:35 0% ` Johannes Schindelin
2008-08-17 21:16 1% [ANNOUNCE] GIT 1.6.0 Junio C Hamano
2008-09-03 8:59 4% [PATCH 0/4] tests: use "git xyzzy" form Nanako Shiraishi
2008-09-03 8:59 4% [PATCH 3/4] tests: use "git xyzzy" form (t7000 - t7199) Nanako Shiraishi
2009-01-14 13:20 [BUG] assertion failure in builtin-mv.c with "git mv -k" Matthieu Moy
2009-01-14 14:53 ` Michael J Gruber
2009-01-14 15:54 ` Johannes Schindelin
2009-01-14 16:04 ` Michael J Gruber
2009-01-14 19:02 6% ` Junio C Hamano
2009-01-15 10:53 6% ` Michael J Gruber
2009-01-14 17:03 5% ` [PATCH v2 0/3] Add test cases for "git mv -k" and fix a known breakage Michael J Gruber
2009-01-14 17:03 13% ` [PATCH v2 1/3] add test cases for "git mv -k" Michael J Gruber
2009-01-14 17:03 ` [PATCH v2 2/3] fix handling of multiple untracked files for git mv -k Michael J Gruber
2009-01-14 17:03 13% ` [PATCH v2 3/3] mark fixed breakage as expect pass for "git mv -k" multiple files Michael J Gruber
[not found] <1233309819-777-?= =?ISO-8859-1?Q?1-git-send-email?= =?ISO-8859-1?Q?-=0E=10>
2009-01-30 10:36 6% ` [PATCH 1/2] Missing && in t/t7001.sh Matthieu Moy
2009-02-04 9:32 19% [PATCH 1/3] " Matthieu Moy
2009-02-04 9:32 13% ` [PATCH 2/3] [BUG] Add a testcase for "git mv -f" on untracked files Matthieu Moy
2009-02-04 9:32 12% ` [PATCH 3/3] builtin-mv.c: check for unversionned files before looking at the destination Matthieu Moy
2009-02-07 21:54 4% [ANNOUNCE] GIT 1.6.1.3 Junio C Hamano
2009-03-21 21:26 3% [PATCH 00/16] Tests on Windows - main part Johannes Sixt
2009-03-21 21:26 4% ` [PATCH 10/16] Use prerequisite tags to skip tests that depend on symbolic links Johannes Sixt
2009-04-20 14:51 4% Bug in test-lib.sh: test_create_repo() / RFC Michael J Gruber
2009-05-07 15:05 [JGIT PATCH 1/2] Add support for boolean config values "yes", "no" Shawn O. Pearce
2009-05-07 15:05 ` [JGIT PATCH 2/2] Make Repository.isValidRefName compatible with Git 1.6.3 Shawn O. Pearce
2009-05-07 23:02 ` Robin Rosenberg
2009-05-07 23:29 ` Linus Torvalds
2009-05-08 0:32 ` Junio C Hamano
2009-05-08 0:47 7% ` Shawn O. Pearce
2009-12-02 1:35 13% [PATCH] Fixed typo Richard Hartmann
2010-09-06 18:39 [PATCH] Several tests: cd inside subshell instead of around Jens Lehmann
2010-09-06 23:16 ` Junio C Hamano
2010-09-07 2:37 4% ` Jonathan Nieder
2010-09-24 21:06 4% [RFC PATCH 00/95] Add missing &&'s in the testsuite Elijah Newren
2010-09-24 22:22 4% [RFC PATCHv2 00/16] " Elijah Newren
2010-09-24 22:22 19% ` [RFC PATCHv2 13/16] t7001 (mv): add missing && Elijah Newren
2010-09-24 23:00 6% ` Ævar Arnfjörð Bjarmason
2010-09-25 19:06 4% [PATCHv3 00/16] Add missing &&'s in the testsuite Elijah Newren
2010-09-25 19:07 19% ` [PATCHv3 12/16] t7001 (mv): add missing && Elijah Newren
2010-09-26 23:14 5% [PATCHv4 00/15] Add missing &&'s in the testsuite Elijah Newren
2010-09-26 23:14 21% ` [PATCHv4 11/15] t7001 (mv): add missing && Elijah Newren
2010-09-30 0:16 1% What's cooking in git.git (Sep 2010, #07; Wed, 29) Junio C Hamano
2010-10-03 5:10 4% [PATCHv5 00/16] Add missing &&'s in the testsuite Elijah Newren
2010-10-03 5:10 21% ` [PATCHv5 12/16] t7001 (mv): add missing && Elijah Newren
2010-10-03 19:59 4% [PATCHv6 00/16] Add missing &&'s in the testsuite Elijah Newren
2010-10-03 20:00 21% ` [PATCHv6 12/16] t7001 (mv): add missing && Elijah Newren
2010-10-03 20:00 ` [PATCHv6 15/16] Add missing &&'s throughout the testsuite Elijah Newren
2010-10-31 1:46 ` [PATCH en/cascade-tests] tests: add missing && Jonathan Nieder
2010-10-31 3:31 ` Junio C Hamano
2010-10-31 7:26 5% ` [PATCH/RFC 00/10] " Jonathan Nieder
2010-10-31 7:30 6% ` [PATCH 01/10] tests: add missing &&, batch 2 Jonathan Nieder
2010-10-14 4:46 1% What's cooking in git.git (Oct 2010, #01; Wed, 13) Junio C Hamano
2010-10-27 6:13 1% What's cooking in git.git (Oct 2010, #02; Tue, 26) Junio C Hamano
2010-11-09 19:53 1% What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
2010-11-18 0:56 1% What's cooking in git.git (Nov 2010, #02; Wed, 17) Junio C Hamano
2010-11-25 3:16 1% What's cooking in git.git (Nov 2010, #03; Wed, 24) Junio C Hamano
2011-01-14 13:41 10% [PATCH] handle rename of case only, for windows Tim Abell
2011-01-14 14:22 0% ` Erik Faye-Lund
2011-01-14 13:44 10% Tim Abell
2011-01-14 13:54 10% [PATCH] handle rename of case only, for windows (resend) Tim Abell
2011-01-29 23:45 9% [PATCH] Handle rename of case only, for Windows Tim Abell
2011-01-31 5:05 1% [ANNOUNCE] Git 1.7.4 Junio C Hamano
2011-03-04 21:40 12% [PATCH] Allow git mv FileA fILEa when core.ignorecase = true Torsten Bögershausen
2011-03-16 13:05 0% ` Erik Faye-Lund
2011-03-16 13:18 0% ` Erik Faye-Lund
2011-03-19 14:28 0% ` Torsten Bögershausen
2011-03-19 14:28 11% [PATCH v2] Allow git mv FileA fILEa on case ignore file systems Torsten Bögershausen
2011-04-10 5:50 9% [PATCH] Allow git mv FILENAME Filename when core.ignorecase = true Torsten Bögershausen
2012-04-29 20:52 1% XDL_FAST_HASH breaks git on OS X 10.7.3 Brian Gernhardt
2013-02-23 14:31 4% [PATCH] Spelling fixes Ville Skyttä
2013-04-03 19:54 4% [PATCH/RFC 0/3] Teach mv to move submodules Jens Lehmann
2013-04-03 19:56 10% ` [PATCH/RFC 1/3] Teach mv to move submodules together with their work trees Jens Lehmann
2013-04-03 19:56 9% ` [PATCH/RFC 2/3] Teach mv to move submodules using a gitfile Jens Lehmann
2013-04-09 23:08 ` Junio C Hamano
2013-04-10 16:59 ` Jens Lehmann
2013-04-10 21:06 9% ` [PATCH v2 " Jens Lehmann
2013-04-03 19:57 9% ` [PATCH/RFC 3/3] Teach mv to update the path entry in .gitmodules for moved submodules Jens Lehmann
2013-06-01 9:34 4% [PATCH 00/11] Increase test coverage on Windows by removing SYMLINKS from many tests Johannes Sixt
2013-06-01 9:34 4% ` [PATCH 05/11] tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases) Johannes Sixt
2013-06-07 20:53 4% ` [PATCH v2 00/10] Increase test coverage on Windows by removing SYMLINKS from many tests Johannes Sixt
2013-06-07 20:53 5% ` [PATCH v2 04/10] tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases) Johannes Sixt
2013-07-22 6:57 What's cooking in git.git (Jul 2013, #07; Sun, 21) Junio C Hamano
2013-07-22 7:32 ` Jens Lehmann
2013-07-22 7:48 ` Duy Nguyen
2013-07-22 20:47 ` Jens Lehmann
2013-07-28 17:23 5% ` Jens Lehmann
2013-07-30 19:48 6% [PATCH v3 0/5] Teach mv to move submodules Jens Lehmann
2013-07-30 19:49 10% ` [PATCH v3 1/5] Teach mv to move submodules together with their work trees Jens Lehmann
2013-07-30 19:50 9% ` [PATCH v3 2/5] Teach mv to move submodules using a gitfile Jens Lehmann
2013-07-30 19:51 8% ` [PATCH v3 4/5] Teach mv to update the path entry in .gitmodules for moved submodules Jens Lehmann
2013-08-06 19:15 8% ` [PATCH v4 " Jens Lehmann
2013-10-11 14:29 Spurious warning when moving a file in presence of submodules Matthieu Moy
2013-10-11 17:53 ` Jens Lehmann
2013-10-13 11:52 11% ` [PATCH] mv: Fix spurious " Jens Lehmann
2013-10-16 21:43 What's cooking in git.git (Oct 2013, #03; Wed, 16) Junio C Hamano
2013-10-17 9:48 ` Karsten Blees
2013-10-17 20:40 ` Junio C Hamano
2013-10-17 21:07 5% ` Junio C Hamano
2013-10-18 0:42 0% ` Karsten Blees
2013-10-18 19:37 0% ` Jens Lehmann
2013-12-02 10:04 [BUG] git mv file directory/ creates the file directory Matthieu Moy
2013-12-02 13:35 ` Duy Nguyen
2013-12-02 17:07 11% ` Matthieu Moy
2013-12-03 8:32 11% [PATCH] mv: let 'git mv file no-such-dir/' error out Matthieu Moy
2013-12-03 10:06 0% ` Duy Nguyen
2013-12-04 8:44 12% ` Matthieu Moy
2013-12-04 13:10 ` Duy Nguyen
2013-12-04 17:37 10% ` [PATCH v2] " Matthieu Moy
2013-12-04 17:44 5% ` [PATCH] " Junio C Hamano
2013-12-04 17:48 0% ` Matthieu Moy
2013-12-09 10:59 mv/rm submodules George Papanikolaou
2013-12-09 17:49 ` Jens Lehmann
2014-01-06 19:21 11% ` [PATCH] mv: better document side effects when moving a submodule Jens Lehmann
2014-01-06 22:40 0% ` Junio C Hamano
2014-01-07 17:57 0% ` Jens Lehmann
2014-01-07 21:30 5% ` [PATCH v2 0/2] better document side effects when [re]moving " Jens Lehmann
2014-01-07 21:31 11% ` [PATCH v2 1/2] mv: better document side effects when moving " Jens Lehmann
2014-01-23 19:54 5% [PATCH 0/2] solaris test fixups Jeff King
2014-03-08 19:21 [PATCH] mv: prevent mismatched data when ignoring errors brian m. carlson
2014-03-15 18:56 12% ` [PATCH v2] " brian m. carlson
2014-03-24 16:56 2% [PATCH 000/144] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
2014-03-25 8:24 2% Elia Pinto
2014-03-25 8:25 20% ` [PATCH 086/144] t7001-mv.sh: use the $( ... ) construct for command substitution Elia Pinto
2014-03-25 17:22 2% [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes Elia Pinto
2014-03-25 17:23 20% ` [PATCH v2 084/142] t7001-mv.sh: use the $( ... ) construct for command substitution Elia Pinto
2014-03-29 15:38 AIX fixes Charles Bailey
2014-03-29 15:39 12% ` [PATCH 2/2] Don't rely on strerror text when testing rmdir failure Charles Bailey
2014-03-29 15:48 0% ` Jens Lehmann
2014-03-31 17:35 0% ` Junio C Hamano
2014-04-04 16:52 2% Patch Series v3 for "use the $( ... ) construct for command substitution" Elia Pinto
2014-04-11 8:24 19% [PATCH] test: fix t7001 cp to use POSIX options Kyle J. McKay
2014-04-11 11:43 6% ` Jeff King
2014-04-11 13:44 18% ` Kyle J. McKay
2014-04-11 19:23 5% ` Junio C Hamano
2014-04-12 21:52 6% ` Jens Lehmann
2014-04-11 22:22 1% What's cooking in git.git (Apr 2014, #03; Fri, 11) Junio C Hamano
2014-04-15 22:12 1% What's cooking in git.git (Apr 2014, #04; Tue, 15) Junio C Hamano
2014-04-17 21:01 1% What's cooking in git.git (Apr 2014, #05; Thu, 17) Junio C Hamano
2014-04-18 19:37 1% [ANNOUNCE] Git v2.0.0-rc0 Junio C Hamano
2014-05-09 20:00 4% [ANNOUNCE] Git v1.9.3 Junio C Hamano
2014-05-14 15:23 3% Please pull the patch series "use the $( ... ) construct for command substitution" Elia Pinto
2014-07-12 7:50 Topic sk/mingw-unicode-spawn-args breaks tests Stepan Kasal
2014-07-15 13:43 ` [PATCH 0/3] fix test suite with mingw-unicode patches Stepan Kasal
2014-07-15 18:20 ` Junio C Hamano
2014-07-15 22:52 4% ` Karsten Blees
2014-07-16 9:29 0% ` Stepan Kasal
2014-07-16 11:01 0% ` Thomas Braun
2014-07-17 15:37 [PATCH 00/13] mingw unicode environment Stepan Kasal
2014-07-17 18:09 4% ` Karsten Blees
2014-07-22 21:44 What's cooking in git.git (Jul 2014, #04; Tue, 22) Junio C Hamano
2014-07-23 14:17 6% ` Karsten Blees
2014-07-23 18:24 0% ` Junio C Hamano
2014-07-25 12:30 0% ` Duy Nguyen
2014-07-29 19:43 0% ` [RFC/PATCH] Windows tests: let $TRASH_DIRECTORY point to native Windows path Karsten Blees
2014-08-27 13:08 0% ` Duy Nguyen
2014-07-30 17:10 Transaction patch series overview Ronnie Sahlberg
2014-07-31 21:41 ` Ronnie Sahlberg
2014-08-08 16:50 ` Ronnie Sahlberg
2014-08-19 19:54 ` Ronnie Sahlberg
2014-08-20 23:17 ` Jonathan Nieder
2014-09-11 3:03 2% ` [PATCH v21 0/19] rs/ref-transaction (Re: Transaction patch series overview) Jonathan Nieder
2014-09-11 3:04 10% ` [PATCH 01/19] mv test: recreate mod/ directory instead of relying on stale copy Jonathan Nieder
2014-10-02 1:48 1% ` [PATCH v22 0/24] rs/ref-transaction Jonathan Nieder
2014-10-02 1:50 10% ` [PATCH 01/24] mv test: recreate mod/ directory instead of relying on stale copy Jonathan Nieder
2014-10-15 0:45 2% [PATCH v23 0/25] rs/ref-transaction ("Use ref transactions", part 3) Jonathan Nieder
2014-10-15 0:46 10% ` [PATCH 01/25] mv test: recreate mod/ directory instead of relying on stale copy Jonathan Nieder
2014-12-11 7:46 Interested in helping open source friends on HP-UX? Junio C Hamano
2015-02-18 16:00 5% ` H.Merijn Brand
2015-02-18 17:46 0% ` Michael J Gruber
2015-02-18 18:25 0% ` Jeff King
2015-02-18 19:20 0% ` H.Merijn Brand
2015-03-20 10:04 [PATCH 0/25] detecting &&-chain breakage Jeff King
2015-03-20 10:09 10% ` [PATCH 06/25] t: use verbose instead of hand-rolled errors Jeff King
2015-11-06 22:47 4% [PATCH] wt-status: use strncmp() for length-limited string comparison René Scharfe
2015-11-24 21:36 ` Jeff King
2015-11-25 2:16 ` René Scharfe
2015-11-25 9:15 ` Jeff King
2015-11-25 14:10 4% ` [PATCH v2] wt-status: correct and simplify check for detached HEAD René Scharfe
2016-01-07 13:51 6% [PATCH 00/10] use the $( ... ) construct for command substitution Elia Pinto
2016-01-07 13:51 18% ` [PATCH 07/10] t/t7001-mv.sh: " Elia Pinto
2016-01-11 23:45 1% What's cooking in git.git (Jan 2016, #02; Mon, 11) Junio C Hamano
2016-01-13 22:23 1% What's cooking in git.git (Jan 2016, #03; Wed, 13) Junio C Hamano
2016-01-20 23:33 1% What's cooking in git.git (Jan 2016, #04; Wed, 20) Junio C Hamano
2016-01-27 0:27 1% What's cooking in git.git (Jan 2016, #05; Tue, 26) Junio C Hamano
2016-02-23 17:40 5% [RFC/PATCH 0/5] Make README more pleasant to read Matthieu Moy
2016-02-23 17:40 13% ` [PATCH 1/5] README: use markdown syntax Matthieu Moy
2016-02-23 19:07 0% ` Junio C Hamano
2016-02-24 10:22 0% ` [RFC/PATCH 0/5] Make README more pleasant to read Jeff King
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).