commit - 90e6e6204014e47bc38fb5bcaf041cfdad190718
commit + 41f061b2f459318f3738f59d7676efccc4beb344
blob - f3b944325b2e9e0dfa3fa707d7d370eeef408780
blob + 9e7130922e1c3dcbe4a75396503fe9120671cb84
--- 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 - 65ef292945ab5a14c0c1674cbd8aec70fc5e9418
blob + 051f0bedccbe45d193bdeb08943bd0f9767a2f04
--- 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 - 8ca3370f2ac372e3923bb4199f6774b6159e3ec5
blob + b17666eaf0ae899543adfa66236bdfd3eb49e92d
--- 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