git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Kurt Ablinger <kurt.ablinger@bs-ag.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Problem with filename containing '?'
Date: Fri, 29 Mar 2019 09:33:49 -0400	[thread overview]
Message-ID: <20190329133349.GA21802@sigill.intra.peff.net> (raw)
In-Reply-To: <1c1c5d858d8b431fb96b1d48044c00b7@bs-ag.com>

On Fri, Mar 29, 2019 at 01:10:19PM +0000, Kurt Ablinger wrote:

> in Linux the git-client accepts (add, commit, push) files with '?' (questionmark)  in its name.
> 
> When cloning such a repository into Eclipse (eGit/jGit) the
> repository-clone is rejected with an 'Invalid Path'-message with the
> ?-filename.
> 
> Under Linux it is possible to create a clone (the same git-binary used
> to checkin the ?-file) without any message.
> But the directory containing the ?-file is silently discarded whatever
> you checkout (master/HEAD, first or any other commit containing this
> file).

It seems to work fine for me with a few simple exercises:

  git init repo
  cd repo
  mkdir subdir
  echo foo >'subdir/bar?'
  git add .
  git commit -m 'file with question mark in name'

  git clone --no-local . child
  cd child
  ls -l
  echo changes >'subdir/bar?'
  git commit -am 'changes'
  git show

It also seems to clone fine with jgit:

  jgit clone $PWD/repo jgit-clone

Can you show us more exactly what you're running, and what doesn't work?

Also, one other question: are you sure it's actually a question mark in
the name? If there are non-ascii garbage characters, "ls" will typically
show a question mark when output is going to the terminal. E.g.:

  $ echo foo >"$(printf 'funny\1char')"
  $ ls
  funny?char
  $ ls | cat -A
  funny^Achar$
  $ ls | xxd
  00000000: 6675 6e6e 7901 6368 6172 0a              funny.char.

If it's some more exotic character, then that may be why jgit rejects
it.

-Peff

  reply	other threads:[~2019-03-29 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 13:10 Problem with filename containing '?' Kurt Ablinger
2019-03-29 13:33 ` Jeff King [this message]
2019-04-01  6:20   ` AW: " Kurt Ablinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190329133349.GA21802@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=kurt.ablinger@bs-ag.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).