-
-
Notifications
You must be signed in to change notification settings - Fork 26
Detect when git commands delete or move a file that had ~nn~
versions left behind
#574
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
Comments
|
I still worry about this often, whenever I submit a PR that moves things around. This could be simply addressed in maiko by removing the special case of recreating, in src/dsk.c probably it should just not recognize the file at all. So if you have FOO. if (*old_file == '\0') {
/*
* The versionless file is not linked to any file in varray.
* Thus, we have to link the versionless file to the file which
* is versioned one higher than the existing highest version.
*/
FindHighestVersion(varray, entry, max_no);
sprintf(ver, "%u", max_no + 1);
/*
* The old file should have the same case name as the versionless
* file.
*/
#ifndef DOS
ConcNameAndVersion(vless, ver, old_file);
TIMEOUT(rval = link(vless, old_file));
if (rval == -1) {
*Lisp_errno = errno;
return (0);
}
#endif /* DOS */
return (1);
} |
I don't think breaking the "versionless file is linked to highest versioned file" paradigm is a good thing. |
just to be clear, I'm not proposing breaking the paradigm, just the ill-considered recovery, when other system operations have caused an anomalous situation. |
In fact, this doesn't really have to do with git and it could be in lisp. Just detect when file versions are in a state that conflicts with Lisp's expectations:
The text was updated successfully, but these errors were encountered: