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

Re: renames in StGIT

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Oct 24, 2006, 08:48 UTC
Message-ID
<b0943d9e0610240148s15d6ec5ch6114360a603fcd71@mail.gmail.com>
In-Reply-To
<20061024081732.GA29265@diana.vm.bytemark.co.uk>
On 24/10/06, Karl Hasselström <kha@treskal.com> wrote:
Show 11 quoted lines
> On 2006-10-23 12:53:44 -0400, Sean wrote:
> > There are some situation where it would be really quite handy. The
> > performance of the human having to hand resolve a failed push
> > because of renames is often worse ;o) If it does become a
> > performance problem, perhaps you could make it an optional parameter
> > to "stg push".
>
> Yes, this is my opinion too, both for patch generation and pushing.
> Having it always on is a bad idea at least for patch generation for
> obvious reasons, and may be a bad idea for pushing for performance
> reasons, but I definitely think there should be a flag to enable it.

Actually, it might not be a big performance impact. For diff generation in the export and mail commands, we should have a flag.

The push operation might not need a flag since it will only checks renames if all the other operations failed. A push with merge detection has the steps below (if one succeeds, push is finished):

1. check (exact) patch merges by reverse-applying the diff
2. apply the diff with git-diff | git-apply since this is faster than
a three-way merge
3. try a three-way merge between head, bottom and top

Step 3 above is handled per file by the stgit.gitmergeonefile.merge() function. This is the place where we should have the rename detection. Since, the majority of the patches don't rename files and, in most cases, the push finishes at step 2, it is probably safe to extend this function and the users won't notice a speed difference.

I'll add it to the TODO list.
-- 
Catalin
Previous: Karl HasselströmNext: Karl Hasselström
Message 4 of 6 in “renames in StGIT”
  1. Karl HasselströmOct 22, 2006
  2. Catalin MarinasOct 23, 2006
  3. Karl HasselströmOct 24, 2006
  4. Catalin MarinasOct 24, 2006
  5. Karl HasselströmOct 24, 2006
  6. Catalin MarinasOct 24, 2006

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.