From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Santi_B=E9jar?= Subject: Re: Any way to get complete diff up to a tag? Date: Thu, 6 May 2010 15:00:50 +0200 Message-ID: References: <20100506094212.GB9921@atjola.homenet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: =?ISO-8859-1?Q?Bj=F6rn_Steinbrink?= , "git@vger.kernel.org" To: Peter Kjellerstedt X-From: git-owner@vger.kernel.org Thu May 06 15:01:07 2010 connect(): No such file or directory Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OA0hK-0004to-8M for gcvg-git-2@lo.gmane.org; Thu, 06 May 2010 15:01:03 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758044Ab0EFNA4 convert rfc822-to-quoted-printable (ORCPT ); Thu, 6 May 2010 09:00:56 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:34854 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238Ab0EFNA4 convert rfc822-to-8bit (ORCPT ); Thu, 6 May 2010 09:00:56 -0400 Received: by fxm10 with SMTP id 10so5088767fxm.19 for ; Thu, 06 May 2010 06:00:54 -0700 (PDT) Received: by 10.103.205.23 with SMTP id h23mr12170459muq.88.1273150850696; Thu, 06 May 2010 06:00:50 -0700 (PDT) Received: by 10.103.178.17 with HTTP; Thu, 6 May 2010 06:00:50 -0700 (PDT) In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 2010/5/6 Peter Kjellerstedt : >> -----Original Message----- >> From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] O= n >> Behalf Of Bj=F6rn Steinbrink >> >> On 2010.05.06 11:27:40 +0200, Peter Kjellerstedt wrote: >> > If I use >> > >> > $ git diff $(git rev-list --reverse v1.7.1 |head -1)..v1.7.1 >> > >> > I almost get what I want, but the initial commit is still missing. >> > Is there any way to get that initial commit included in the diff? >> >> git internally knows about the empty tree, so you can use: >> git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 v1.7.1 >> >> Bj=F6rn > > Thank you, that was useful. However, I need to be able to do this > for an arbitrary repository, and that SHA seems to be specific for > the git repository. How do I get the SHA for the empty tree in an > arbitrary repository? It is not specific for the git repository, there is only one SHA1 for the empty tree. But it is hard-coded in git itself since 1.5.5. If you use an older git you have to create it yourself. Santi