bozaro / git-lfs-migrate

Simple project for convert old repository for using git-lfs feature
MIT License
222 stars 29 forks source link

Convert files no extension #20

Closed wesyq closed 8 years ago

wesyq commented 8 years ago

Hi,

Is there a way to convert files without an extension? For example, I tried this:

java -jar git-lfs-migrate.jar \ -s source.git \ -d dest.git \ -g https://example/lfs-test.git \ “.clean” \ “.log” \ “SAMPLEDATA”

But the file SAMPLEDATA did not get converted to LFS. Is there a way to accomplish this?

Thanks.

bozaro commented 8 years ago

You command looks like really strange (it has strange quotes and slashes). Looks like it shold be like:

java -jar git-lfs-migrate.jar -s source.git -d dest.git -g https://example/lfs-test.git .clean "*.log" SAMPLEDATA

git-lfs-migrate takes file masks, not extensions. So, for example:

Quotes need on Unix for escape asterisk and question characters. On Windows you can write command without it.

wesyq commented 8 years ago

I tried it without the quotes and slashes too, but the files without extensions don't seem to be filtered. This feature to filter extension-less files would be really cool if possible :) If you have already tested it, then may be it is a matter of my environment. I am using Windows. Although I can try it on Mac too.

Btw, thanks for such a great tool, it has really helped me and my migration team :)

bozaro commented 8 years ago

Really. Wildcards was processed incorrectly. Fixed.

bozaro commented 8 years ago

Not fixed yet :(

bozaro commented 8 years ago

I try to fix pattern matching and it works much better. But unfortunatelly it still not fully correct. I fix this issue something later on this week.

wesyq commented 8 years ago

Hi,

Did you get a chance to fix it? :)

bozaro commented 8 years ago

If you use only name patterns and don't use path patterns (like "foo/*.zip"), you can safety use version from master branch. Correct fix shoud be some later.

wesyq commented 8 years ago

Okay, thanks. I will try it. Although the build is failing, but only due to a test assertion, the code can be tried as you said it should be working fine safely.

wesyq commented 8 years ago

I managed to convert extension-less files by building the source from master. Thanks a ton!

wesyq commented 8 years ago

Also, I noticed that I no longer need to place the backslashes '\' in the newer build, and it worked. In the earlier releases, I had to put the backslashes in the command. But not anymore. This is also an improvement.