Skip to content

Commit

Permalink
[client] Improve commit descriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
killing committed Jul 23, 2015
1 parent a22d25a commit 0c0f248
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions daemon/repo-mgr.c
Expand Up @@ -2854,7 +2854,7 @@ handle_rename (SeafRepo *repo, struct index_state *istate,

/* If the destination path is ignored, just remove the source path. */
if (dst_ignored) {
if (check_locked_file_before_remove (fset, event->path)) {
if (!src_ignored && check_locked_file_before_remove (fset, event->path)) {
not_found = FALSE;
remove_from_index_with_prefix (istate, event->path, &not_found);
if (not_found)
Expand All @@ -2878,7 +2878,9 @@ handle_rename (SeafRepo *repo, struct index_state *istate,
return;
}

if (check_locked_file_before_remove (fset, event->path)) {
/* Now the destination path is not ignored. */

if (!src_ignored && check_locked_file_before_remove (fset, event->path)) {
not_found = FALSE;
rename_index_entries (istate, event->path, event->new_path, &not_found,
NULL, NULL);
Expand All @@ -2896,9 +2898,7 @@ handle_rename (SeafRepo *repo, struct index_state *istate,
istate,
ignore_list,
event->path);
}

if (!dst_ignored && !src_ignored)
add_to_changeset (repo->changeset,
DIFF_STATUS_RENAMED,
NULL,
Expand All @@ -2907,6 +2907,7 @@ handle_rename (SeafRepo *repo, struct index_state *istate,
event->path,
event->new_path,
TRUE);
}

AddOptions options;
memset (&options, 0, sizeof(options));
Expand Down Expand Up @@ -3007,6 +3008,9 @@ apply_worktree_changes_to_index (SeafRepo *repo, struct index_state *istate,

break;
case WT_EVENT_DELETE:
if (check_full_path_ignore(repo->worktree, event->path, ignore_list))
break;

if (!is_path_writable(repo->id,
repo->is_readonly, event->path)) {
seaf_debug ("%s is not writable, ignore.\n", event->path);
Expand Down

0 comments on commit 0c0f248

Please sign in to comment.