From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 205FBC04A6A for ; Thu, 3 Aug 2023 02:55:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233757AbjHCCzU (ORCPT ); Wed, 2 Aug 2023 22:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233745AbjHCCzR (ORCPT ); Wed, 2 Aug 2023 22:55:17 -0400 Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01olkn2143.outbound.protection.outlook.com [40.92.62.143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3C0D19A4 for ; Wed, 2 Aug 2023 19:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jNtqh4C987sCYLLd94oHXvcijw6zP6t2qCzQ7hRhxC/QHj7U93WZQpYDtGztBolaixsV2Exwo/2Y03ZNoFaEFVnSZGKg+uyEB1xrNWeP1TaCnJet8GMEVHmJT1ipAhcfQ2F2dFc/dG7IW4bVOvlbPXvk9qB2a0OD9OhnP1sHQvMxn3DmW/7JtcV82h0cbJCo5gXRhe0CZ37p+wj6tTTWE/QxHtziwhtMtnQx1OtFALhGka8gsizGHwv1Is/sGawUBLMk7anykmNzldW2iCLntM61qeHyf1x0L8TdCVvmGEwPasJHAB9Gt2LzMgrT8EWD5wYpI4ebvmkRrjGCZKYEkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ExPCcCvfVMx3zXpNpedJDoTFnmy8l9J4XnDZ/2xVLH8=; b=aItFVmrhSb8ifL6iy+EXouIJy91ZmEYenmaMftUjcxArkZgVzxJu46xBPQlnbedESPAVAXPOXM8okKmBPkWiSceJsF2ag1UNTbpb5R2GpRFqC/ccAK/B6pR21s0V+nm9MkN+hjeD0ew5O1J2y5ZHRBlCVp0pEYpysCbNwhz0JfusexTW961wm6+KNARsQM86uKz2mxJarmy+0cHCPDvdYvNf3heX9YqMz9oJS/miT7kGJX7hj+IkbskaHhz2Eti8vVBaAu8GPdZ5J4j+CW71kbl+XBQHICgYW+9voeLpVder4pcQbzLassCKcfeC3muGvEyvaPYCyHKOGFNWWAUaCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ExPCcCvfVMx3zXpNpedJDoTFnmy8l9J4XnDZ/2xVLH8=; b=XyTeQfCcwilOE6b7h90WeXkY44Edi06NoOnUWz7XhX98AXRm/MrAGtskq90xhCtNbGOEZ2mBz1ovP5CVAACw3k2UwxZ4sZjjl44y62cxJW+J3qOimur4qk6KCuehBX5ShfwiD04Vy8qR2lFo1ASh8caGitX9itTwWG/L9sAoukeEzTmA7QtIgbqLOfMd+h9ckdV1ksCDnlQcc2sEG39KhAm4VSKOwJKZ8fVF4LOK9OnS7h9VOhQ5XQZ2afgFCIKcQSRYi+Jtz8/JS5BlmlBjR0deZKTJiNEszxwW0XweioovzBLRGRwCgcsK90BphWydm3nnIIOFnTCCoabY3GfgZg== Received: from MEYP282MB2280.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:f8::14) by SYZP282MB3189.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:176::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47; Thu, 3 Aug 2023 02:55:11 +0000 Received: from MEYP282MB2280.AUSP282.PROD.OUTLOOK.COM ([fe80::980f:f4b7:e0bb:4b56]) by MEYP282MB2280.AUSP282.PROD.OUTLOOK.COM ([fe80::980f:f4b7:e0bb:4b56%3]) with mapi id 15.20.6631.046; Thu, 3 Aug 2023 02:55:11 +0000 Content-Type: text/plain; charset=utf-8 Subject: Re: Feature request for shorter relative date format in log From: Yucheng Zhou In-Reply-To: Date: Thu, 3 Aug 2023 10:54:47 +0800 Cc: Taylor Blau , git@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Junio C Hamano X-Mailer: Apple Mail (2.3731.600.7) X-TMN: [KHO1fQg8o8ZHo4ts2TAXOKnmzRatusaq] X-ClientProxiedBy: SN6PR01CA0022.prod.exchangelabs.com (2603:10b6:805:b6::35) To MEYP282MB2280.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:f8::14) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MEYP282MB2280:EE_|SYZP282MB3189:EE_ X-MS-Office365-Filtering-Correlation-Id: d931f03d-9937-4183-1fc0-08db93cd0dc6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RvzhZvqkU5qIDuxOH092nVye3RyoAs1l3/Hpcnfq7p7oLCJ6dppkIlBplyqCuNr7rScBueeCUwM9IB8JglqaHdGp6RIepE4trzoODr0AD5GRC8pM37sm49jlChKp3wtwzLxZQ3pKH5HkTTnAbxqunUviJo6Hjkz8elENduoM4hRMML+Ipq3aDVG8zbV9sqBJTK15R7ICtlT6hZOEghZRx0HNqYreWNV00T37O0T9jsCqfTaoYXMkKAIkQRiL5DtVBzsN2CNf4PORs3Jm8oQjBFKmVcFxOqdBROpp0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mJXUkhD?= =?utf-8?B?N2dtNisvNCtUNDZ5dzZVSVdnaGNVM1RBWmIvandUc1Y2QndYenVaYmcxdEFJ?= =?utf-8?B?em9Ga0V0dm5QM0wvMlJVakdlNy9uaHJFY1RTRDRvQnN0c0xOcnlSS29uRFBW?= =?utf-8?Q?OXaILAREcQJo+5JbZo+TVQX2Ia+iQHIgh6S3TAO0Q080=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d931f03d-9937-4183-1fc0-08db93cd0dc6 X-MS-Exchange-CrossTenant-AuthSource: MEYP282MB2280.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2023 02:55:11.4401 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SYZP282MB3189 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Thank you for your reply! Actually, I think there is no need to allow users to config the switching o= f granularity. The current relative format has already done a great job. What I want is, a handy way to show a shorter relative date (like the =E2= =80=9C--short=E2=80=9D flag in git status). And the current switching of gr= anularity should be reused. The only thing need to be changed, is the vocabulary for representation. Fo= r example, the =E2=80=9C2 minutes ago=E2=80=9D can be represented in =E2=80= =9C2m=E2=80=9D, and =E2=80=9C10 days ago=E2=80=9D to =E2=80=9C10d=E2=80=9D.= =20 If both the past and future timestamps should be taken into account, we can= use a prefix =E2=80=9C-=E2=80=9D and =E2=80=9C+=E2=80=9D to distinguish t= hem. But I think we hardly see a future timestamp in the git log output, so= we can let the past timestamps un-prefixed and only prefix the future ones= with a =E2=80=9C+=E2=80=9D, maybe. The rationale of this feature is saving space in the output, to let more us= eful information be shown in one line. For instance, many skilled git users use customized one-line formats in git= log, such as =E2=80=9C =E2=80=9D. Where = the can be shortened as much as possible to save space for other imp= ortant things (especially using with --graph or --decorate). Therefore, a s= horter relative date representation of no more than about 3 characters can = be a great idea. To achieve this, a new format like =E2=80=9Crelative-short=E2=80=9D can be = introduced. There is no need to let users config so many things. Since ther= e already exists =E2=80=9C--date=3Dshort=E2=80=9D for short absolute date f= ormat and =E2=80=9C--date=3Ddefault-local=E2=80=9D which consists of two wo= rds, I think a new option =E2=80=9C--date=3Drelative-short=E2=80=9D with a = well-designed shorter representation will be very handy and great.