commit - 3ffe981f82878c662d8a930ba24c717a92b74af1
commit + 83a7ae6dd3b3810c46ad466d6c30a9b674caaa99
blob - a2abc10f3ccc865a84eac6dbce1887f5fdf60a6b
blob + d111b34e06b915085e9da4644248bb97c9b3973d
--- lib/object.c
+++ lib/object.c
(*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;
}
blob - 37a68e6665499a8c3fc34cf1518632908021d33d
blob + f1bd7e73347f1314f7f41339e642124838a06a88
--- regress/cmdline/commit.sh
+++ regress/cmdline/commit.sh
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
}
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
blob - a6e70b9a5b2a6b484e22efff023550a2d2ceca8e
blob + 0605ccf1393234f4429f6cf1184ad75e9eef7d17
--- regress/cmdline/common.sh
+++ regress/cmdline/common.sh
name=$(getent passwd $USER | cut -d: -f5)
export GOT_AUTHOR="$name <$(whoami)@$(hostname)>"
-export MALLOC_OPTIONS=S
-
function git_init
{
git init -q "$@"