From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: comparing code on different branches Date: Tue, 04 Jul 2017 12:51:46 -0500 Message-ID: <86shichyz1.fsf@stephe-leake.org> References: <9A9EF0AB-8FD3-44C9-AAE8-ACACDEC69059@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499190737 4185 195.159.176.226 (4 Jul 2017 17:52:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Jul 2017 17:52:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 04 19:52:11 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSRzW-0000P0-8Y for ged-emacs-devel@m.gmane.org; Tue, 04 Jul 2017 19:52:02 +0200 Original-Received: from localhost ([::1]:42448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSRzb-0000oa-Nt for ged-emacs-devel@m.gmane.org; Tue, 04 Jul 2017 13:52:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSRzT-0000nd-2N for emacs-devel@gnu.org; Tue, 04 Jul 2017 13:52:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSRzQ-0003av-0V for emacs-devel@gnu.org; Tue, 04 Jul 2017 13:51:59 -0400 Original-Received: from smtp81.ord1d.emailsrvr.com ([184.106.54.81]:45741) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSRzP-0003Us-Rl for emacs-devel@gnu.org; Tue, 04 Jul 2017 13:51:55 -0400 Original-Received: from smtp3.relay.ord1d.emailsrvr.com (localhost [127.0.0.1]) by smtp3.relay.ord1d.emailsrvr.com (SMTP Server) with ESMTP id 653CB60072 for ; Tue, 4 Jul 2017 13:51:49 -0400 (EDT) X-Auth-ID: board-president@tomahawk-creek-hoa.com Original-Received: by smtp3.relay.ord1d.emailsrvr.com (Authenticated sender: board-president-AT-tomahawk-creek-hoa.com) with ESMTPSA id 288976006E for ; Tue, 4 Jul 2017 13:51:49 -0400 (EDT) X-Sender-Id: board-president@tomahawk-creek-hoa.com Original-Received: from Takver4 (76-218-37-33.lightspeed.kscymo.sbcglobal.net [76.218.37.33]) (using TLSv1.2 with cipher AES128-GCM-SHA256) by 0.0.0.0:25 (trex/5.7.12); Tue, 04 Jul 2017 13:51:49 -0400 In-Reply-To: <9A9EF0AB-8FD3-44C9-AAE8-ACACDEC69059@gmail.com> (Jean-Christophe Helary's message of "Tue, 4 Jul 2017 09:53:17 +0900") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 184.106.54.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216168 Archived-At: Jean-Christophe Helary writes: > Sorry, it is more a git question than an emacs question: > > I have created a branch where I do my work. > > Now, when I test my code modifications, I do eval-buffer etc. But what > if I also want to test what master does to compare the results? > > Do I have to go through a stash/checkout/test/checkout stash apply cycle? > > I thought I could actually do my modifications in the scratch buffer > and keep the original file clean, so that I can always compare, but > that seems a bit convoluted. Any better idea? Workspaces are cheap; I keep a full checkout of master, and one of each branch I'm working on, at all times. You can use 'git worktree' to minimize fetch and push operations to the central repository. -- -- Stephe