You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Despite hard reset, local checkout shows file changes in other libraries #3792
I am still getting the following when checking out master (I am the author of Fluidbox and I am updating the files, mostly fixing outdated version numbers in JS files):
D ajax/libs/fluidbox/1.2.2/jquery.fluidbox.css
M ajax/libs/fluidbox/1.2.2/jquery.fluidbox.js
M ajax/libs/fluidbox/1.2.2/jquery.fluidbox.min.js
D ajax/libs/fluidbox/1.2.3/jquery.fluidbox.css
M ajax/libs/fluidbox/1.2.3/jquery.fluidbox.js
M ajax/libs/fluidbox/1.2.3/jquery.fluidbox.min.js
D ajax/libs/fluidbox/1.2.4/jquery.fluidbox.css
D ajax/libs/fluidbox/1.2.5/jquery.fluidbox.css
D ajax/libs/fluidbox/1.2.6/jquery.fluidbox.css
D ajax/libs/fluidbox/1.2.7/jquery.fluidbox.css
D ajax/libs/fluidbox/1.3.1/jquery.fluidbox.css
D ajax/libs/fluidbox/1.3.2/jquery.fluidbox.css
D ajax/libs/fluidbox/1.3.3/jquery.fluidbox.css
M ajax/libs/sortable/package.json
You can see that the last file from /sortable/ has been modified, but I checked the file and it is precisely identical to the one on the original upstream repo (master). May I know how should I work around this issue so that my pull request will not modify other libraries?
Seems you just reset upstream/master, not your local master. What about just delete your local master, and refork a local master from upstream/master? I think it should be easy.
@PeterDaveHello Could be wrong, but pretty sure git reset --hard upstream/master will reset the current branch to the state of upstream/master. More info here.
@terrymun I had this exact same issue (even the same file) are you on Windows? It looks to be related to the capitalization of the 'sortable' folder; the following solved the issue for me:
When files are checked out under Windows, git will write them at the same location.
What is actually happening is the first sortable/package.json file is being overwritten by the second. Because they both have different contents, git will always think the file has been modified.
I guess the easiest workaround is to rename one of the sortable libraries (sortable.js maybe?). Then git mv the files as suggested above. What do you think?
No, it's impossible, one of the most important policies in cdnjs is do not brake the already exist library, renaming will make the old urls be broken, so this method should not be consider to use. Anyway, I'm still looking for a solution, for more detail discussion, please move to #3650, there is already a opened issue about this problem, and thanks for your comments.
@rmorrin Thanks for the comment. I was close to pulling my hair out because I honestly thought I wasn't resetting my local clone properly. It seems like a rather innocent naming clash.
@PeterDaveHello What would the solution be for OS X? That would be nice so I can start making pull requests again without meddling with the sortable library.
@PeterDaveHello Of course, that makes sense - I'll keep an eye on the discussion in #3650. Thanks!
@terrymun No problem. As a short-term measure, you can try the following: git update-index --assume-unchanged ajax/libs/Sortable/package.json
which tells git to ignore any changes to the fille.
Yup, got to say that this worked for me, too. However, I am using the lowercase sortable, i.e. git update-index --assume-unchanged ajax/libs/sortable/package.json. Even better, simply ignore both.
I hope this issue get fixed soon because expecting cdnjs contributors who are not using a case-sensitive file system to specifically create a partition for the purpose of participating in the project is a little bit excessive. The common OSes (OS X and Windows) are not case-sensitive, and we run the risk of excluding many possible contributors based on this requirement.
Perhaps we should be more careful to ensure that clashes in namespace does not occur in the future?
Yup, got to say that this worked for me, too. However, I am using the
lowercase sortable, i.e. git update-index --assume-unchanged
ajax/libs/sortable/package.json. Even better, simply ignore both.
I hope this issue get fixed soon because expecting cdnjs contributors who
are not using a case-sensitive file system to specifically create a
partition for the purpose of participating in the project is a little bit
excessive. The common OSes (OS X and Windows) are not case-sensitive, and
we run the risk of excluding many possible contributors based on this
requirement.
Perhaps we should be more careful to ensure that clashes in namespace does
not occur in the future?
—
Reply to this email directly or view it on GitHub #3792 (comment).
Activity
PeterDaveHello commentedon Sep 2, 2014
Seems you just reset upstream/master, not your local master. What about just delete your local master, and refork a local master from upstream/master? I think it should be easy.
rmorrin commentedon Sep 3, 2014
@PeterDaveHello Could be wrong, but pretty sure
git reset --hard upstream/masterwill reset the current branch to the state ofupstream/master. More info here.@terrymun I had this exact same issue (even the same file) are you on Windows? It looks to be related to the capitalization of the 'sortable' folder; the following solved the issue for me:
Will submit a PR to address this.
rmorrin commentedon Sep 3, 2014
After a bit more digging, it looks like the repository contains two (different) libraries named sortable:
https://github.com/HubSpot/sortable Lowercase 's'
https://github.com/rubaxa/Sortable Uppercase 'S'
Because both libraries contain a package.json file, this is causing a conflict on case-insensitive file systems found on Windows/OSX.
@PeterDaveHello How are naming conflicts usually handled?
PeterDaveHello commentedon Sep 3, 2014
Oops, I misread the comment.
I know there exist workaround for Sortable/sortable issue under OSX, not sure what to do under windows yet.
rmorrin commentedon Sep 3, 2014
When files are checked out under Windows, git will write them at the same location.
What is actually happening is the first
sortable/package.jsonfile is being overwritten by the second. Because they both have different contents, git will always think the file has been modified.I guess the easiest workaround is to rename one of the sortable libraries (sortable.js maybe?). Then
git mvthe files as suggested above. What do you think?PeterDaveHello commentedon Sep 3, 2014
No, it's impossible, one of the most important policies in cdnjs is do not brake the already exist library, renaming will make the old urls be broken, so this method should not be consider to use. Anyway, I'm still looking for a solution, for more detail discussion, please move to #3650, there is already a opened issue about this problem, and thanks for your comments.
terrymun commentedon Sep 3, 2014
@rmorrin Thanks for the comment. I was close to pulling my hair out because I honestly thought I wasn't resetting my local clone properly. It seems like a rather innocent naming clash.
@PeterDaveHello What would the solution be for OS X? That would be nice so I can start making pull requests again without meddling with the sortable library.
rmorrin commentedon Sep 3, 2014
@PeterDaveHello Of course, that makes sense - I'll keep an eye on the discussion in #3650. Thanks!
@terrymun No problem. As a short-term measure, you can try the following:
git update-index --assume-unchanged ajax/libs/Sortable/package.jsonwhich tells git to ignore any changes to the fille.
PeterDaveHello commentedon Sep 4, 2014
@terrymun You can create a disk image with a case-sensitive file system (MAC OS Extended), and clone the repo on it.
stefanneculai commentedon Sep 8, 2014
@rmorrin the
git update-index --assume-unchanged ajax/libs/Sortable/package.jsonworkaround works on Mac. Very helpful. 👍terrymun commentedon Sep 8, 2014
Yup, got to say that this worked for me, too. However, I am using the lowercase
sortable, i.e.git update-index --assume-unchanged ajax/libs/sortable/package.json. Even better, simply ignore both.I hope this issue get fixed soon because expecting cdnjs contributors who are not using a case-sensitive file system to specifically create a partition for the purpose of participating in the project is a little bit excessive. The common OSes (OS X and Windows) are not case-sensitive, and we run the risk of excluding many possible contributors based on this requirement.
Perhaps we should be more careful to ensure that clashes in namespace does not occur in the future?
thomasdavis commentedon Sep 9, 2014
@terinjokes any good ideas how we could fix the naming for Sortable and
sortable without breaking the CDN.
On Tue, Sep 9, 2014 at 3:14 AM, Terry [email protected] wrote:
Thomas Davis
http://thomasdav.is
VP of Tech - Earbits - http://earbits.com
Co-founder - Cdnjs - http://cdnjs.com
Founder - Backbone Tutorials - http://backbonetutorials.com
terinjokes commentedon Sep 9, 2014
@thomasdavis email me the affected URLs and a general gist of the problem, and I'll see what I can do.
PeterDaveHello commentedon May 3, 2015
https://github.com/cdnjs/cdnjs/blob/master/sparseCheckout.md This will help
PeterDaveHello commentedon May 30, 2015
Let's discuss here #3650.