Jean-Christophe,

In your first session, the 'vcsh commit' will in fact commit all changes
staged for commit in all repositories. In most real cases, I think you
want different commit messages for different repositories, each
reflecting your changes in that particular repository. The vcsh manpage
or vcsh --help show no additional command line parameters and it just
ignores any parameters it doesn't need.

Your change after the first commit (both in your first and second
session) will not be committed until you explicitly add it. This
requires two actions (add and commit), but in practice, you can make a
lot of changes and split them in several commits, which is useful, for
example, to store different bugfixes in different commits, so that they
can be selectively applied to other branches. You can even add some
changes in a file to a first commit and other changes in the same file
to a second commit. This is absolutely standard git behaviour. If you
want to add and commit in one command, specify which files you want to
commit (e.g. vcsh repo commit file1 file2 -m "comment").

Git's behaviour requires some extra commands sometimes which can look
useless for simple test scenarios, but when I started using git for
larger and more complex projects, each of these strange situations
proved to be very useful in quite some situations.

Best regards,

Maarten



Op 07-03-15 om 16:07 schreef Jean-Christophe Boggio:
> Hello,
>
> I'm discovering vcsh and try to write a noobs howto in french but I
> get stuck really early. This is my test :
>
> echo "test" >.totorc
> vcsh init toto
> vcsh toto add .totorc
> vcsh commit -m "first commit"
>
> This will "forget" my -m comment, open $EDITOR and let me type it again.
> Then :
>
> echo "Another test" >>.totorc
> vcsh commit
>
> toto:
> Sur la branche master
> Modifications qui ne seront pas validées :
>         modifié :         .totorc
>
> Which I would translate as :
>
> toto:
> On branch master
> Changes not staged for commit:
>         modified :         .totorc
>
> If I add .totorc once again it will get committed but this makes it
> useless.
>
> ==========================================================
>
> Second try (rm -rf .config/vcsh), this time specifying the repository
> name to vcsh when committing (thus sending the command to git directly) :
>
> vcsh init toto
> vcsh toto add .totorc
> vcsh toto commit -m "first commit"
> [master (commit racine) 96f8587] first commit
>  1 file changed, 2 insertions(+)
>  create mode 100644 .totorc
>
> The -m is recognized
>
> echo "Another test" >>.totorc
> vcsh toto commit -m "second commit"
> toto:
> On branch master
> Changes not staged for commit:
>         modified :         .totorc
>
>
> :-( Same fail.
>
> ===========================================================
>
> Can you explain to me what I'm doing wrong ?
>
> I'm using Debian's version 1.20140508-1
>
> Many thanks,
>
> JC
> _______________________________________________
> vcs-home mailing list
> vcs-home@lists.madduck.net
> http://lists.madduck.net/listinfo/vcs-home

_______________________________________________
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Reply via email to