Re: [PATCH] mv: Fix spurious warning when moving a file in presence of submodules

2013-10-17 Thread Jonathan Nieder
Jens Lehmann wrote: > In commit 0656781fa "git mv" learned to update the submodule path in the > .gitmodules file when moving a submodule in the work tree. But since that > commit update_path_in_gitmodules() gets called no matter if we moved a > submodule or a regular file, which is wrong and lead

Re: [PATCH] mv: Fix spurious warning when moving a file in presence of submodules

2013-10-14 Thread Matthieu Moy
Jonathan Nieder writes: > Matthieu Moy wrote: >> Jens Lehmann writes: > >>> static struct lock_file lock_file; >>> +#define SUBMODULE_WITH_GITDIR ((const char *)1) >> >> I don't like very much hardcoded addresses like this. Are you 100% sure >> address 1 will never be returned by xstrdup on any

Re: [PATCH] mv: Fix spurious warning when moving a file in presence of submodules

2013-10-13 Thread Jonathan Nieder
Matthieu Moy wrote: > Jens Lehmann writes: >> static struct lock_file lock_file; >> +#define SUBMODULE_WITH_GITDIR ((const char *)1) > > I don't like very much hardcoded addresses like this. Are you 100% sure > address 1 will never be returned by xstrdup on any platform? The risk is > small if n

Re: [PATCH] mv: Fix spurious warning when moving a file in presence of submodules

2013-10-13 Thread Jens Lehmann
Am 13.10.2013 17:05, schrieb Matthieu Moy: > Jens Lehmann writes: > >> static struct lock_file lock_file; >> +#define SUBMODULE_WITH_GITDIR ((const char *)1) > > I don't like very much hardcoded addresses like this. Are you 100% sure > address 1 will never be returned by xstrdup on any platform

Re: [PATCH] mv: Fix spurious warning when moving a file in presence of submodules

2013-10-13 Thread Matthieu Moy
Jens Lehmann writes: > static struct lock_file lock_file; > +#define SUBMODULE_WITH_GITDIR ((const char *)1) I don't like very much hardcoded addresses like this. Are you 100% sure address 1 will never be returned by xstrdup on any platform? The risk is small if not negligible, but I'm unconfor