From 1b191404882bb41b63a6412544de13bd2241877f Mon Sep 17 00:00:00 2001 From: "https://launchpad.net/~r0lf" Date: Sat, 24 Apr 2021 11:03:28 +0000 Subject: [PATCH] Added a comment: try to find a better solution --- ..._dc7b2ae4971324d34f6a8d89e888f598._comment | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/bugs/poor_choice_of_name_for_adjusted_branches/comment_2_dc7b2ae4971324d34f6a8d89e888f598._comment diff --git a/doc/bugs/poor_choice_of_name_for_adjusted_branches/comment_2_dc7b2ae4971324d34f6a8d89e888f598._comment b/doc/bugs/poor_choice_of_name_for_adjusted_branches/comment_2_dc7b2ae4971324d34f6a8d89e888f598._comment new file mode 100644 index 0000000000..dc269631b0 --- /dev/null +++ b/doc/bugs/poor_choice_of_name_for_adjusted_branches/comment_2_dc7b2ae4971324d34f6a8d89e888f598._comment @@ -0,0 +1,21 @@ +[[!comment format=mdwn + username="https://launchpad.net/~r0lf" + nickname="r0lf" + avatar="http://cdn.libravatar.org/avatar/aa82122557e706df7ba83bd1983eb79ef1ba2e51350217850176d4f9a1bb2bc0" + subject="try to find a better solution" + date="2021-04-24T11:03:28Z" + content=""" +Thank you for the your comment. It certainly explains your situation back when you coded this up. I'm not sure I'm convinced it is good justification to keep things the way they are going forward. + +1. The branch names aren't short +2. The branch names aren't clash-free (see my other report) +3. I switch between branches all the time, that's their purpose. + +For #3, I usually rely on either mark-copy'ing the characters off the terminal with the mouse or via bash-completion. Both are broken. + +Isn't it that people aren't using () for branch or filenames precisely because of the problems you will almost certainly run into? I'm certain there is a better way. + +Personally, I see the act of hiding non-local files as a temporary measure. Maybe creating a branch for that isn't even the right thing. Maybe \"git stash\" or a tag is a better solution. Or maybe just remove broken links without committing the result at all. + +To expand on that idea, https://unix.stackexchange.com/a/49470 discusses how to use find and I found \"find . -maxdepth 1 -type l -exec test ! -e {} \; -delete\" to work just fine. \"git checkout .\" then brought back those links for non-local files just fine. How about going without any branch at all? Obviously, in git-annex there are still some corner cases to consider. Like making sure not to continue on master while the links to non-local files are still removed. I haven't considered all potential pitfalls, but I feel this might be a better way to handle this need. +"""]]