Re: [PATCH] unpack-trees.c: assume submodules are clean during check-out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux