git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/4] t6038: fix test with obviously incorrect expectations

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 3, 2020, 15:50 UTC
Message-ID
<xmqqr1snwwx6.fsf@gitster.c.googlers.com>
In-Reply-To
<CABPp-BHNebxZK1-tXx0HMmPDuRoj=_XWG=pVJ2HCvTkttvA4oQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 9 quoted lines
>> I'd say that it is probably more intuitive to expect whatever
>> attributes set on the currently checked out and receiving the
>> cherry-picked change would take effect, but I do agree with you that
>> this is not well defined.
> ...
> What if you don't have any version checked out, and are doing a merge
> in a bare-repo or are just redoing a merge (on some other branch)
> without touching the working directory or index just so you can view
> that other merge?

The "receiving" is the keyword in my "I'd say". Whey you view the result of merge, the merge may be symmetric, but when initiating a merge, you have a clear distinction between the target and other: I am merging these other side branches into this one.

But as I said, I think it is not well defined whose attribute should be used. Some might even dream that .gitattributes from the tips being merged are somehow magically merged first and then the other paths' merges should use that resulting merged .gitattributes.

Show 5 quoted lines
> Also, what if you were doing a merge in a dirty working tree, where
> your .gitattributes was locally modified?  Should the local
> .gitattributes file override the .gitattributes file recorded in
> history for how those versions are merged (which seems somewhat
> suggested by your answer)?

Yes, that is quite deliberate outcome from "when doing a merge, the person who is merging is fully aware into which branch others are merged into".

Previous: Elijah NewrenNext: Elijah Newren via GitGitGadget
Message 13 of 18 in “Attr fixes”
  1. 0/4 Attr fixesElijah Newren via GitGitGadget, Aug 2, 2020
  2. 1/4 t6038: make tests fail for the right reasonElijah Newren via GitGitGadget, Aug 2, 2020
  3. Junio C HamanoAug 2, 2020
  4. Eric SunshineAug 2, 2020
  5. Elijah NewrenAug 3, 2020
  6. 3/4 merge: make merge.renormalize work for all uses of merge machineryElijah Newren via GitGitGadget, Aug 2, 2020
  7. Junio C HamanoAug 2, 2020
  8. Elijah NewrenAug 3, 2020
  9. 4/4 checkout: support renormalization with checkout -m <paths>Elijah Newren via GitGitGadget, Aug 2, 2020
  10. 2/4 t6038: fix test with obviously incorrect expectationsElijah Newren via GitGitGadget, Aug 2, 2020
  11. Junio C HamanoAug 2, 2020
  12. Elijah NewrenAug 3, 2020
  13. Junio C HamanoAug 3, 2020
  14. 0/4 Attr fixesElijah Newren via GitGitGadget, Aug 3, 2020
  15. 1/4 t6038: make tests fail for the right reasonElijah Newren via GitGitGadget, Aug 3, 2020
  16. 4/4 checkout: support renormalization with checkout -m <paths>Elijah Newren via GitGitGadget, Aug 3, 2020
  17. 2/4 t6038: remove problematic testElijah Newren via GitGitGadget, Aug 3, 2020
  18. 3/4 merge: make merge.renormalize work for all uses of merge machineryElijah Newren via GitGitGadget, Aug 3, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.