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

fast-import: disallow "." and ".." path components #1831

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 25, 2024

  1. fast-import: disallow "." and ".." path components

    If a user specified e.g.
       M 100644 :1 ../some-file
    then fast-import previously would happily create a git history where
    there is a tree in the top-level directory named "..", and with a file
    inside that directory named "some-file".  The top-level ".." directory
    causes problems.  While git checkout will die with errors and fsck will
    report hasDotdot problems, the user is going to have problems trying to
    remove the problematic file.  Simply avoid creating this bad history in
    the first place.
    
    Signed-off-by: Elijah Newren <[email protected]>
    newren committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    447b679 View commit details
    Browse the repository at this point in the history