From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Hommey Subject: Re: What should a user expect from git log -M -- file Date: Fri, 27 Nov 2009 08:28:20 +0100 Message-ID: <20091127072820.GA17045@glandium.org> References: <20091126163654.GA14509@glandium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org To: Jakub Narebski X-From: git-owner@vger.kernel.org Fri Nov 27 08:29:25 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1NDvGe-0004QD-Cp for gcvg-git-2@lo.gmane.org; Fri, 27 Nov 2009 08:29:24 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752403AbZK0H3N (ORCPT ); Fri, 27 Nov 2009 02:29:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752331AbZK0H3N (ORCPT ); Fri, 27 Nov 2009 02:29:13 -0500 Received: from vuizook.err.no ([85.19.221.46]:45602 "EHLO vuizook.err.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbZK0H3M (ORCPT ); Fri, 27 Nov 2009 02:29:12 -0500 Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19] helo=jigen) by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NDvGU-0007F2-GT; Fri, 27 Nov 2009 08:29:17 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1NDvFc-0004V0-IW; Fri, 27 Nov 2009 08:28:20 +0100 Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: A479 A824 265C B2A5 FC54 8D1E DE4B DA2C 54FD 2A58 User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Status: (score 0.1): No, score=0.1 required=5.0 tests=RDNS_DYNAMIC autolearn=disabled version=3.2.4 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Nov 26, 2009 at 09:14:37AM -0800, Jakub Narebski wrote: > Mike Hommey writes: > > > I recently reorganized a project of mine, and the result is that a lot of > > files moved from the top directory to a sub directory. > > > > Now, I innocently tried to 'git log -M' some of these files in the > > subdirectories, and well, the history just stops when the file was > > created. Obviously, if I put both the old and the new location it works, > > but shouldn't users expect 'git log -M -- file' to try to find the > > previous path and continue from there ? > > What you want is not > > git log -M -- file > > but > > git log --follow file > > "git log -M -- file" IIRC first applies path limiting, simplifying > history, *then* does rename detection, and finally filters output > (unless --full-diff is used). That's what I was looking for, thanks. I would suggest to put --follow closer to -M and -C in the documentation, but the way the git-log manual is generated (including diff options) makes that impossible :( Mike