git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
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: Wed, 08 Aug 2007 13:39:52 +0200	[thread overview]
Message-ID: <20070808113952.GN999MdfPADPa@greensroom.kotnet.org> (raw)
In-Reply-To: <46B91F4E.8050008@tromer.org>

On Tue, Aug 07, 2007 at 09:41:34PM -0400, Eran Tromer wrote:
> On 2007-08-07 04:51, Sven Verdoolaege wrote:
> > Surely this is a lot worse than occasionally committing something you
> > didn't plan to commit, and only if you are performing a known "dangerous"
> > operation.
> > 
> Are you saying that
> $ git reset --hard HEAD && vi foo && git commit -a
> is a "known dangerous" operation that can record corrupted content even
> though you didn't touch it?

I'm only saying that "git commit -a" will commit anything that has been
modified, so you have to be careful when using it and it just so happens
that git reset may leave submodules modified.  This should probably
be documented.
And I agree with you that this is not ideal (personally, I'd want
all checked-out submodules to get updated automatically), but it's
certainly better than your earlier proposal.

> So, when I'm sure all the edits I did in the work tree are fine, how
> *do* I safely make a commit without manually inspecting the changed
> files list, or manually listing the changed files for "git add", or
> manually running "git submodule update", or manually checking whether
> there happens to be some submodules in this project, some other such
> cumbersome measure?

If you've ever done a "git submodule update" in the project, you should
know that there are submodules and if you haven't then there are no
checked-out submodules that can get out of sync.
If you're talking about tools, then they should indeed be extra careful.

[another proposal]
> 
> Does this sound reasonable?

I'll leave it to others to comment on that one.

skimo

      reply	other threads:[~2007-08-08 11:40 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
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 [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070808113952.GN999MdfPADPa@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).