-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support creating hard links #301 #310
base: main
Are you sure you want to change the base?
Conversation
Thanks for putting this together! For code coverage, please clone the existing |
gitman/shell.py
Outdated
|
||
# delete directories from target not present in source | ||
for dir in target_dirs: | ||
rm(dir) |
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.
I'm trying to understand why all this code is required. Is just calling os.link(source, target)
insufficient?
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.
It is not needed for the initial run, but will most likely be necessary on sequential runs.
Say your source repo has three files, a, b & c. On the initial run you will get links to a, b & c in your target directory.
Now let's say the author of the source repo adds file d and removes a, meaning files b, c & d are the content on the source. Without this extra code, you will however end up with a, b, c & d on the target, instead of b, c & d.
That might take some time, as said before I'm not a Python developer; before this I had hardly done more than a hello world in Python. |
…kinds of links Co-authored-by: Jace Browning <[email protected]>
Co-authored-by: Jace Browning <[email protected]>
…ies not present in source from target
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.
Some basic testing, I request help/assistant if better testing is required
@jacebrowning please add a "help wanted" label. The code works, but I need help with the testing. The tests in GitHub does not pass, but it pass (make {check,test}) on my box (Debian 11 with Python 3.8 using pyenv). As I am not a Python programmer this is the limits of my knowledge and effort. |
#301