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

Re: [PATCH 2/3] git-p4: Search for parent commit on branch creation

From
Vitor Antunes <vitor.hda@gmail.com>
Date
Jan 17, 2012, 00:10 UTC
Message-ID
<CAOpHH-XUj7tF4O_kXfxq2e9Y4VmybNLCqGku_-9H1X+c7v=xwQ@mail.gmail.com>
In-Reply-To
<CAOpHH-UkyK-c_AHUOPbQQmW9cQQypDvirMR0Jb7vTGSQF7RZpw@mail.gmail.com>
On Mon, Jan 16, 2012 at 11:41 PM, Vitor Antunes <vitor.hda@gmail.com> wrote:
Show 10 quoted lines
> On Mon, Jan 16, 2012 at 6:57 PM, Pete Wyckoff <pw@padd.com> wrote:
>> 1.  Move the tempBranch commit outside of the "for blob" loop.
>>    It can have no parent, and the diff-tree will still tell you
>>    if you found the same contents.  Instead of a ref for
>>    each blob inspected for each change, you'll just have one ref
>>    per change.  Only one checkpoint() after the tempBranch
>>    commit should be needed.
>
> You're right. Completely oversaw that. Will improve the code
> accordingly.

Apparently I did not oversee it. Assume you have added a new file to HEAD of parent branch, but you branched from a previous commit. When the new branch is committed over HEAD the new file will, incorrectly, be part of it and diff-tree will not work as expected.

I should avoid taking 6 months to submit a patch to avoid forgetting why I did what I did :)

Vitor
Previous: Vitor AntunesNext: Pete Wyckoff
Message 6 of 10 in “git-p4: Search for parent commit on branch creation”
  1. 0/3 git-p4: Search for parent commit on branch creationVitor Antunes, Jan 16, 2012
  2. 1/3 git-p4: Add checkpoint() taskVitor Antunes, Jan 16, 2012
  3. 2/3 git-p4: Search for parent commit on branch creationVitor Antunes, Jan 16, 2012
  4. Pete WyckoffJan 16, 2012
  5. Vitor AntunesJan 16, 2012
  6. Vitor AntunesJan 17, 2012
  7. Pete WyckoffJan 17, 2012
  8. Vitor AntunesJan 17, 2012
  9. 3/3 git-p4: Add test case for complex branch importVitor Antunes, Jan 16, 2012
  10. Pete WyckoffJan 16, 2012

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.