Skip to content

Conversation

@dscho
Copy link
Member

@dscho dscho commented Apr 2, 2021

As reported in newren/git-filter-repo#225, it looks like 99 bytes is not really sufficient to represent e.g. the full path to Python when installed via Windows Store (and this path is used in the hasb bang line when installing scripts via pip).

Let's increase it to what is probably the maximum sensible path size: 248 (the same as for CreateDirectory()).

As reported in newren/git-filter-repo#225, it
looks like 99 bytes is not really sufficient to represent e.g. the full
path to Python when installed via Windows Store (and this path is used
in the hasb bang line when installing scripts via `pip`).

Let's increase it to what is probably the maximum sensible path size:
248 (the same as for `CreateDirectory()`).

Signed-off-by: Johannes Schindelin <[email protected]>
Copy link

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arbitrary limits are dangerous, but it seems you have a similar limit elsewhere.

Copy link

@newren newren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, thanks for digging in to this!

@dscho dscho merged commit b2eee59 into git-for-windows:main Apr 3, 2021
@dscho dscho added this to the Next release milestone Apr 3, 2021
git-for-windows-ci pushed a commit that referenced this pull request Apr 3, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 3, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 3, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
@ViliusS
Copy link

ViliusS commented Apr 3, 2021

Good fix! Since Git for Windows has long path support why not increase this to MAX_PATH or even MAX_LONG_PATH?

EDIT: at least make it in-line with code below

char path[MAX_PATH];

@dscho dscho deleted the increase-allowed-length-of-interpreter-path branch April 3, 2021 18:57
@dscho
Copy link
Member Author

dscho commented Apr 3, 2021

Good fix! Since Git for Windows has long path support why not increase this to MAX_PATH or even MAX_LONG_PATH?

EDIT: at least make it in-line with code below

char path[MAX_PATH];

Sure, go ahead!

git-for-windows-ci pushed a commit that referenced this pull request Apr 4, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 4, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 4, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 4, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 4, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 4, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 6, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 6, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 6, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 6, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 6, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 7, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 7, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
dscho added a commit that referenced this pull request Apr 7, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 7, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Apr 8, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
dscho added a commit that referenced this pull request Apr 8, 2021
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 4, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 4, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 5, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 5, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 5, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
dscho added a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 7, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 8, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 8, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
dscho added a commit that referenced this pull request Nov 10, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
dscho added a commit that referenced this pull request Nov 10, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 10, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
dscho added a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
git-for-windows-ci pushed a commit that referenced this pull request Nov 12, 2025
…reter-path

mingw: allow for longer paths in `parse_interpreter()`
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.

5 participants