revert previous
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
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 "$@"