git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Allow cloning to an existing empty directory
@ 2009-01-08 23:24 Alexander Potashev
  2009-01-08 23:24 ` [PATCH 1/2] " Alexander Potashev
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Potashev @ 2009-01-08 23:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List, Alexander Potashev

The problem I experienced today was that I couldn't clone a repo to a
separate filesystem. I've created a new LVM volume, a FS on it (XFS)
and mounted it to a directory.

But wasn't able to clone the repo to that directory. It's impossible to
mount a FS to a non-existent directory, right? But Git refuses to clone
to an existing directory.

The solution in my first patch allows cloning to an existing empty
directory. However, there could be problems doing the same as I did
with XFS using ext2-like filesystems, because they have lost+found
directories, i.e. the root directory of those FSs is never empty.



The first patch adds a function (is_pseudo_dir_name) to compare a
string with "." and "..", the second patch reuses that function in
the rest of the code.


Alexander Potashev (2):
  Allow cloning to an existing empty directory
  Use is_pseudo_dir_name everywhere

 builtin-clone.c         |    8 +++++---
 builtin-count-objects.c |    5 ++---
 builtin-fsck.c          |   14 ++++----------
 builtin-prune.c         |   14 ++++----------
 builtin-rerere.c        |   11 +++++------
 dir.c                   |   31 +++++++++++++++++++++++--------
 dir.h                   |    8 ++++++++
 entry.c                 |    5 ++---
 remote.c                |    6 ++----
 transport.c             |    4 +---
 10 files changed, 56 insertions(+), 50 deletions(-)

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

end of thread, other threads:[~2009-01-10  2:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 23:24 [PATCH 0/2] Allow cloning to an existing empty directory Alexander Potashev
2009-01-08 23:24 ` [PATCH 1/2] " Alexander Potashev
2009-01-08 23:24   ` [PATCH 2/2] Use is_pseudo_dir_name everywhere Alexander Potashev
2009-01-09  7:03     ` Johannes Sixt
2009-01-09  7:22       ` Johannes Sixt
2009-01-09  8:33         ` Junio C Hamano
2009-01-09 10:24           ` Alexander Potashev
2009-01-10  2:48             ` Junio C Hamano

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