xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 16a76e239447b3634f28f311124b9d71dd9e5c98

Fix conflict dialog offering merging on rl and al
It doesn't make sense and only produces errors on conflict.
Author: xaizek
Author date (UTC): 2022-06-20 17:23
Committer name: xaizek
Committer date (UTC): 2022-06-20 17:23
Parent(s): 3090ee80f94f024bd91205da59233382829d8aff
Signing key: 99DC5E4DB05F6BE2
Tree: ad87ba92ddfa8ab2f50daec99ddc99067c092966
File Lines added Lines deleted
ChangeLog 2 0
src/fops_put.c 9 1
tests/fileops/put_files.c 25 0
File ChangeLog changed (mode: 100644) (index d7e91a0b6..8ee0de3a5)
180 180 Fixed directory preview resetting after detaching from it. Thanks to Luka Fixed directory preview resetting after detaching from it. Thanks to Luka
181 181 Markušić (a.k.a. mark2185). Markušić (a.k.a. mark2185).
182 182
183 Fixed conflict dialog offering merging on rl and al normal mode commands.
184
183 185 0.12-beta to 0.12 (2021-09-29) 0.12-beta to 0.12 (2021-09-29)
184 186
185 187 Made :VifmCs of the plugin handle 24-bit colors. Made :VifmCs of the plugin handle 24-bit colors.
File src/fops_put.c changed (mode: 100644) (index 798211f5a..b7e09e8fe)
... ... put_next(int force)
638 638 { {
639 639 return 0; return 0;
640 640 } }
641 else
641 else if(put_confirm.op == CMLO_COPY || put_confirm.op == CMLO_MOVE)
642 642 { {
643 643 struct stat dst_st; struct stat dst_st;
644 644 put_confirm.allow_merge = S_ISDIR(src_st.st_mode) put_confirm.allow_merge = S_ISDIR(src_st.st_mode)
 
... ... put_next(int force)
652 652 prompt_what_to_do(dst_name, src_buf); prompt_what_to_do(dst_name, src_buf);
653 653 return 1; return 1;
654 654 } }
655 else
656 {
657 /* Merging makes sense only for copy and move. */
658 put_confirm.allow_merge = 0;
659 put_confirm.allow_merge_all = 0;
660 prompt_what_to_do(dst_name, src_buf);
661 return 1;
662 }
655 663 } }
656 664
657 665 if(put_confirm.op == CMLO_LINK_REL || put_confirm.op == CMLO_LINK_ABS) if(put_confirm.op == CMLO_LINK_REL || put_confirm.op == CMLO_LINK_ABS)
File tests/fileops/put_files.c changed (mode: 100644) (index c83329060..da2be0516)
... ... TEST(show_merge_all_option_if_paths_include_dir)
735 735 (void)unlink(SANDBOX_PATH "/b"); (void)unlink(SANDBOX_PATH "/b");
736 736 } }
737 737
738 TEST(no_merge_options_on_putting_links)
739 {
740 char path[PATH_MAX + 1];
741
742 create_dir(SANDBOX_PATH "/sub");
743 create_dir(SANDBOX_PATH "/dir");
744 create_dir(SANDBOX_PATH "/dir/sub");
745
746 fops_init(&line_prompt, &options_prompt_abort);
747
748 make_abs_path(path, sizeof(path), SANDBOX_PATH, "/dir/sub", saved_cwd);
749 assert_success(regs_append('a', path));
750
751 options_count = 0;
752 (void)fops_put_links(&lwin, 'a', 0);
753 assert_int_equal(8, options_count);
754
755 restore_cwd(saved_cwd);
756 saved_cwd = save_cwd();
757
758 assert_success(rmdir(SANDBOX_PATH "/dir/sub"));
759 assert_success(rmdir(SANDBOX_PATH "/dir"));
760 assert_success(rmdir(SANDBOX_PATH "/sub"));
761 }
762
738 763 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
739 764 /* vim: set cinoptions+=t0 filetype=c : */ /* vim: set cinoptions+=t0 filetype=c : */
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master