From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 018D61F619 for ; Wed, 11 Mar 2020 20:04:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731119AbgCKUEY (ORCPT ); Wed, 11 Mar 2020 16:04:24 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:53292 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730960AbgCKUEX (ORCPT ); Wed, 11 Mar 2020 16:04:23 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id DB208BD594; Wed, 11 Mar 2020 16:04:18 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=uDpJEL/sh7LEn5XE4waDp9Tbkr8=; b=aitAbb 9ud72/2vp73ZOFTG0IAjrqMrgr2yi8rTet13XDDG0DDVRppPX1AaB0qywAaUG09u 60PFqHVlSqqv2wBtkSCMZyfdB/IHI93+92Ymjr71RfKLLHLfQZMEsi4j2C6HU6Nb O56DQZ9RDFr2M+EQ3EEcrqrjHnFr8XHSWoytM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=Jp1doOOT17Vc6s725twjfdjFuNbn0/6E sLl8dwIz5rOO291t62v031R3uN4o0Ld162TyUfayWC8DeE0Wf0oq6lUfb+JJs6hu JCzsF91t3+OLjkVJLHJfTZEQFSTZPqexJ96XtSycQg8vA7GQ7+dV/hsYqqsMOH57 ywxLjYSSfI4= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id D19E9BD593; Wed, 11 Mar 2020 16:04:18 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 27DE5BD592; Wed, 11 Mar 2020 16:04:16 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Christos Pappas Cc: Martin Fick , git@vger.kernel.org, annulen@yandex.ru Subject: Re: [Feature request] Give non-unique names to commits for grouping References: <2001043.V3P9HlvaID@mfick-lnx> Date: Wed, 11 Mar 2020 13:04:14 -0700 In-Reply-To: (Christos Pappas's message of "Wed, 11 Mar 2020 20:56:44 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7C3C0A06-63D3-11EA-A816-B0405B776F7B-77302942!pb-smtp20.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Christos Pappas writes: > Thank you for your answers. > > From what I can deduce, both of your suggestions require that the > commit messages(or notes) must have some special text for which we can > search for, which is hacky and would be different on every repository. > > What I am suggesting is something like, labels on GitHub, hashtags on > Social-Media, or Tags in News sites. It's a well known concept so it > will be easy to understand and use. By "hashtags", do you mean #hashtags, i.e. you must add some special text for which you can search for? That does sound just as hacky as any other embedded text in the messages of commit objects. One large downside of embedding text (or #hashtags) in the message of a commit object is that you need to plan ahead and know what group the commit belongs to before you make it, but in general, it is unreasonable to expect perfect foresight. Often you do not know what group the commit belongs to (e.g. you may want to label the set of commits that broke the latest release for feature 'frotz' with hashtag "#broke-frotz", but most likely you didn't know you were breaking the feature when you were creating these commits). Adding these offending commit objects some comments in the form of notes objects can be done retroactively, and as long as the set of "tag-worthy" commits is minority among all commits, grepping for "#hashtag" in the notes to find the notes that contain the tags you wanted should be cheaper than "git log --grep" which must read all the commits in the history. Another way may be "git notes --ref broke-frotz add X -m . X" (and similarly for Y and Z that also belong to "#broke-frotz" set of commits) to mark them with an almost empty note in refs/notes/broke-frotz hierarchy. Then "git notes --ref broke-frotz list" should be able to list these commits that have any notes in refs/notes/broke-frotz and there is no need for grepping. Of course you can make it richer by describing why each of X, Y, and Z are in the "broke-frotz" set when you give the notes text to them.