From: Sven Verdoolaege <skimo@kotnet.org>
To: Eran Tromer <git2eran@tromer.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] unpack-trees.c: assume submodules are clean during check-out
Date: Sun, 05 Aug 2007 16:46:32 +0200 [thread overview]
Message-ID: <20070805144632.GB999MdfPADPa@greensroom.kotnet.org> (raw)
In-Reply-To: <46B4A350.9060806@tromer.org>
On Sat, Aug 04, 2007 at 12:03:28PM -0400, Eran Tromer wrote:
> Works here: it silences the check and allows switching branches. Still,
> leaving the working tree dirty can inadvertently affect subsequent
> commits. Consider the most ordinary of sequences:
>
> $ git checkout experimental-death-ray
> $ git submodules update
> (return a week later, woozy from the vacation.)
> $ git checkout master
Here, it'll warn that your submodule isn't up-to-date.
> (hack hack hack)
> $ git commit -a -m "fixed typos"
And if you run "git status" first, it'll tell you that the submodule
(still) isn't up-to-date.
> $ git push
> (Oops. You've just accidentally committed the wrong submodule heads.)
You always have to be careful when doing "git commit -a".
> Another approach is for pull, checkout etc. to automatically update the
> submodule' head ref, but no more.
Then everything, including "git submodule update", would assume
that the submodule is up-to-date.
skimo
next prev parent reply other threads:[~2007-08-05 14:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 18:28 [PATCH] unpack-trees.c: assume submodules are clean during check-out Sven Verdoolaege
2007-07-18 7:29 ` Junio C Hamano
2007-08-01 14:05 ` Sven Verdoolaege
2007-08-04 5:13 ` Junio C Hamano
2007-08-04 11:41 ` Lars Hjemli
2007-08-05 6:02 ` Junio C Hamano
2007-08-05 13:55 ` Sven Verdoolaege
2007-08-04 16:03 ` Eran Tromer
2007-08-05 6:12 ` Junio C Hamano
2007-08-05 14:46 ` Sven Verdoolaege [this message]
2007-08-06 18:42 ` Eran Tromer
2007-08-06 19:03 ` Sven Verdoolaege
2007-08-07 3:24 ` Eran Tromer
2007-08-07 8:51 ` Sven Verdoolaege
2007-08-08 1:41 ` Eran Tromer
2007-08-08 11:39 ` Sven Verdoolaege
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=20070805144632.GB999MdfPADPa@greensroom.kotnet.org \
--to=skimo@kotnet.org \
--cc=git2eran@tromer.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=skimo@liacs.nl \
/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).