git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] git-mv submodule failure
@ 2007-10-20  6:01 Yin Ping
  2007-10-20 21:24 ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Yin Ping @ 2007-10-20  6:01 UTC (permalink / raw)
  To: git

project
  .git
  file1
  submoudle
     .git
      file2

$ cd project
$ git-mv submodule submodule1
fatal: source directory is empty, source=submodule, destination=submodule1

However, the following is ok and rename is automatically detected
$ cd project
$ mv submodule submodule1
$ git-add submodule1
$ git-commit -a

which gives in vim:
# Please enter the commit message for your changes.
# (Comment lines starting with '#' will not be included)
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   renamed:    submodule -> submodule1
#

-- 
franky

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

* Re: [BUG] git-mv submodule failure
  2007-10-20  6:01 [BUG] git-mv submodule failure Yin Ping
@ 2007-10-20 21:24 ` Johannes Schindelin
  2007-10-21  5:48   ` Yin Ping
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2007-10-20 21:24 UTC (permalink / raw)
  To: Yin Ping; +Cc: git

Hi,

On Sat, 20 Oct 2007, Yin Ping wrote:

> project
>   .git
>   file1
>   submoudle
>      .git
>       file2
> 
> $ cd project
> $ git-mv submodule submodule1
> fatal: source directory is empty, source=submodule, destination=submodule1
> 
> However, the following is ok and rename is automatically detected
> $ cd project
> $ mv submodule submodule1
> $ git-add submodule1
> $ git-commit -a
> 
> which gives in vim:
> # Please enter the commit message for your changes.
> # (Comment lines starting with '#' will not be included)
> # On branch master
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> #   renamed:    submodule -> submodule1
> #

But of course .gitmodules is unaffected.  But it should be changed, too.

Ciao,
Dscho

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

* Re: [BUG] git-mv submodule failure
  2007-10-20 21:24 ` Johannes Schindelin
@ 2007-10-21  5:48   ` Yin Ping
  2007-10-21 10:02     ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Yin Ping @ 2007-10-21  5:48 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

>
> But of course .gitmodules is unaffected.  But it should be changed, too.
>

IMHO, changing .gitmodules is what the 'git-submodule mv' should do,
and 'git-mv' should only rename the module directory

> Ciao,
> Dscho
>
>


-- 
franky

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

* Re: [BUG] git-mv submodule failure
  2007-10-21  5:48   ` Yin Ping
@ 2007-10-21 10:02     ` Johannes Schindelin
  2007-10-22 11:46       ` Yin Ping
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2007-10-21 10:02 UTC (permalink / raw)
  To: Yin Ping; +Cc: git

Hi,

On Sun, 21 Oct 2007, Yin Ping wrote:

> > But of course .gitmodules is unaffected.  But it should be changed, too.
> 
> IMHO, changing .gitmodules is what the 'git-submodule mv' should do, and 
> 'git-mv' should only rename the module directory

No.  If you "git mv" a submodule, it makes absolutely no sense to leave 
.gitmodules as is.

Ciao,
Dscho

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

* Re: [BUG] git-mv submodule failure
  2007-10-21 10:02     ` Johannes Schindelin
@ 2007-10-22 11:46       ` Yin Ping
  0 siblings, 0 replies; 5+ messages in thread
From: Yin Ping @ 2007-10-22 11:46 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

On 10/21/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> No.  If you "git mv" a submodule, it makes absolutely no sense to leave
> .gitmodules as is.
>
 I can modify the .gitmodule manually since git-submodule mv is not
available. Anyway, I just want a command to rename a submodule easily,
not "mv && git-rm && git-add".
>


-- 
franky

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

end of thread, other threads:[~2007-10-22 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-20  6:01 [BUG] git-mv submodule failure Yin Ping
2007-10-20 21:24 ` Johannes Schindelin
2007-10-21  5:48   ` Yin Ping
2007-10-21 10:02     ` Johannes Schindelin
2007-10-22 11:46       ` Yin Ping

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