From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (May 2013, #09; Wed, 29)
Date: Thu, 30 May 2013 21:18:17 +0200 [thread overview]
Message-ID: <51A7A5F9.2030107@web.de> (raw)
In-Reply-To: <7va9ndqqyf.fsf@alter.siamese.dyndns.org>
Am 30.05.2013 01:58, schrieb Junio C Hamano:
> * jl/submodule-mv (2013-04-23) 5 commits
> (merged to 'next' on 2013-04-23 at c04f574)
> + submodule.c: duplicate real_path's return value
> (merged to 'next' on 2013-04-19 at 45ae3c9)
> + rm: delete .gitmodules entry of submodules removed from the work tree
> + Teach mv to update the path entry in .gitmodules for moved submodules
> + Teach mv to move submodules using a gitfile
> + Teach mv to move submodules together with their work trees
>
> "git mv A B" when moving a submodule A does "the right thing",
> inclusing relocating its working tree and adjusting the paths in
> the .gitmodules file.
There are only two issues I'm aware of:
*) When the .gitmodules file is already modified but unchanged
running rm or mv on a submodule will stage those changes too.
*) There is a harmless but unnecessary double invocation of strlen()
in the function (fixed by the diff below).
I plan to fix the first issue in another patch which would also get
rid of the second issue, as exactly that code would have to be touched
anyways.
Does that make sense?
----------8<-----------------
diff --git a/submodule.c b/submodule.c
index edfc23c..4670af7 100644
--- a/submodule.c
+++ b/submodule.c
@@ -102,7 +102,7 @@ void stage_updated_gitmodules(void)
struct cache_entry *ce;
int namelen = strlen(".gitmodules");
- pos = cache_name_pos(".gitmodules", strlen(".gitmodules"));
+ pos = cache_name_pos(".gitmodules", namelen);
if (pos < 0) {
warning(_("could not find .gitmodules in index"));
return;
next prev parent reply other threads:[~2013-05-30 19:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 23:58 What's cooking in git.git (May 2013, #09; Wed, 29) Junio C Hamano
2013-05-30 9:47 ` Thomas Rast
2013-05-30 9:56 ` Ramkumar Ramachandra
2013-06-02 23:44 ` Junio C Hamano
2013-05-30 19:18 ` Jens Lehmann [this message]
2013-06-02 18:50 ` Junio C Hamano
2013-06-03 21:27 ` Jens Lehmann
2013-07-01 22:05 ` Junio C Hamano
2013-05-30 19:23 ` Jens Lehmann
2013-05-31 19:40 ` John Keeping
2013-06-03 14:54 ` John Keeping
2013-06-03 15:30 ` Junio C Hamano
2013-06-03 21:47 ` Jens Lehmann
2013-06-03 22:23 ` John Keeping
2013-06-04 5:29 ` Heiko Voigt
2013-06-04 8:10 ` John Keeping
2013-06-04 11:17 ` Heiko Voigt
2013-06-04 12:48 ` John Keeping
2013-06-04 21:39 ` Jens Lehmann
2013-06-04 22:04 ` John Keeping
2013-06-04 22:57 ` Re: " Phil Hord
2013-06-05 8:19 ` John Keeping
2013-05-31 6:16 ` Øystein Walle
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51A7A5F9.2030107@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
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).