git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Reece Dunn" <msclrhd@googlemail.com>
To: git@vger.kernel.org
Subject: [RFC] File system difference handling in git
Date: Tue, 22 Jan 2008 09:21:02 +0000	[thread overview]
Message-ID: <3f4fd2640801220121w60cb9a69u8519a7ceb81d3414@mail.gmail.com> (raw)

Hi,

Observing the various comments w.r.t. the different (potentially
braindead) filesystems that are available, there are two general
categories for behavioural differences:

  1.  File name representation

For Linux file systems (correct me if I am wrong here), they all store
the file name as-is. The question here is what happens on
Windows-based file systems (e.g. NTFS) that are being read on Linux?

For Mac filesystems, you have the Unicode character decomposition
issues to deal with.

For Windows, you have UTF-16 filename support.

There are two basic usages for file/directory names: passing the name
to the Operating System; getting the name from the Operating System.
Therefore, you have:

   os_to_git_path( const NATIVECHAR * ospath, strbuf * gitpath );
   git_to_os_path( const char * gitpath, const NATIVECHAR * ospath, int oslen );

These can then be used to handle Operating System differences (e.g.
use WideCharToMultiByte/MultiByteToWideChar conversion on Windows to
map between UTF-8 and UCS-2/UTF-16).

If Mac has an API to handle its strange behaviour, that can be used
here as well.

  2.  Case (in)sensitivity

Here, you have the following cases:

  1.  git and the filesystem say that the files are different.

Update the git directory tree and move the file on the filesystem.

  2.  git and the filesystem say that the files are the same.

Generate an error as is currently done in git.

  3.  git says that the files are different, but the filesystem says
that the files are the same.

Allow the move, updating the git directory tree only.

- Reece

             reply	other threads:[~2008-01-22  9:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22  9:21 Reece Dunn [this message]
2008-01-22 10:24 ` [RFC] File system difference handling in git Junio C Hamano
2008-01-22 10:52   ` Reece Dunn
2008-01-22 17:44     ` Steffen Prohaska
2008-01-22 20:54     ` Jonathan del Strother
2008-01-22 16:56 ` Linus Torvalds
2008-01-22 20:21   ` David Kastrup
2008-01-22 21:32     ` Linus Torvalds

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=3f4fd2640801220121w60cb9a69u8519a7ceb81d3414@mail.gmail.com \
    --to=msclrhd@googlemail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).