Commit 83a7ae6dd3b3810c46ad466d6c30a9b674caaa99

Stefan Sperling 2019-05-10T18:38:59

revert previous

diff --git a/lib/object.c b/lib/object.c
index a2abc10..d111b34 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -1553,19 +1553,17 @@ got_object_tree_entry_dup(struct got_tree_entry **new_te,
 	(*new_te)->name = strdup(te->name);
 	if ((*new_te)->name == NULL) {
 		err = got_error_from_errno();
-		goto done;
+		got_object_tree_entry_close(*new_te);
+		return err;
 	}
 
 	(*new_te)->id = got_object_id_dup(te->id);
 	if ((*new_te)->id == NULL) {
 		err = got_error_from_errno();
-		goto done;
-	}
-done:
-	if (err) {
 		got_object_tree_entry_close(*new_te);
-		*new_te = NULL;
+		return err;
 	}
-	return err;
+
+	return NULL;
 }
 
diff --git a/regress/cmdline/commit.sh b/regress/cmdline/commit.sh
index 37a68e6..f1bd7e7 100755
--- a/regress/cmdline/commit.sh
+++ b/regress/cmdline/commit.sh
@@ -31,8 +31,7 @@ function test_commit_basic {
 	echo "new file" > $testroot/wt/new
 	(cd $testroot/wt && got add new >/dev/null)
 
-	(cd $testroot/wt && got commit -m 'test commit_basic')
-	#(cd $testroot/wt && egdb --args got commit -m 'test commit_basic')
+	(cd $testroot/wt && got commit -m 'test commit_basic' > $testroot/stdout)
 
 	local head_rev=`git_show_head $testroot/repo`
 	echo "A  new" > $testroot/stdout.expected
@@ -176,7 +175,7 @@ function test_commit_out_of_date {
 }
 
 run_test test_commit_basic
-#run_test test_commit_new_subdir
-#run_test test_commit_subdir
-#run_test test_commit_single_file
-#run_test test_commit_out_of_date
+run_test test_commit_new_subdir
+run_test test_commit_subdir
+run_test test_commit_single_file
+run_test test_commit_out_of_date
diff --git a/regress/cmdline/common.sh b/regress/cmdline/common.sh
index a6e70b9..0605ccf 100644
--- a/regress/cmdline/common.sh
+++ b/regress/cmdline/common.sh
@@ -17,8 +17,6 @@
 name=$(getent passwd $USER | cut -d: -f5)
 export GOT_AUTHOR="$name <$(whoami)@$(hostname)>"
 
-export MALLOC_OPTIONS=S
-
 function git_init
 {
 	git init -q "$@"