git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Misspelled directory
@ 2014-05-19 13:05 Alexandre Badez
  2014-05-19 14:28 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Badez @ 2014-05-19 13:05 UTC (permalink / raw)
  To: git

Hi,

Today I've issue a problem with git.

I've start a little project on github ( https://github.com/Djabx/mgd ).
And I used https://stackedit.io/ for editing my README.md file.

When I publish it on my repo (stackedit), I've set the destination
file path to "./README.md".

The problem is, that Git commit and create a '.' directory.
Visible here: https://github.com/Djabx/mgd/tree/15a0ec6aee0ae08764623a304e3fc5ce96cef821

The '.' directory is not the same as the root directory; you can see
that the /README.md and /./README.md are different.

I've reported the bug to stackedit (
https://github.com/benweet/stackedit/issues/405
) who ignore it (not their fault).
Asked about it on stackoverflow:
https://stackoverflow.com/questions/23734960/how-to-delete-a-misspelled-directory
And finally found a work around.

My question is, is it really "normal" that a '.' directory is accepted by git ?
Shouldn't it be a "special" case ?

Thanks for your time.

--
Alex

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Misspelled directory
  2014-05-19 13:05 Misspelled directory Alexandre Badez
@ 2014-05-19 14:28 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2014-05-19 14:28 UTC (permalink / raw)
  To: Alexandre Badez; +Cc: git

On Mon, May 19, 2014 at 03:05:42PM +0200, Alexandre Badez wrote:

> The '.' directory is not the same as the root directory; you can see
> that the /README.md and /./README.md are different.

Right. Inside git trees, "." as an entry name does not have any special
meaning. However, because it does have meaning in filesystems, git
itself will never create such an entry, and "git fsck" will warn about
it.

> I've reported the bug to stackedit (
> https://github.com/benweet/stackedit/issues/405
> ) who ignore it (not their fault).

GitHub normally blocks objects that do not pass "fsck" from being
pushed, but there are some loopholes when going through the API, which
stackedit does. I'll bring this one to the attention of the GitHub API
developers.

However, the end result will probably be GitHub rejecting the API
request from stackedit to create the bogus tree. So stackedit may end up
wanting to adjust their code to handle the situation more gracefully
anyway.

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-19 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 13:05 Misspelled directory Alexandre Badez
2014-05-19 14:28 ` Jeff King

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).