All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>,
	Avery Pennarun <apenwarr@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] t4202 (log): add failing test for log with subtree
Date: Mon, 22 Apr 2013 17:24:56 +0200	[thread overview]
Message-ID: <87wqruk2pj.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <CALkWK0m6vwR9rNNw_GjF4MOK1GZfwjB8ZA5Y0Lo8LbvfAg0g3g@mail.gmail.com> (Ramkumar Ramachandra's message of "Mon, 22 Apr 2013 20:00:47 +0530")

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> Thomas Rast wrote:
>> [...]
>
> I think you've misunderstood the whole thing.  The histories of M^1
> and M^2 are completely unrelated: they're from different projects
> altogether.  Considering the /ichi in M^2 a "rename" of the /ichi in
> M^1 is completely wrong.  They have nothing to do with each other.  I
> intentionally named it "ichi" in my orphan branch just to drive my
> point.  I suspect you've got confused because I used an orphan branch
> to emulate a different project's history.  If you want an end-user
> understanding of the problem, use git subtree:
>
>     $ cd /tmp
>     $ git clone gh:artagnon/varlog
>     $ cd varlog
>     $ git subtree add --prefix=clayoven \
>        gh:artagnon/clayoven master
>     $ cd clayoven
>     $ git log README.md
>
> What do you expect?  The same output you would get if you cloned
> gh:artagnon/clayoven separately and executed 'git log README.md' on
> it.

No, I don't.  But that's probably because I know a few things about how
git-log works that your hypothetical $USER doesn't.

At the risk of restating what everyone agrees on: It's a design
principle of git that it only stores tree states, and anything about
diffs, files, renames, etc. is purely in the imagination of the user.

We support that imagination by having analysis tools with which some
things can be found out, but others can't.

So (I think?) in the above you claim that $USER interprets

  git log -- README.md

as

  Show me the history of README.md.

But there's no such thing as the history of a file!  The command instead
says

  If I filter all history for only changes affecting a path 'README.md'
  in the root of the repository[1], then what does it look like?


So please don't write tests that go contrary to that definition, because
they're *wrong*.  The current implementation precisely matches the
current definition of pathspec filtering.

You can try arguing for changing the definition, but unless you find one
that can be implemented fast enough to be generally usable, I will
oppose that change.


The only thing that's broken in any of this is that I think, as
explained on IRC, that a hypothetical fixed --follow -C should be able
to figure out this case.  By spending extra cycles on analysis,
naturally.


[1]  and also skipping lines of history that seem uninteresting at this
point already, compare --simplify-merges

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  parent reply	other threads:[~2013-04-22 15:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 12:08 [PATCH] t4202 (log): add failing test for log with subtree Ramkumar Ramachandra
2013-04-22 12:11 ` Matthieu Moy
2013-04-22 12:17   ` Thomas Rast
2013-04-22 12:37     ` Ramkumar Ramachandra
2013-04-22 12:54       ` Ramkumar Ramachandra
2013-04-22 12:29   ` Ramkumar Ramachandra
2013-04-22 12:36     ` Matthieu Moy
2013-04-22 13:15 ` Thomas Rast
2013-04-22 13:19   ` Thomas Rast
2013-04-22 14:30   ` Ramkumar Ramachandra
2013-04-22 14:57     ` Ramkumar Ramachandra
2013-04-22 15:24     ` Thomas Rast [this message]
2013-04-22 15:46       ` Ramkumar Ramachandra
2013-04-22 15:50       ` Ramkumar Ramachandra
2013-04-22 15:54         ` Ramkumar Ramachandra
2013-04-22 17:29           ` Ramkumar Ramachandra
2013-04-22 19:15             ` Thomas Rast
2013-04-22 19:54               ` Ramkumar Ramachandra
2013-04-22 21:00                 ` Philip Oakley
2013-04-22 21:08                   ` Ramkumar Ramachandra
2013-04-22 21:23                     ` Ramkumar Ramachandra
2013-04-22 21:06               ` Matthieu Moy
2013-04-22 21:59                 ` Junio C Hamano
2013-04-22 22:52                   ` Ramkumar Ramachandra
2013-04-22 22:59                     ` Ramkumar Ramachandra
2013-04-22 23:55                     ` Junio C Hamano
2013-04-23  7:53                       ` Ramkumar Ramachandra
2013-04-23 16:03                         ` Junio C Hamano
2013-04-23 16:29                           ` Ramkumar Ramachandra
2013-04-22 16:32       ` Junio C Hamano
2013-04-22 18:00         ` Ramkumar Ramachandra
2013-04-22 18:18           ` Matthieu Moy
2013-04-22 19:09           ` Junio C Hamano
2013-04-22 20:39         ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqruk2pj.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=apenwarr@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.