Skip to content
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

handle spaces in filenames in file-list #10

Open
GochoMugo opened this issue Oct 5, 2016 · 0 comments
Open

handle spaces in filenames in file-list #10

GochoMugo opened this issue Oct 5, 2016 · 0 comments
Labels

Comments

@GochoMugo
Copy link
Member

A filename with a space within, for example "spaced filename.txt" (contains a tab character in the filename),
and a hash digest, for example, "12345", would be recorded in the
file-list as:

spaced    filename.txt    12345

The current parser would determine that the <filename> is "spaced"
and the <sha> is "filename.txt". While this would not halt the
process, it would make the diffs-generation assume that the file has
been changed, which is incorrect.

We need to fix this bug:

Approach A:

An approach would be to quote the filename in the file-list. For example,

"spaced    filename.txt"    12345

But how to handle the " character in the filename? For example,

"comma\\"filename.txt"    12345

Approach B:

We could change the format, from <filename> <hash> to <hash> <filename>.
This is quite easier to implement. We are sure the <hash> can not contain
a space/tab character.

How to handle new input, with embedded space characters, being added to the
format.

@GochoMugo GochoMugo added the bug label Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant