all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ingo Lohmar <i.lohmar@gmail.com>
Cc: acm@muc.de, kaushal.modi@gmail.com, emacs-devel@gnu.org
Subject: Re: Understanding a recent commit in emacs-25 branch [ed19f2]
Date: Sun, 03 Apr 2016 18:40:21 +0300	[thread overview]
Message-ID: <8337r2r996.fsf@gnu.org> (raw)
In-Reply-To: <8760vyemy0.fsf@acer.localhost.com> (message from Ingo Lohmar on Sun, 03 Apr 2016 17:23:03 +0200)

> From: Ingo Lohmar <i.lohmar@gmail.com>
> Cc: acm@muc.de, emacs-devel@gnu.org, kaushal.modi@gmail.com
> Date: Sun, 03 Apr 2016 17:23:03 +0200
> 
> On Sun, Apr 03 2016 18:01 (+0300), Eli Zaretskii wrote:
> 
> >> From: Ingo Lohmar <i.lohmar@gmail.com>
> >> Date: Sun, 03 Apr 2016 14:30:27 +0200
> >> Cc: Emacs developers <emacs-devel@gnu.org>,
> >> 	Kaushal Modi <kaushal.modi@gmail.com>
> >> 
> >> Single caveat: Do NOT start a merge when you have uncommited changes.
> >> If you want, do 'git stash' first to recover them later.
> >
> > I disagree with this caveat.  There's no reason to frighten people
> > like that, as doing such merges will work most of the time.
> >
> 
> This is not about frightening people; to reiterate, this is a prominent
> warning on the git merge man page --- I will not tell people it's ok
> when the official documentation discourages it.

I think your documentation might be outdated.  Here's what the "git
pull" man page I have says:

  In Git 1.7.0 or later, to cancel a conflicting merge, use git reset
  --merge. Warning: In older versions of Git, running git pull with
  uncommitted changes is discouraged: while possible, it leaves you in a
  state that may be hard to back out of in the case of a conflict.

  If any of the remote changes overlap with local uncommitted changes,
  the merge will be automatically cancelled and the work tree
  untouched. It is generally best to get any local changes in working
  order before pulling or stash them away with git-stash(1).

This is with Git 2.8.0.

IOW, for a recent enough Git, they _recommend_ stashing, but no longer
_warn_ about merging in this situation.  Which is exactly my
experience.

> Also, in my opinion it is conceptually a bad practice to start git
> operations that affect the commit graph (such as merge) from an
> unclean state.

I agree that it's preferable to have a clean repo, but in practice it
doesn't always work to have it.  Being able to pull when you have
uncommitted changes is an important feature; a VCS that doesn't
support it is IMO severely broken, because it will get in the way.

> >> In this case, you have to learn about rebase, as in 'git rebase
> >> origin/master'.
> >
> > "git rebase" is a bad idea when merging a long-lived feature branch,
> > so please don't advise this to users who are evidently not Git
> > experts.
> 
> It is my understanding (and I made it clear that it was partly
> guesswork) that Alan asked precisely for that functionality.  I am not
> sufficiently patronizing to tell intelligent people they are not ready
> for something when they explicitly ask for it. :)

You may wish re-reading some of Alan's past messages about his
adventures with Git, to get a better idea about that.



  reply	other threads:[~2016-04-03 15:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  5:32 Understanding a recent commit in emacs-25 branch [ed19f2] Kaushal Modi
2016-04-01  5:43 ` Kaushal Modi
2016-04-01  6:43   ` Paul Eggert
2016-04-03 12:03     ` Alan Mackenzie
2016-04-03 12:10       ` Achim Gratz
2016-04-03 14:18         ` Stefan Monnier
2016-04-03 14:49           ` Óscar Fuentes
2016-04-03 18:15           ` Achim Gratz
2016-04-03 18:45             ` Andreas Schwab
2016-04-03 18:56               ` Eli Zaretskii
2016-04-03 20:02               ` Paul Eggert
2016-04-03 21:15                 ` Andreas Schwab
2016-04-03 23:11                 ` John Wiegley
2016-04-03 12:18       ` Ingo Lohmar
2016-04-03 11:17   ` Alan Mackenzie
2016-04-03 11:27     ` Andreas Schwab
2016-04-03 11:40     ` Ingo Lohmar
2016-04-03 12:14       ` Alan Mackenzie
2016-04-03 12:30         ` Ingo Lohmar
2016-04-03 14:12           ` Andreas Schwab
2016-04-03 14:57             ` Ingo Lohmar
2016-04-03 15:08               ` Andreas Schwab
2016-04-03 15:12               ` Eli Zaretskii
2016-04-03 15:01           ` Eli Zaretskii
2016-04-03 15:23             ` Ingo Lohmar
2016-04-03 15:40               ` Eli Zaretskii [this message]
2016-04-03 16:00                 ` Ingo Lohmar
2016-04-03 16:19                   ` Eli Zaretskii
2016-04-03 16:24                     ` Andreas Schwab
2016-04-03 17:09                       ` Eli Zaretskii
2016-04-03 17:35                         ` Andreas Schwab
2016-04-03 18:04                           ` Eli Zaretskii
2016-04-03 11:44     ` Dmitry Gutov

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=8337r2r996.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=i.lohmar@gmail.com \
    --cc=kaushal.modi@gmail.com \
    /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.