Skip to content

credential.c: fix credential reading for DOS systems #2516

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

Merged
merged 1 commit into from
Feb 13, 2020
Merged

credential.c: fix credential reading for DOS systems #2516

merged 1 commit into from
Feb 13, 2020

Conversation

nyckyta
Copy link

@nyckyta nyckyta commented Feb 13, 2020

This fix makes using git credentials more friendly to Windows users. In previous version it was unable to finish input correctly without configuration changes (was tested in powershell, cmd, cygwin).
As we know credential filling should be finished by empty input, but
previous implementation does not take into account 'CLRF' ending, and hence instead of empty string we have '\r', which is interpreted as incorrect string.
So, this commit changes default reading function to more Windows compatible reading function.

Signed-off-by: Nikita Leonov [email protected]

@nyckyta
Copy link
Author

nyckyta commented Feb 13, 2020

Seems like checker does not understand me :) I signed off commit by real name, as was mentioned in contributing recommendations, but for now checker requires my nickname.

@nyckyta nyckyta requested a review from dscho February 13, 2020 14:31
@dscho
Copy link
Member

dscho commented Feb 13, 2020

Looks good! Could you rebase onto master, though?

@nyckyta nyckyta changed the base branch from shears/maint to shears/master February 13, 2020 14:59
@nyckyta
Copy link
Author

nyckyta commented Feb 13, 2020

Looks good! Could you rebase onto master, though?

Sure, done.

@nyckyta nyckyta changed the base branch from shears/master to master February 13, 2020 15:17
This fix makes using Git credentials more friendly to Windows users. In
previous version it was unable to finish input correctly without
configuration changes (tested in PowerShell, CMD, Cygwin).

We know credential filling should be finished by empty input, but the
current implementation does not take into account CR/LF ending, and
hence instead of the empty string we get '\r', which is interpreted as
an incorrect string.

So this commit changes default reading function to a more Windows
compatible reading function.

Signed-off-by: Nikita Leonov <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member

dscho commented Feb 13, 2020

I actually rebased the patch, and augmented the commit message in preparation for sending this off to the Git mailing list.

@dscho dscho merged commit 69c22a9 into git-for-windows:master Feb 13, 2020
git-for-windows-ci pushed a commit that referenced this pull request Feb 13, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 14, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 14, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 14, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 17, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 17, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 17, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 17, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit to dscho/git that referenced this pull request Feb 17, 2020
…redential

credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 17, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 17, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Feb 18, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Feb 18, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 24, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 24, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 24, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Sep 24, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 25, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 27, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 27, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 28, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 28, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Sep 29, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Sep 29, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Sep 29, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Sep 29, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Sep 30, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Oct 2, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Oct 2, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Oct 2, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Oct 2, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Oct 5, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit to dscho/git that referenced this pull request Oct 5, 2020
…redential

credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Oct 6, 2020
credential.c: fix credential reading with regards to CR/LF
git-for-windows-ci pushed a commit that referenced this pull request Oct 7, 2020
credential.c: fix credential reading with regards to CR/LF
dscho added a commit that referenced this pull request Oct 20, 2020
credential.c: fix credential reading with regards to CR/LF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants