-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rsync's behavior when uploading a directory #454
Conversation
So both of your recent PRs reference a recent issue that's on a different repo. Propagating fixes across repos is awesome, please don't misunderstand, but it also looks like maybe you've issued a PR against the wrong repo? Can you clarify your intentions? I'm going to look into it anyways, of course, a fix is a fix! |
So having reviewed this, you're right that the text on our site is incorrect, for directory transfers, directory creation on the remote site occurs with or without the trailing slash on the destination, and this is true whether or not the target directory exists. The relevant trailing slash is on the source, as you correctly point out. Interestingly, I also found this, which points out that a trailing slash on the destination can be important in the case where the source is a single file and the destination does not exist. I like the second half of the PR. The comment about I suggest you revise your PR to remove the changes around L344, but retain the others? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go, thanks!
Thanks! I'll explain what's happening: At UCL we had not merged our site with the upstream carpentries-incubator/hpc-intro course for about 2 years, so the two have diverged. We are currently sorting through our local changes and grouping them into PRs. Most of these changes are updates to our site snippets, but there are some contributions to the lessons. We made a plan for getting our site sufficiently up-to-date with the upstream so we can resume regular merges, which you've discovered in our issue that you've linked above. As part of that, I've been making PRs where it looked like our changes could be appropriate to contribute back. Happy to take a different approach :) |
IMO this is a fine approach. We have had people do PRs against our repos from forks by mistake, so I wanted to be careful. Will dig into the other one soon! |
One of those mistake PRs was me ;) Great, thank you! |
Rsync does not behave as described in this paragraph. I have set up an illustrating example for clarity.
These are my starting points on my local machine (a directory
bar
containing a filesubbar
) and the remote cluster.Local:
Remote:
The example of L373 works as written.
Local:
Remote:
Regarding the paragraph starting on L377, Rsync behaves identically if the trailing
/
on the target directory is omitted.Local:
Remote:
However, adding a trailing
/
on the source directory will result in the behaviour described.Local:
Remote:
We have updated the text in the lesson to clarify this.