From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751576AbbCKMEs (ORCPT ); Wed, 11 Mar 2015 08:04:48 -0400 Received: from cpsmtpb-ews10.kpnxchange.com ([213.75.39.15]:62138 "EHLO cpsmtpb-ews10.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbbCKMEr (ORCPT ); Wed, 11 Mar 2015 08:04:47 -0400 Message-ID: <1426075485.4244.112.camel@x220> Subject: Re: [PATCH] checkkconfigsymbols.py: make it Git aware From: Paul Bolle To: Valentin Rothberg Cc: gregkh@linuxfoundation.org, stefan.hengelein@fau.de, linux-kernel@vger.kernel.org, rupran@einserver.de Date: Wed, 11 Mar 2015 13:04:45 +0100 In-Reply-To: <1426072565-22296-1-git-send-email-valentinrothberg@gmail.com> References: <1426072565-22296-1-git-send-email-valentinrothberg@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Mar 2015 12:04:45.0629 (UTC) FILETIME=[90AEA6D0:01D05BF3] X-RcptDomain: vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-03-11 at 12:16 +0100, Valentin Rothberg wrote: > Note that both options require to 'git reset --hard' the user's Git > tree, which can lead to the loss of uncommitted data. My local "800 line perl monster" basically does git ls-tree -r $commit_or_tag which allows you to generate a list of files and their corresponding hashes (it also helps with filtering out symlinks by the way). The you can do git cat-file blob $commit:$path or just git cat-file blob $hash for every file you're interested in and parse the output of that file (in memory, as it were). None of that messes with the current state of the tree you're working on. Paul Bolle