Re: git fails with control characters in trunk directory name
From: Hugo Mildenberger <hidden>
Date: 2016-06-15 22:46:45
Hello Alex,
2009/5/11 Hugo Mildenberger [off-list ref]:quoted
Using the mouse to paste a git url from a website into a terminal session in order to clone the repository, I recently managed to include invisible control characters into the git trunk directory name.Git has no "trunk". Not in CVS/CVN sense, at leastquoted
Consequently, I faced all sort of strange behaviour like git pull not working (error 2), later on a kernel make which supposedly could not finding a rule to create the trunk directory and more such inconsistencies. I then reinstalled git, rcs and so on and also tried unsuccessfully several git versions. The next morning I looked into the .git/config file and recognized that the "url" key value within the [remote "origin"] section contained some control characters: ^J and \n, as fas as I remember.What platform are you on? Can you show your .git/config?quoted
While this was almost entirely my fault, git could possibly apply a filter, reject such a name or at least issue a warning.Maybe. Or maybe it can just work (well, assuming the user meant to use an url with character you considered "control").
I said it actually did not work well, independent from how anyone prefers to classify characters. My platform is Gentoo-hardened with unicode support and an ext3 disk format . With "trunk directory" I meant the top level directory which is created when you run git clone on a remote url -- sorry for still not being a native git speaker. I don't have the original setup anymore. My _working_ ".git/config" is now: [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-testing.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master The remote url did contain something like "^J\n" at the end, as did the top level (the much derided "trunk") directory name on disk. I probably got there by puting the copied url within quotes on the command line, but today I'm unsure exactly how I arrived there. However, old fashioned as I am, I still consider e.g. a linefeed to be a "control character", and inspite of your flashing git punditry I still consider this to be an issue.