commit - ac93b2c5ff1f2b9d2c10aaf6b385b22b9da35056
commit + d52bac284bc87b2e54ff8afd22886a7260f68b26
blob - b375b79361d8973852cd690a8972093ca55267d0
blob + 369d7d7369f7a373f6eef08f611035ae2b846fe5
--- got/got.c
+++ got/got.c
}
static const struct got_error *
+abort_progress(void *arg, unsigned char status, const char *path)
+{
+ /*
+ * Unversioned files should not clutter progress output when
+ * an operation is aborted.
+ */
+ if (status == GOT_STATUS_UNVERSIONED)
+ return NULL;
+
+ return update_progress(arg, status, path);
+}
+
+static const struct got_error *
cmd_rebase(int argc, char *argv[])
{
const struct got_error *error = NULL;
printf("Switching work tree to %s\n",
got_ref_get_symref_target(new_base_branch));
error = got_worktree_rebase_abort(worktree, fileindex, repo,
- new_base_branch, update_progress, &upa);
+ new_base_branch, abort_progress, &upa);
if (error)
goto done;
printf("Rebase of %s aborted\n", got_ref_get_name(branch));
if (pid == NULL) {
if (!continue_rebase) {
error = got_worktree_rebase_abort(worktree, fileindex,
- repo, new_base_branch, update_progress, &upa);
+ repo, new_base_branch, abort_progress, &upa);
if (error)
goto done;
printf("Rebase of %s aborted\n",
printf("Switching work tree to %s\n",
got_ref_get_symref_target(branch));
error = got_worktree_histedit_abort(worktree, fileindex, repo,
- branch, base_commit_id, update_progress, &upa);
+ branch, base_commit_id, abort_progress, &upa);
if (error)
goto done;
printf("Histedit of %s aborted\n",
if (error) {
got_worktree_histedit_abort(worktree, fileindex,
repo, branch, base_commit_id,
- update_progress, &upa);
+ abort_progress, &upa);
print_merge_progress_stats(&upa);
goto done;
}
if (error) {
got_worktree_histedit_abort(worktree, fileindex,
repo, branch, base_commit_id,
- update_progress, &upa);
+ abort_progress, &upa);
print_merge_progress_stats(&upa);
goto done;
}
if (error) {
got_worktree_histedit_abort(worktree, fileindex,
repo, branch, base_commit_id,
- update_progress, &upa);
+ abort_progress, &upa);
print_merge_progress_stats(&upa);
goto done;
}
if (error)
goto done;
error = got_worktree_merge_abort(worktree, fileindex, repo,
- update_progress, &upa);
+ abort_progress, &upa);
if (error)
goto done;
printf("Merge of %s aborted\n", branch_name);
print_merge_progress_stats(&upa);
if (!upa.did_something) {
error = got_worktree_merge_abort(worktree, fileindex,
- repo, update_progress, &upa);
+ repo, abort_progress, &upa);
if (error)
goto done;
printf("Already up-to-date\n");
blob - ec9e48a654c56cc96e8bb36e57a8690cc98c76c0
blob + f14adcf25cb320760718529e3959ffa220540131
--- regress/cmdline/histedit.sh
+++ regress/cmdline/histedit.sh
test_done "$testroot" "$ret"
return 1
fi
+
+ # unrelated unversioned file in work tree
+ touch $testroot/wt/unversioned-file
echo "edit $old_commit1" > $testroot/histedit-script
echo "mesg committing changes" >> $testroot/histedit-script
(cd $testroot/wt && got status > $testroot/stdout)
echo "? epsilon/new" > $testroot/stdout.expected
+ echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
ret="$?"
if [ "$ret" != "0" ]; then
blob - be7e58787cda7e3de992a5142542bebcf76ab385
blob + 7531c5533c9965ff12fa5f05ece3f43ddbe40b15
--- regress/cmdline/merge.sh
+++ regress/cmdline/merge.sh
test_done "$testroot" "$ret"
return 1
fi
+
+ # unrelated unversioned file in work tree
+ touch $testroot/wt/unversioned-file
# create a conflicting commit
(cd $testroot/repo && git checkout -q master)
echo "A epsilon/new" >> $testroot/stdout.expected
echo "M gamma/delta" >> $testroot/stdout.expected
echo "A symlink" >> $testroot/stdout.expected
+ echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
ret="$?"
if [ "$ret" != "0" ]; then
(cd $testroot/wt && got status > $testroot/stdout)
- echo -n "" > $testroot/stdout.expected
+ echo "? unversioned-file" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
ret="$?"
if [ "$ret" != "0" ]; then
blob - 6685635eca33a2a5aab0ef38cd5416ca47853bca
blob + ad935fbf9a8d899be794504190115e1b649c0f16
--- regress/cmdline/rebase.sh
+++ regress/cmdline/rebase.sh
test_done "$testroot" "$ret"
return 1
fi
+
+ # unrelated unversioned file in work tree
+ touch $testroot/wt/unversioned-file
(cd $testroot/wt && got rebase newbranch > $testroot/stdout \
2> $testroot/stderr)
(cd $testroot/wt && got status > $testroot/stdout)
echo "C alpha" > $testroot/stdout.expected
+ echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
ret="$?"
if [ "$ret" != "0" ]; then