From: Johannes Sixt Date: Tue, 29 Nov 2016 21:14:00 GMT Subject: Re: [PATCH v2 00/11] git worktree (re)move Message-ID: In-Reply-To: <20161129135646.GA19797@ash> Am 29.11.2016 um 14:56 schrieb Duy Nguyen: > If you drop all the "copy.c: " patches and squash this to "worktree > move: new command", and if Windows rename() can move directories, then > git should build and new tests pass. Thanks! rename() can move directories on Windows, provided that *nothing* inside the directory is in any form of use by any process, particularly also not as the "current working directory" (as per getcwd()). > diff --git a/copy.c b/copy.c > index 4de6a11..b232aec 100644 > --- a/copy.c > +++ b/copy.c > @@ -65,3 +65,9 @@ int copy_file_with_time(const char *dst, const char *src, int mode) > return copy_times(dst, src); > return status; > } > + > +int copy_dir_recursively(const char *dst, const char *src) > +{ > + errno = ENOSYS; > + return -1; > +} An error message "cannot move directories across devices" or something would be preferable over "Function not implemented", of course. Or did you mean to set errno = EXDEV? -- Hannes