From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: git commit/push and VC Date: Thu, 20 Nov 2014 10:29:30 +0700 Message-ID: References: <871toysqyq.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1416454200 24605 80.91.229.3 (20 Nov 2014 03:30:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 03:30:00 +0000 (UTC) Cc: Emacs developers To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 20 04:29:52 2014 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 1XrIRL-0006ZD-IS for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 04:29:51 +0100 Original-Received: from localhost ([::1]:33362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrIRL-0001VA-5a for ged-emacs-devel@m.gmane.org; Wed, 19 Nov 2014 22:29:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrIR6-0001Us-8r for emacs-devel@gnu.org; Wed, 19 Nov 2014 22:29:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrIR1-0005hj-At for emacs-devel@gnu.org; Wed, 19 Nov 2014 22:29:36 -0500 Original-Received: from mail-ie0-x233.google.com ([2607:f8b0:4001:c03::233]:47673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrIR1-0005h0-6Y for emacs-devel@gnu.org; Wed, 19 Nov 2014 22:29:31 -0500 Original-Received: by mail-ie0-f179.google.com with SMTP id rp18so1915029iec.24 for ; Wed, 19 Nov 2014 19:29:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Job2KrFEyDPj6ik2s2SjsOnGZeuoCw0281kqN6qPZvA=; b=UhH/ocMJBrKTuc8HcRpvpZP+B4xf+HqEeodARaVwlp25Z6HTrFTr+n8ws21WqhSojz Wd8D6DzroJ+dAyLWxRv39f7LtkMgmOozea2wjMK5j8G5QofippX1c4CVyQRcb7VAXBzj Q+EShVcP7mnQ7ttNBqaNwmkRyTKmwmyBNDDVhoN45YVDaPwj4UgWGvuPQaaQKYKplHhG 1ygIw1Qv98nqpSIsOiQtqHCLGBfqQ833M7shqpa2F1fieNGDBOgMe3UKAEKvg/xOEsa/ AqZFF3ZGMDABmglUckKIAMP4tjywwBroZVB6hQjXsls6UlcVexyY0uNvQiaza2y11Qxo 5WVw== X-Received: by 10.42.14.3 with SMTP id f3mr5767151ica.25.1416454170758; Wed, 19 Nov 2014 19:29:30 -0800 (PST) Original-Received: by 10.107.48.3 with HTTP; Wed, 19 Nov 2014 19:29:30 -0800 (PST) In-Reply-To: <871toysqyq.fsf@rosalinde.fritz.box> X-Google-Sender-Auth: GytU4f9Cxl0ILHKej3MvsYWwalI X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::233 X-BeenThere: emacs-devel@gnu.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@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177846 Archived-At: On Thu, Nov 20, 2014 at 5:36 AM, Stephen Berman wr= ote: > GitForEmacsDevs says this: > > If you are a committer, you can merge to the upstream master directly. > > First, update your repository: > > cd $DEVHOME/emacs > git checkout master > git pull > git merge TASKNAME > git push > > Run the tests: > > make check > > and then commit > > git status > git commit -m "fixes debbugs:12345" > > which merges all your new commits to the upstream master. > > I don't understand why `git commit' follows `git push' here (or why > there isn't another `git push' after `git commit'). Indeed, the instruction quoted above is strange. Strangeness 1: It assumes that your local master branch has not diverged from remote master, so =E2=80=9Cgit pull=E2=80=9D is a fast-forwar= d. (If this assumption is incorrect, =E2=80=9Cgit pull=E2=80=9D will optionally require= you to resolve merge conflicts, and will introduce a superfluous merge commit.) There are two cases how your local master can diverge from remote master: a. You have some local development going on in local master, unrelated to TASKNAME. (In a feature-branch-oriented workflow, it should not happen.) b. Someone has rewritten the remote history. (By the talks about the receive.denyNonFastForwards setting on the Emacs central repository earlier on this list, it looks like the maintainers have decided to disallow such rewriting.) Strangeness 2: It suggests to push before running tests. Presumably, tests exist so that you can check that your work has not broken anything before sharing it with the world. In that case, you want to run them before pushing. Strangeness 3: It tells you to commit after you have just merged and pushed= . Assuming =E2=80=9Cmake check=E2=80=9D does not have any effect on the track= ed files, there are no changes that could be committed at this point. The -m "fixes debbugs:12345" is supposed to go into the commit message, but there won=E2=80=99t be any commit. Presumably, this line shoul= d go into the message of the merge commit made by =E2=80=9Cgit merge TASKNAME= =E2=80=9D. If that merge generates conflicts, you can edit the merge commit message when committing the merge after having resolved the conflicts. However, if no conflicts arise, =E2=80=9Cgit merge=E2=80=9D will commit the= merge automatically. To add to the merge commit message, you can either run git merge with the --no-commit flag and commit manually afterwards, or, immediately after git merge finishes, you can run git commit --amend.