gnu-system-discuss
[Top][All Lists]
Advanced

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

Re: Making git as easy as CVS, for handling merge conflicts


From: Eli Zaretskii
Subject: Re: Making git as easy as CVS, for handling merge conflicts
Date: Thu, 07 Nov 2019 15:53:54 +0200

> From: Richard Stallman <address@hidden>
> Cc: address@hidden
> Date: Wed, 06 Nov 2019 23:43:56 -0500
> 
>   > I'll just say, for posterity, that avoiding staging is not difficult if
>   > you have simple requirements.  A single command that creates a commit
>   > containing all modified files without having to stage them first:
>   >
>   >   git commit -a

I actually have a Git alias, called "ci", which does exactly that,
because in the vast majority of cases I do want to commit all of the
changed files.  (It's a pity Git's default is to require manual
staging; IMO, it should reverse its defaults, or at least have a
config setting to do that.)

However, this is not really related to the issue at hand, because
Emacs automatically stages a file when you save it after resolving
merge conflicts.

>   > You can also give a set of specific files to put into the commit, which
>   > do not need to be staged first:
>   >
>   >   git commit <file1> <file2> ...
>
> That is what I did.  Sometimes it worked fine.  Sometimes it failed.
> 
> I can't remember for certain whether the failures occurred
> on commit or on pull.  But I think they happened on pull
> when there were othehr changes in the repo.

I'm almost positive that it happened on pull.  Creating a conflict on
commit is quite hard, because nothing changes the files in your local
repository simultaneously with your work on your changes.

Anyway, I think it is important to understand the details of your
difficulties to which you alluded when you said:

> Is it possible to write a front-end for Git which reliably handles
> merge conflicts the way CVS handles them?

Would you mind describing in detail your workflow for handling merge
conflicts with CVS, including VC commands you invoke and commands you
invoke from the shell (if there are any)?  In general, with Git it
should be the same, modulo the need to say "git push" after
committing, but maybe you have some specifics in mind that I'm
missing.  Without these details, I feel that the job of making a front
end like you asked for is not really well defined.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]