From patchwork Tue May 12 23:42:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emily Shaffer X-Patchwork-Id: 11544291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6609292A for ; Tue, 12 May 2020 23:42:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F7FF20753 for ; Tue, 12 May 2020 23:42:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CWKvSN0D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728319AbgELXmW (ORCPT ); Tue, 12 May 2020 19:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbgELXmW (ORCPT ); Tue, 12 May 2020 19:42:22 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0822DC061A0C for ; Tue, 12 May 2020 16:42:22 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id x13so17485659ybg.23 for ; Tue, 12 May 2020 16:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=amTwaTOpTyHbQRAldbpDQXBXDS62NhGbqqg3aydumvo=; b=CWKvSN0D4myLFlvhzFd5/MQGoKP6SF53nh8JG8/MhM61tu/8SLVnO8MO7nz75EUsrG JpuhslYAX3pu8yVZod3ioP7HI1T0IZeae7or5iewqBBGtKqnUQwgDXqz/HZHUOiidwN6 TMKyQPhd9z8Gv/KRVs+Pva+yCCei5qBJLHqaA+sMz+tTcF/rZuSrKtX0PyHQLduPYALR O+Mq5w5nbQI/5Q2zoR5d+XuANwPXJML5ui++J+fCk3LQf/96r1HELwM7JZRs4b4rvB2O X/JnJl+B3yUXhNBrOFVNFUL6Fy7wEOQB2v6BNnffvGileiEGXWfwdNSHMLR9wuag/8Ql IFzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=amTwaTOpTyHbQRAldbpDQXBXDS62NhGbqqg3aydumvo=; b=VLSurtiX75DCmldNdQgT5XNHuQ7D/8bsEDcxgedH7jNz/ucb5FuTbhSqdqf0dg2xjs Ff4QASLGrJLXicYkEbt+ZYSEM/PaKAfdsVTDg0pORMUU3ktTrsRp6uQWaIXRmSGnrnQ1 9xyY+qOmwXblPSO0osfkvoDOG4rLiTQP9+xORpEgkqJ6JvuHonv2S5H9AAg/h5zjQRH3 NHvi7Rsf7B/5IW81iKwCn9VFRTpRClPDiSQ0SFeyotWeSHxCCeaGDALMx2j2XpFUJ4Xg eiHup0qDkdy7Dv0qplOMz45Kv7L9EAmcaXVbYBZWzpeusWiBgnROUPe9MafSSf/QVATX yt1Q== X-Gm-Message-State: AOAM5306d+boR53COoyjDdUlXM42SHfaEgIS4Mw/Tgh+97cMPTLNcimT VEzPSCq627M6xSoiAB2yglKS3J6eijErEWhCSGTdrcBMUHXzuK9sYrrh7oYOtlP8NSqQwVDAk7w 3Wt17n+Efxp9SGrc6bu0ui3tfeVF0cGaKyV39ZEdgO8mwcswQgSGVvSoHj6f5n7rIzXvFZCQGzg == X-Google-Smtp-Source: ABdhPJyO38V59yzFHkH2GHdNtmME1/wJ2AmK0a3XIXtQXiaMcZBAvulNMjrUnpbiY+5dkeszgrMloFeab4AqmxvRuyA= X-Received: by 2002:a25:a184:: with SMTP id a4mr7051429ybi.255.1589326940443; Tue, 12 May 2020 16:42:20 -0700 (PDT) Date: Tue, 12 May 2020 16:42:12 -0700 In-Reply-To: <20200512234213.63651-1-emilyshaffer@google.com> Message-Id: <20200512234213.63651-2-emilyshaffer@google.com> Mime-Version: 1.0 References: <20200512234213.63651-1-emilyshaffer@google.com> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog Subject: [PATCH 1/2] help: add shell-path to --build-options From: Emily Shaffer To: git@vger.kernel.org Cc: Emily Shaffer Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It may be useful to know which shell Git was built to try to point to, in the event that shell-based Git commands are failing. $SHELL_PATH is set during the build and used to launch the manpage viewer, as well as by git-compat-util.h, and it's used during tests. 'git version --build-options' is encouraged for use in bug reports, so it makes sense to include this information there. Signed-off-by: Emily Shaffer --- help.c | 1 + 1 file changed, 1 insertion(+) diff --git a/help.c b/help.c index 1de9c0d589..44cee69c11 100644 --- a/help.c +++ b/help.c @@ -641,6 +641,7 @@ void get_version_info(struct strbuf *buf, int show_build_options) strbuf_addstr(buf, "no commit associated with this build\n"); strbuf_addf(buf, "sizeof-long: %d\n", (int)sizeof(long)); strbuf_addf(buf, "sizeof-size_t: %d\n", (int)sizeof(size_t)); + strbuf_addf(buf, "shell-path: %s\n", SHELL_PATH); /* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */ } } From patchwork Tue May 12 23:42:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emily Shaffer X-Patchwork-Id: 11544293 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8834390 for ; Tue, 12 May 2020 23:42:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 717F220769 for ; Tue, 12 May 2020 23:42:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Xvcx8eLx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731322AbgELXmY (ORCPT ); Tue, 12 May 2020 19:42:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbgELXmX (ORCPT ); Tue, 12 May 2020 19:42:23 -0400 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 415F6C061A0C for ; Tue, 12 May 2020 16:42:23 -0700 (PDT) Received: by mail-qt1-x84a.google.com with SMTP id s65so8892299qtd.21 for ; Tue, 12 May 2020 16:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=MLov0GeZJkeHqrQGwYSe4mhCoGLxFC2V9Yn2um9qXu8=; b=Xvcx8eLx3jML2FoezI4T2EvioeCyIBtLFrHS7CIOOclfTxqgn0xB5wW+q0cu1dfepO mkZbmC/raMaLKifYBMFd4Ln8pvuC1pgpywuN8dbNqnsflit4XRw9dMSebzpRxQBpyQNc 47B3XiMdh4bwWXR6cLJc/C2qxpWHRbaqOWn6X5L/tMX5Mb0viOVOMW6Bc12wPVnbFV7v waGkh174Kwsyy2W0qCYazxNHh6dxakmfmjWlTHfTbSZH6G/gbM0aYwlzxMU/HSLF7yKA G9I9EKRNIhAIcWtzBVY4TAUXIyQb6t9mx+nWWFmX9lVIlGXSNxDhPp/IH73IUw8LapCw WXEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=MLov0GeZJkeHqrQGwYSe4mhCoGLxFC2V9Yn2um9qXu8=; b=CXrDAqbdBQBmNaCLugHyu/+GkOvfSK4FLsIuDgewbIhu+FQlgGmuAHHXuCcl0nlWGr DZKQreeY8Fg5uLGj3p25dxgZZPNaSeFDFPO3fOimZHEaEMud7mBPbt0ELqn499/AIHkY pEvdeZsQ6g7ydAHAQXWVIyiMbiXQlNWWUEZS1yYcWxPMiHVn3MrWpbsEaFgSU0hrp7Ez e6753G0bRUpYVy8tzfXcZa2f97RAAlK0tNO1ik4gr7eZUWyjlwmcOSO7XS0G+tqoABjp Q7Kv5PqUQFooNy6PwjQquAGLI1PcXTS/prxJcHFXKl79SKnFEkspl3ndgY6RpBEz45He jnYw== X-Gm-Message-State: AGi0PuYEQ4kXTZb7eD1Lj021DdmHf6OiyxfRzfQj36ilKKWxx25pgj6L qEOHHNFQ4tu10c+nVaMTgi5R1sAPqWvEg/IZhFJboRwIgyPHYZvRUrvB4doD721D/yqaDAd0Ne3 BYph5mAU7/W/CbgWNcbrVQ+tYfDq5tfIfHbw9YbVpv1EGg9TO1T/64BZ4RkzZoheBjlD+pCepvQ == X-Google-Smtp-Source: APiQypJXDTEApOH8NTMdwj8xJK0FHnGUr0iM8bMw3WLnznVwITH00IMAuV/9cM2M1guSPJLCEmLr634XPPf/W7pVrGk= X-Received: by 2002:ad4:5604:: with SMTP id ca4mr23200039qvb.6.1589326942361; Tue, 12 May 2020 16:42:22 -0700 (PDT) Date: Tue, 12 May 2020 16:42:13 -0700 In-Reply-To: <20200512234213.63651-1-emilyshaffer@google.com> Message-Id: <20200512234213.63651-3-emilyshaffer@google.com> Mime-Version: 1.0 References: <20200512234213.63651-1-emilyshaffer@google.com> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog Subject: [PATCH 2/2] bugreport: include user interactive shell From: Emily Shaffer To: git@vger.kernel.org Cc: Emily Shaffer Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It's possible a user may complain about the way that Git interacts with their interactive shell, e.g. autocompletion or shell prompt. In that case, it's useful for us to know which shell they're using interactively. Signed-off-by: Emily Shaffer --- Documentation/git-bugreport.txt | 1 + bugreport.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Documentation/git-bugreport.txt b/Documentation/git-bugreport.txt index 7fe9aef34e..4afc48c452 100644 --- a/Documentation/git-bugreport.txt +++ b/Documentation/git-bugreport.txt @@ -29,6 +29,7 @@ The following information is captured automatically: - uname sysname, release, version, and machine strings - Compiler-specific info string - A list of enabled hooks + - $SHELL This tool is invoked via the typical Git setup process, which means that in some cases, it might not be able to launch - for example, if a relevant config file diff --git a/bugreport.c b/bugreport.c index aa8a489c35..28f4568b01 100644 --- a/bugreport.c +++ b/bugreport.c @@ -9,6 +9,7 @@ static void get_system_info(struct strbuf *sys_info) { struct utsname uname_info; + char *shell = NULL; /* get git version from native cmd */ strbuf_addstr(sys_info, _("git version:\n")); @@ -29,8 +30,13 @@ static void get_system_info(struct strbuf *sys_info) strbuf_addstr(sys_info, _("compiler info: ")); get_compiler_info(sys_info); + strbuf_addstr(sys_info, _("libc info: ")); get_libc_info(sys_info); + + shell = getenv("SHELL"); + strbuf_addf(sys_info, "$SHELL (typically, interactive shell): %s\n", + shell ? shell : ""); } static void get_populated_hooks(struct strbuf *hook_info, int nongit)