virtuald / git-source-track

Helps you tracks source changes between two repositories
Apache License 2.0
1 stars 3 forks source link

git-source-track depends on core.abbrev=7 #3

Closed auscompgeek closed 7 years ago

auscompgeek commented 7 years ago

Currently, git-source-track depends on a constant value for core.abbrev between developers. (This typically means that core.abbrev has to be exactly 7.)

This leads to git-source-track claiming that every file is out of sync when a user sets core.abbrev to 12 (for example) in their git config.

virtuald commented 7 years ago

Ha, nice, didn't realize it was a setting. I guess one could set this per repository using .gitattributes? Or perhaps it could force it to something, or do prefix matching instead...

auscompgeek commented 7 years ago

Luckily repo git configs override user configs (which in turn override system-wide configs), so the workaround is simple enough. It's arguably not a good solution though.

Getting the full commit hashes from the upstream repo and checking the prefix would probably be a nice solution to this.

virtuald commented 7 years ago

I'm not actually able to duplicate this bug, it seems to work fine when I set core.abbrev to 12. Can you give a specific example?

virtuald commented 7 years ago

Also note that with robotpy-wpilib, just about every file IS old. However, pynetworktables is mostly up to date with ntcore.

virtuald commented 7 years ago

Oh, I found it. It's when the value in the file is invalid.

virtuald commented 7 years ago

Fixed, let me know if that works for you. If so, I'll push it out to pypi.

auscompgeek commented 7 years ago

Looks good, thanks!

james-ward commented 7 years ago

I don't think the latest version is on pypi, and it currently breaks with the .gittrack config file in robotpy-wpilib.

virtuald commented 7 years ago

It'll be there in 5 minutes, sorry about that.

virtuald commented 7 years ago

Uploaded.

james-ward commented 7 years ago

Thanks, confirmed working. Now to get to work... ;)

virtuald commented 7 years ago

Awesome, I'm almost done with fixing up HAL...