Re: [git] Re: [PATCH v3 8/9] user-manual: Flesh out uncommitted changes and submodule updates

2013-02-19 Thread W. Trevor King
On Sun, Feb 17, 2013 at 06:53:59PM -0800, Junio C Hamano wrote:
> > +If you did not commit your submodule changes, the changes will *not*
> > +be silently overwritten.  Instead, you get the usual warning about not
> > +being able switch from a dirty branch.
> 
> The scenario this talks about is to commit changes in the
> superproject and then to run "submodule update".  I think the above
> clarification is still incomplete.  You may have committed in the
> submodule some changes but not all.
> 
>   If you have uncommitted changes in your submodule working
>   tree, "git submodule update" will not overwrite them.
>   Instead...
> 
> would be an improvement, I think.

Will do in v4.

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature


Re: [PATCH v3 8/9] user-manual: Flesh out uncommitted changes and submodule updates

2013-02-17 Thread Junio C Hamano
"W. Trevor King"  writes:

> From: "W. Trevor King" 
>
> If you try and update a submodule with a dirty working directory, you
> get an error message like:
>
>   $ git submodule update
>   error: Your local changes to the following files would be overwritten by 
> checkout:
>   ...
>   Please, commit your changes or stash them before you can switch branches.
>   Aborting
>   ...
>
> Mention this in the submodule notes.  The previous phrase was short
> enough that I originally thought it might have been referring to the
> reflog note (obviously, uncommitted changes will not show up in the
> reflog either ;).
>
> Signed-off-by: W. Trevor King 
> ---
>  Documentation/user-manual.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index cf09ddf..3381c22 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -3729,7 +3729,9 @@ module a
>  
>  NOTE: The changes are still visible in the submodule's reflog.
>  
> +If you did not commit your submodule changes, the changes will *not*
> +be silently overwritten.  Instead, you get the usual warning about not
> +being able switch from a dirty branch.

The scenario this talks about is to commit changes in the
superproject and then to run "submodule update".  I think the above
clarification is still incomplete.  You may have committed in the
submodule some changes but not all.

If you have uncommitted changes in your submodule working
tree, "git submodule update" will not overwrite them.
Instead...

would be an improvement, I think.

>  
>  [[low-level-operations]]
>  Low-level Git operations
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html