From patchwork Sun Jul 28 15:17:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratyush Yadav X-Patchwork-Id: 11062979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 973DB1398 for ; Sun, 28 Jul 2019 15:18:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C95D287B6 for ; Sun, 28 Jul 2019 15:18:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C14628893; Sun, 28 Jul 2019 15:18:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4E78287B6 for ; Sun, 28 Jul 2019 15:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726087AbfG1PRg (ORCPT ); Sun, 28 Jul 2019 11:17:36 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:54509 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbfG1PRf (ORCPT ); Sun, 28 Jul 2019 11:17:35 -0400 Received: from localhost.localdomain (unknown [1.186.12.13]) (Authenticated sender: me@yadavpratyush.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 2F146100005; Sun, 28 Jul 2019 15:17:32 +0000 (UTC) From: Pratyush Yadav To: git , Christian Couder , Johannes Schindelin Cc: Pratyush Yadav Subject: [PATCH] git-gui: Perform rescan on window focus-in Date: Sun, 28 Jul 2019 20:47:26 +0530 Message-Id: <20190728151726.9188-1-me@yadavpratyush.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If any changes are made to the tree while git-gui is open, the user has to manually rescan to see those changes in the gui. With this change, a rescan will be performed whenever the window comes in focus, removing the need for manual rescans in most cases. A manual rescan will still be needed when something makes changes to the tree while git-gui is still in focus. Signed-off-by: Pratyush Yadav --- git-gui/git-gui.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index 6de74ce639..8ca2033dc8 100755 --- a/git-gui/git-gui.sh +++ b/git-gui/git-gui.sh @@ -3849,6 +3849,7 @@ if {[is_enabled transport]} { } bind . ui_do_rescan +bind . do_rescan bind . <$M1B-Key-r> ui_do_rescan bind . <$M1B-Key-R> ui_do_rescan bind . <$M1B-Key-s> do_signoff