-
Notifications
You must be signed in to change notification settings - Fork 255
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
Consistently terminate commit messages with LF #333
Conversation
When the length logic for fast-import 'data' commands was updated in 4c10270 (Fix data handling, 2023-03-02), one branch was missed, so commit messages now do not have a final LF appended in most cases. This changed the longtime behavior, which had been consistent since the first commit of hg2git, 9832035 (Initial import, 2007-03-06), and is expected by some applications which compare against old conversions from Mercurial.
This changes the expected output of the tests. Note, though, that |
Good catch! That should be fixed, no argument there. But we should have the test cases updated in the same commit to stay bisectable.
I can't reproduce any breakage on master locally. I did #334 to rule out that it was just a fluke, but it's not broken in the CI either. If you are switching between branches, have you done |
When core.ignoreCase is set in the global config, hg-fast-export.sh warns the user and exits. Override this for tests.
cb65581
to
178749f
Compare
Thanks for the pointer about
I have I'm surprised that git fast-import has this issue in the first place, since I'm familiar with the code from contributing patches to it, but, sure enough, it uses variably case-sensitive path comparisons: int fspathncmp(const char *a, const char *b, size_t count)
{
return ignore_case ? strncasecmp(a, b, count) : strncmp(a, b, count);
} |
Should I have left the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f947189 looks good, but I don't think we should force the user to use core.ignoreCase=false
. As we leave it to the user to run git init
they should be free to configure such things without fast-export overriding it.
178749f
to
dd1c8f2
Compare
Thanks for the review. I've reverted the changes to |
Thank you for your contribution @thaliaarchi. |
My fix has been merged in "Consistently terminate commit messages with LF" (frej/fast-export#333).
When the length logic for fast-import 'data' commands was updated in 4c10270 (Fix data handling, 2023-03-02), one branch was missed, so commit messages now do not have a final LF appended in most cases. This changed the longtime behavior, which had been consistent since the first commit of hg2git, 9832035 (Initial import, 2007-03-06), and is expected by some applications which compare against old conversions from Mercurial[1].