From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.1621.1579249483894237174 for ; Fri, 17 Jan 2020 00:24:44 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=erqW0ZzR; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579249482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c1LvRt/BRQ9F/AsrH5VC0CP5rkQBE4EstPAjwDqiHaY=; b=erqW0ZzRnO9GDypsSwu4J0L62/mbbjWYtRvPk6syMV0KyUnVpRE3wffP045mCR8daoIwZq enH3QbxURq247Or+FE7fOEThJKuxLCmEz9z9oKMGr2kv6JKhni3EwhkQpyVVRHZclz7+Cs 8yi9Ljm5ATxo4EZRwiTpG8wzhFNr7zg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-_RCktAQhOCaWTfTcomQKHQ-1; Fri, 17 Jan 2020 03:24:39 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0380800D41; Fri, 17 Jan 2020 08:24:37 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-211.ams2.redhat.com [10.36.116.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5E2B19C5B; Fri, 17 Jan 2020 08:24:36 +0000 (UTC) Subject: Re: [PATCH] BaseTools/Conf/gitattributes: fix "--function-context" for *.h and *.c To: "Gao, Liming" , Leif Lindholm Cc: "devel@edk2.groups.io" , "Feng, Bob C" References: <20200116184929.18020-1-lersek@redhat.com> <20200116215459.GG20629@bivouac.eciton.net> <428016653b214ab699ec2d6b4ecf2fc9@intel.com> From: "Laszlo Ersek" Message-ID: Date: Fri, 17 Jan 2020 09:24:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <428016653b214ab699ec2d6b4ecf2fc9@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: _RCktAQhOCaWTfTcomQKHQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit On 01/17/20 01:22, Gao, Liming wrote: > Leif: > Vfr is not C style source file. It can't be regarded as C source > file. > > Laszlo: > Is there such support for the assembly file, such as .nasm? According to the gitattributes(5) manual, there doesn't seem to be a git-diff driver for assembly files. However, the default (language-independent) driver seems to handle it reasonably well. Consider commit f4c898f2b2db ("UefiCpuPkg/CpuExceptionHandlerLib: Fix split lock", 2019-09-20). $ git show f4c898f2b2db this displays just the changes, with 3 lines of context, but it already correctly displays the "HasErrorCode" label in the hunk header: @@ -184,17 +184,19 @@ HasErrorCode: Now, if I add "-W": $ git show -W f4c898f2b2db then the full text is displayed between "HasErrorCode" and "ErrorCode". (You can see the entire file with: $ git show f4c898f2b2db:UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm ) Thanks Laszlo