Page MenuHomeFreeBSD

git-arc: Make git arc patch -r smarter
ClosedPublic

Authored by markj on Wed, Jul 29, 1:39 PM.
Tags
None
Referenced Files
F165389734: D58532.diff
Fri, Aug 7, 11:00 PM
F165254528: D58532.id183031.diff
Fri, Aug 7, 5:10 AM
Unknown Object (File)
Wed, Aug 5, 3:54 AM
Unknown Object (File)
Sun, Aug 2, 6:47 PM
Unknown Object (File)
Sun, Aug 2, 2:27 AM
Unknown Object (File)
Sun, Aug 2, 12:45 AM
Unknown Object (File)
Sun, Aug 2, 12:44 AM
Unknown Object (File)
Sat, Aug 1, 7:34 PM
Subscribers

Details

Summary
  • Make it work even when git arc isn't run from the root of the repo.
  • If the patch fails to apply, let git partially apply the patch and generate rej files for inspection.

While here, remove the return value from apply_rev(), it's never
actually used.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Wed, Jul 29, 1:39 PM

Thanks, this works great for me. Sample output:

> git arc patch -c -r D57785
Applying D57785...
fetch: https://reviews.freebsd.org/D57785.diff: size of remote file is not known
/dev/stdout                                            613  B 9394  Bps    00s
Checking patch sys/kern/link_elf.c...
error: while searching for:
                   &resid, td);
               if (error != 0)
                       goto out;
               bzero(segbase + segs[i]->p_filesz,
                   segs[i]->p_memsz - segs[i]->p_filesz);
       }

       ef->dynamic = (Elf_Dyn *) (mapbase + phdyn->p_vaddr - base_vaddr);

error: patch failed: sys/kern/link_elf.c:1213
Applying patch sys/kern/link_elf.c with 1 reject...
Rejected hunk #1.
This revision is now accepted and ready to land.Wed, Jul 29, 1:41 PM
This revision was automatically updated to reflect the committed changes.