all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: git commit/push and VC
Date: Sat, 22 Nov 2014 11:43:16 +0100	[thread overview]
Message-ID: <87egsvecsb.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 831tovttmk.fsf@gnu.org

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Achim Gratz <Stromeko@nexgo.de>
>> Date: Thu, 20 Nov 2014 19:17:43 +0100
>> 
>> Eli Zaretskii writes:
>> > There are still issues that I'd like to be sure about before I fix
>> > them.  Would people please comment on these:
>> >
>> >   . the instructions say that a "git commit" is necessary even when
>> >     the merge is without conflicts, which AFAIK is incorrect with Git
>> 
>> In standard configuration a non-conflicted merge will be auto-committed,
>> yes.  As always, that default can be configured to instead stop before
>> the commit.
>
> OK, so if we are going to recommend to use "commit -a" (and actually
> we already do, see the Wiki), then I guess "git add" after resolving
> merge conflicts is also not necessary, right?  That is, instead of
> this:
>
>   git merge master
>   # resolve conflicts
>   git add file-you-changed
>   git commit -m "Merge from mainline."
>
> we should recommend this:
>
>   git merge master
>   # resolve conflicts
>   git commit -a -m "Merge from mainline."
>
> Is that correct?

I doubt that it works.  At any rate, Git does not distinguish between a
file with merge conflict markers and one without merge conflict markers
(which are valid file contents, after all).

It records unresolved conflicts in the index where they are overwritten
when doing git-add.  I haven't checked whether git commit -a will
actually overwrite a conflicted index.  If it does, we don't want to
recommend that error-prone workflow which is likely to record files with
unresolved conflicts as resolved.  If it doesn't, git commit -a will not
help.  smerge-mode, incidentally, adds the file in question
automatically anyway after all conflicts are resolved.  So if "# resolve
conflicts" implies use of smerge-mode, just git commit should be enough.

-- 
David Kastrup




  reply	other threads:[~2014-11-22 10:43 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 23:36 git commit/push and VC Stephen Berman
2014-11-20  2:07 ` Glenn Morris
2014-11-20 12:28   ` Stephen Berman
2014-11-20  3:29 ` Yuri Khan
2014-11-20 15:45   ` Eli Zaretskii
2014-11-20 18:17     ` Achim Gratz
2014-11-20 20:59       ` Eli Zaretskii
2014-11-21  0:31         ` Stephen J. Turnbull
2014-11-21  9:01           ` Eli Zaretskii
2014-11-22  5:30             ` Stephen J. Turnbull
2014-11-22  5:50               ` Yuri Khan
2014-11-22  7:17                 ` Stephen J. Turnbull
2014-11-22  6:50               ` Ivan Shmakov
2014-11-22  7:25                 ` Stephen J. Turnbull
2014-11-22  7:42                   ` Ivan Shmakov
2014-11-22  8:59                     ` Stephen J. Turnbull
2014-11-22  8:36                 ` Eli Zaretskii
2014-11-22  8:37                 ` Andreas Schwab
2014-11-22  8:50                   ` Ivan Shmakov
2014-11-22  8:35               ` Eli Zaretskii
2014-11-22  9:36                 ` Stephen J. Turnbull
2014-11-22 10:25                   ` Eli Zaretskii
2014-11-22 11:31                     ` Andreas Schwab
2014-11-22 12:37                       ` Eli Zaretskii
2014-11-22 13:00                         ` Andreas Schwab
2014-11-22 13:45                           ` Eli Zaretskii
2014-11-22 14:12                             ` Andreas Schwab
2014-11-22 15:20                               ` Eli Zaretskii
2014-11-21  8:23         ` martin rudalics
2014-11-21  9:06           ` Eli Zaretskii
2014-11-21  9:40             ` Dani Moncayo
2014-11-21 10:24             ` martin rudalics
2014-11-21 10:40               ` Eli Zaretskii
2014-11-21  8:49         ` Thien-Thi Nguyen
2014-11-21  9:12           ` Eli Zaretskii
2014-11-22 10:30       ` Eli Zaretskii
2014-11-22 10:43         ` David Kastrup [this message]
2014-11-22 11:01           ` Eli Zaretskii
2014-11-22 11:16             ` Eli Zaretskii
2014-11-22 11:22               ` David Kastrup
2014-11-21 10:34     ` Stephen Berman

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

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

  git send-email \
    --in-reply-to=87egsvecsb.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.