commit - 30a076bcfb72be417039cf610f37357c5fc23cbd
commit + 6a263307756fdbb961b0d9d309edbacfb18a4fe3
blob - 0c1f987a71914a9ed85c7e5b799dbe4125269303
blob + 08d2a404aeb438f0119da97f048a5a3735aa51c1
--- lib/worktree.c
+++ lib/worktree.c
struct check_rebase_ok_arg {
struct got_worktree *worktree;
struct got_repository *repo;
- int rebase_in_progress;
};
static const struct got_error *
struct stat sb;
char *ondisk_path;
- if (!a->rebase_in_progress) {
- /* Reject rebase of a work tree with mixed base commits. */
- if (memcmp(ie->commit_sha1, a->worktree->base_commit_id->sha1,
- SHA1_DIGEST_LENGTH))
- return got_error(GOT_ERR_MIXED_COMMITS);
- }
+ /* Reject rebase of a work tree with mixed base commits. */
+ if (memcmp(ie->commit_sha1, a->worktree->base_commit_id->sha1,
+ SHA1_DIGEST_LENGTH))
+ return got_error(GOT_ERR_MIXED_COMMITS);
if (asprintf(&ondisk_path, "%s/%s", a->worktree->root_path, ie->path)
== -1)
if (err)
return err;
- if (a->rebase_in_progress) {
- if (status == GOT_STATUS_CONFLICT)
- return got_error(GOT_ERR_CONFLICTS);
- } else if (status != GOT_STATUS_NO_CHANGE)
+ if (status != GOT_STATUS_NO_CHANGE)
return got_error(GOT_ERR_MODIFIED);
return NULL;
ok_arg.worktree = worktree;
ok_arg.repo = repo;
- ok_arg.rebase_in_progress = 0;
err = got_fileindex_for_each_entry_safe(*fileindex, check_rebase_ok,
&ok_arg);
if (err)
ok_arg.worktree = worktree;
ok_arg.repo = repo;
- ok_arg.rebase_in_progress = 0;
err = got_fileindex_for_each_entry_safe(*fileindex, check_rebase_ok,
&ok_arg);
if (err)