+
Skip to content

Conversation

dxlr8r
Copy link

@dxlr8r dxlr8r commented Jun 10, 2023

@jacebrowning
Copy link
Owner

Thanks for putting this together!

For code coverage, please clone the existing test_ln* methods to make hard-link versions.

gitman/shell.py Outdated

# delete directories from target not present in source
for dir in target_dirs:
rm(dir)
Copy link
Owner

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?

Copy link
Author

@dxlr8r dxlr8r Jun 11, 2023

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.

@dxlr8r
Copy link
Author

dxlr8r commented Jun 11, 2023

For code coverage, please clone the existing test_ln* methods to make hard-link versions.

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.

dxlr8r and others added 3 commits June 22, 2023 07:24
…kinds of links

Co-authored-by: Jace Browning <jacebrowning@gmail.com>
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
Copy link
Author

@dxlr8r dxlr8r left a 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

@dxlr8r
Copy link
Author

dxlr8r commented Jun 30, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载