commit - 1137e0aea684188aea7444f9a2d2a82a6758c49f
commit + f43793a4e6eda593d67d4872bc7f03398fbd65d9
blob - addb2d0aed2e4857f120d66d175580a9cd586cb5
blob + 7d06061d7b3cf0058211f33baf47d15394a9028e
--- got/got.c
+++ got/got.c
error = got_error_from_errno("asprintf");
goto done;
}
- error = got_repo_map_path(&in_repo_path, repo, p, 1);
+ error = got_repo_map_path(&in_repo_path, repo, p, 0);
free(p);
} else
error = got_repo_map_path(&in_repo_path, repo, path, 1);
error = got_error_from_errno("asprintf");
goto done;
}
- error = got_repo_map_path(&in_repo_path, repo, p, 1);
+ error = got_repo_map_path(&in_repo_path, repo, p, 0);
free(p);
if (error)
goto done;
blob - 3d2918610ec74a9c7bac32728fccb9655f178299
blob + 62d97e2d9119bef047e81d719545162be88565e2
--- regress/cmdline/log.sh
+++ regress/cmdline/log.sh
}
function test_log_in_worktree {
- local testroot=`test_init log_in_worktree`
- local head_rev=`git_show_head $testroot/repo`
+ local testroot=`test_init log_in_worktree 1`
+ make_test_tree $testroot/repo
+ mkdir -p $testroot/repo/epsilon/d
+ echo foo > $testroot/repo/epsilon/d/foo
+ (cd $testroot/repo && git add .)
+ git_commit $testroot/repo -m "adding the test tree"
+ local head_commit=`git_show_head $testroot/repo`
+
got checkout $testroot/repo $testroot/wt > /dev/null
ret="$?"
if [ "$ret" != "0" ]; then
return 1
fi
- echo "commit $head_rev (master)" > $testroot/stdout.expected
+ echo "commit $head_commit (master)" > $testroot/stdout.expected
for p in "" "." alpha epsilon; do
(cd $testroot/wt && got log $p | \
fi
done
+ for p in "" "." foo; do
+ (cd $testroot/wt/epsilon && got log d/$p | \
+ grep ^commit > $testroot/stdout)
+ cmp -s $testroot/stdout.expected $testroot/stdout
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
+ fi
+ done
+
test_done "$testroot" "0"
}
blob - ddf4b1a9ec47ef9b9c7ce57f81d79a49765d51ab
blob + 57bbc95ef4f3fde8a3ffa7aed1ece2043bc143e7
--- tog/tog.c
+++ tog/tog.c
struct got_object_id *start_id = NULL;
char *path = NULL, *repo_path = NULL, *cwd = NULL;
char *start_commit = NULL, *head_ref_name = NULL;
- int ch, log_branches = 0;
+ int ch, log_branches = 0, check_disk = 1;
struct tog_view *view;
SIMPLEQ_INIT(&refs);
goto done;
}
if (worktree) {
+ const char *prefix = got_worktree_get_path_prefix(worktree);
+ char *p;
+ if (asprintf(&p, "%s%s%s", prefix,
+ (strcmp(prefix, "/") != 0) ? "/" : "", path) == -1) {
+ error = got_error_from_errno("asprintf");
+ goto done;
+ }
+ free(path);
+ path = p;
+ check_disk = 0;
+
head_ref_name = strdup(
got_worktree_get_head_ref_name(worktree));
if (head_ref_name == NULL) {
}
}
error = open_log_view(view, start_id, &refs, repo, head_ref_name,
- path, 1, log_branches);
+ path, check_disk, log_branches);
if (error)
goto done;
if (worktree) {