-
Notifications
You must be signed in to change notification settings - Fork 266
'noms diff' should ignore different parents #3823
Comments
Hi @lak - we've gone back and forth about this. You're right it's confusing when you first try it. You can get the behavior you want, by saying:
That is, ask noms to just compare the value of the commits, not the commit objects themselves. I think that when diffing commits, the user typically wants the behavior you ask for. But the challenge is that Git special-cases commits to make the output prettier in this case, but git doesn't have the problem of users writing arbitrary objects to its database. |
I wonder if we had auto-complete, if this would feel less cumbersome. |
I expect there are ways to make this less confusing.
But IMO including non-content differences by default is a bad choice. If you claim idempotency, then the core tools should exhibit it by default. Yes, you could get non-idempotent behavior (e.g., showing different parents and dates) but you would have to pick it.
|
Yeah, I suppose I could imagine a It's a bit unfortunate to have the special case, but maybe worth it since this is a common case. |
PS: I believe that having |
I'm experimenting with json-import, and getting some surprising behavior.
I would expect that two datasets would show no diff, but noms seems to consider different parents to indicate different data sets. IMO, the parentage is an aspect of the database, not of the data itself, and thus should not be in diff output.
Note that the text below also shows date in the meta; I don't know whether this is an artifact of json-import, or noms diff. If the latter, then I would also expect that not to be shown. Of course two different commits are going to have different dates and parents, so these should be skipped.
The text was updated successfully, but these errors were encountered: