From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastien Vauban Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Tue, 31 Mar 2015 15:34:10 +0200 Organization: Sebastien Vauban Message-ID: <86ego5qoj1.fsf@example.com> References: <871tk6538w.fsf@gnu.org> <838ueezgyk.fsf@gnu.org> <878ueejnjz.fsf@uwakimon.sk.tsukuba.ac.jp> <83twx2xoc8.fsf@gnu.org> <87619hke3u.fsf@uwakimon.sk.tsukuba.ac.jp> <551A3F17.6020903@math.ntnu.no> <20150331085055.GA2871@acm.fritz.box> <87zj6tiko1.fsf@uwakimon.sk.tsukuba.ac.jp> <20150331104935.GB2871@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427808928 24069 80.91.229.3 (31 Mar 2015 13:35:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 13:35:28 +0000 (UTC) To: emacs-devel-mXXj517/zsQ@public.gmane.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Tue Mar 31 15:35:19 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YcwK5-0007zH-DA for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 15:35:17 +0200 Original-Received: from localhost ([::1]:38743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcwK4-0003Ln-Pr for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 09:35:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcwJr-0003KM-0c for emacs-devel-mXXj517/zsQ@public.gmane.org; Tue, 31 Mar 2015 09:35:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcwJl-0001Th-7b for emacs-devel-mXXj517/zsQ@public.gmane.org; Tue, 31 Mar 2015 09:35:02 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcwJk-0001TF-Vw for emacs-devel-mXXj517/zsQ@public.gmane.org; Tue, 31 Mar 2015 09:34:57 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YcwJT-0007Xz-Re for emacs-devel-mXXj517/zsQ@public.gmane.org; Tue, 31 Mar 2015 15:34:39 +0200 Original-Received: from dd5e0353a.access.telenet.be ([213.224.53.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Mar 2015 15:34:39 +0200 Original-Received: from sva-news by dd5e0353a.access.telenet.be with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Mar 2015 15:34:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: dd5e0353a.access.telenet.be X-Url: Under construction... X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.91 (windows-nt) Cancel-Lock: sha1:rZCqlzbVS8289NPXIYWCE0PRCJ4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.devel:184622 Archived-At: Alan Mackenzie wrote: > On Tue, Mar 31, 2015 at 06:24:46PM +0900, Stephen J. Turnbull wrote: >> Alan Mackenzie writes: > >>> Why can't git simply merge changes properly into the workspace, thus >>> saving users the unwelcome hassle of, e.g., git stash followed by >>> git merge followed by git stash pop? > >> It does, the same way that bzr or Mercurial does.[1] I don't see why >> you would think otherwise. > > Partly due to the following bug report which is near the start of the > git-merge man page: "Warning: Running git merge with non-trivial > uncommitted changes is discouraged: while possible, it may leave you > in a state that is hard to back out of in the case of a conflict.". > I can't imagine why the git maintainers don't fix this. > > With git pull, if there are changes in the working directory, the > merge (i.e. merge from remote/master into master) part of the > operation is aborted before it starts, giving a message describing its > refusal. It does this even when there are no conflicts to deal with. What are we supposed to do in that case, if we're not yet ready to commit our files? Something like: --8<---------------cut here---------------start------------->8--- git stash git pull git stash apply --8<---------------cut here---------------end--------------->8--- or putting our work into a new branch, like: --8<---------------cut here---------------start------------->8--- git checkout -b new-branch-name git commit -a -m "Edited" git checkout master git pull ... --8<---------------cut here---------------end--------------->8--- Are there other (more elegant, or more clever) ways to deal with that situation (fetching something someone has fixed without committing we're not yet ready to commit and push on master)? Best regards, Seb -- Sebastien Vauban