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 d7468749b20c11847a4c43f4bbf3ff51115d5a3b

Don't offer "append the tail" on al and rl
Because it's inappropriate for creation of symbolic links.
Author: xaizek
Author date (UTC): 2026-03-13 17:51
Committer name: xaizek
Committer date (UTC): 2026-03-13 17:51
Parent(s): 53c4d2f904d981f914cf1340c7b9876bb2e8ee5e
Signing key: 99DC5E4DB05F6BE2
Tree: 5033cd187bc0bb0b6876a016f36dd10af447e436
File Lines added Lines deleted
ChangeLog 3 0
src/fops_put.c 2 2
tests/fileops/put_files.c 26 1
File ChangeLog changed (mode: 100644) (index e8f90fcda..5bc0f2d19)
101 101 Improved wording in a confirmation prompt for permanent deletion during Improved wording in a confirmation prompt for permanent deletion during
102 102 undo/redo. undo/redo.
103 103
104 Don't offer "append the tail" conflict resolution option for al and rl
105 operations because it's inappropriate for creation of symbolic links.
106
104 107 Fixed 'trashdir' with "%r" on BSD-like systems (those with getmntinfo() Fixed 'trashdir' with "%r" on BSD-like systems (those with getmntinfo()
105 108 instead of getmntent() API). The regression was apparently introduced in instead of getmntent() API). The regression was apparently introduced in
106 109 v0.9.1-beta. Thanks to sublimal. v0.9.1-beta. Thanks to sublimal.
File src/fops_put.c changed (mode: 100644) (index 7e671e68b..4c7e014c7)
... ... prompt_what_to_do(const char fname[], const char caused_by[])
1079 1079
1080 1080 if(!same_file) if(!same_file)
1081 1081 { {
1082 if(cfg.use_system_calls && is_regular_file_noderef(dst_buf) &&
1083 is_regular_file_noderef(caused_by))
1082 if(cfg.use_system_calls && ONE_OF(put_confirm.op, CMLO_COPY, CMLO_MOVE) &&
1083 is_regular_file_noderef(dst_buf) && is_regular_file_noderef(caused_by))
1084 1084 { {
1085 1085 responses[i++] = append; responses[i++] = append;
1086 1086 } }
File tests/fileops/put_files.c changed (mode: 100644) (index a015c918d..603211676)
... ... TEST(show_merge_all_option_if_paths_include_dir)
623 623 (void)unlink(SANDBOX_PATH "/b"); (void)unlink(SANDBOX_PATH "/b");
624 624 } }
625 625
626 TEST(no_merge_options_on_putting_links)
626 TEST(no_append_option_on_putting_file_links)
627 {
628 create_file(SANDBOX_PATH "/dos-eof");
629
630 fops_init(&line_prompt, &options_prompt_abort_and_record);
631
632 char path[PATH_MAX + 1];
633 make_abs_path(path, sizeof(path), TEST_DATA_PATH, "/read/dos-eof", saved_cwd);
634 assert_success(regs_append('a', path));
635
636 response_options[0] = '\0';
637 (void)fops_put_links(&lwin, 'a', 0);
638 assert_string_doesnt_contain("a", response_options);
639 /* These are for directories, but won't hurt to check. */
640 assert_string_doesnt_contain("m", response_options);
641 assert_string_doesnt_contain("M", response_options);
642
643 restore_cwd(saved_cwd);
644 saved_cwd = save_cwd();
645
646 remove_file(SANDBOX_PATH "/dos-eof");
647 }
648
649 TEST(no_merge_options_on_putting_dir_links)
627 650 { {
628 651 char path[PATH_MAX + 1]; char path[PATH_MAX + 1];
629 652
 
... ... TEST(no_merge_options_on_putting_links)
640 663 (void)fops_put_links(&lwin, 'a', 0); (void)fops_put_links(&lwin, 'a', 0);
641 664 assert_string_doesnt_contain("m", response_options); assert_string_doesnt_contain("m", response_options);
642 665 assert_string_doesnt_contain("M", response_options); assert_string_doesnt_contain("M", response_options);
666 /* This is for files, but won't hurt to check. */
667 assert_string_doesnt_contain("a", response_options);
643 668
644 669 restore_cwd(saved_cwd); restore_cwd(saved_cwd);
645 670 saved_cwd = save_cwd(); saved_cwd = save_cwd();
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