From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123988 invoked by alias); 11 Dec 2019 01:33:19 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 123980 invoked by uid 89); 11 Dec 2019 01:33:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:pQmwkJ5, H*f:sk:pQmwkJ5, H*MI:sk:pQmwkJ5 X-HELO: mail-vk1-f180.google.com Received: from mail-vk1-f180.google.com (HELO mail-vk1-f180.google.com) (209.85.221.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Dec 2019 01:33:17 +0000 Received: by mail-vk1-f180.google.com with SMTP id u6so6299715vkn.13 for ; Tue, 10 Dec 2019 17:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kmpn4I5Wk69jadiZrytplPwozIK0WF/6W57BYu8idM4=; b=evDBBiLul3eUC5TaH5WlTnkAd/bibIER6+dJsTyskzK7WJ1Ai0Zoa3+7oYYs+yHOaM j0s9m4HYtPLikN2XWrHCXhpVxzVHZRZpzF3IRBDSyBv2vFYKNT1b7zqXl/jTWoOzUsQ8 wvqiUpiLmAfH0cSdJewRBg6QXfsramGWEWCAwDyBzQZrYneNnV0/ihYKFmIvILCmeSaX O4zlk4ABe4HP+m3IIcLj4fCyoRvWaAvDWMlNg1RU5HIUQJjl0Ij9lc2jRj5r6BFbzwuP menUjgXhSNGBtdWobcQqJ8rpGVUTAsfzNZfwanM7lCt9BO84iElZovbnlvl8ip/FZEqW EoSQ== Return-Path: Received: from [192.168.15.21] ([189.111.86.232]) by smtp.gmail.com with ESMTPSA id m80sm472379vka.26.2019.12.10.17.33.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2019 17:33:14 -0800 (PST) Subject: Re: Renaming .c files to .cc? To: Christian Biesinger Cc: gdb@sourceware.org, Pedro Alves References: <1ae59e3e-9685-b9fa-49b5-71b29d709604@linaro.org> From: Luis Machado Message-ID: Date: Wed, 11 Dec 2019 01:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00004.txt.bz2 On 12/10/19 10:26 PM, Christian Biesinger wrote: > On Tue, Dec 10, 2019 at 7:41 PM Luis Machado wrote: >> >> On 12/10/19 7:18 PM, Christian Biesinger via gdb wrote: >>> Hello all, >>> >>> I was wondering what people's thoughts are on renaming the .c files to >>> .cc, since they are in fact C++ code? (Only for files under gdb/) >> >> I don't have strong objections to this other than it may make things >> slightly more tedious to 'git blame' some files, as Tromey pointed out. > > Can you elaborate on that? git blame seems to work as expected for this, e.g.: I had not given this a try and was assuming it would just reset all the lines to the commit that renamed the file. Looks like it is smart enough to keep the change ids in there (checked now). So this is a non-issue for me. > $ git blame gdbsupport/gdb_string_view.h > 7adcdf08e792 gdb/common/gdb_string_view.h (Simon Marchi > 2018-04-09 13:31:04 -0400 1) // Components for manipulating > non-owning sequences of characters -*- C++ -*- > 7adcdf08e792 gdb/common/gdb_string_view.h (Simon Marchi > 2018-04-09 13:31:04 -0400 2) > 1a5c25988eab gdb/common/gdb_string_view.h (Tom Tromey > 2019-01-27 12:51:36 -0700 3) > 1a5c25988eab gdb/common/gdb_string_view.h (Tom Tromey > 2019-01-27 12:51:36 -0700 4) #ifndef COMMON_GDB_STRING_VIEW_H > 1a5c25988eab gdb/common/gdb_string_view.h (Tom Tromey > 2019-01-27 12:51:36 -0700 5) #define COMMON_GDB_STRING_VIEW_H > ... > 700545387df8 gdb/gdbsupport/gdb_string_view.h (Christian Biesinger > 2019-10-01 13:36:07 -0500 49) #include "gdb_assert.h" > > And git log has the --follow option for this purpose. > That's good to know. >> But i think that is excusable compared to better organization of source >> files, for what they really are (C++ files). >> >>> >>> Advantages: >>> - Easier for newcomers to see that the code is, in fact, C++ >>> - Editors will syntax highlight C++ keywords w/o having to be told >>> that these files are C++ >> >> The above items sound like reasonable pluses. >> >>> >>> On IRC it was mentioned that git may have issues with renames like >>> that but I have found that "git log --follow" and such are doing a >>> good job with that, at least as long as the same commit doesn't change >>> the file too much while it is renamed, which I wouldn't expect to be a >>> problem here. >>> >>> Thoughts? >>> Christian >>>