Closed michael-o closed 2 years ago
Without haven't analyzed it any further, I believe the operation is doomed to fail because it send a have on branch 2022Q1, but wants a commit on another branch. How can this be reasonably satisfied?! I guess gitup needs to detect branch change and simply do a clone, not a pull.
Did another test, moved in gitup.conf
to 2021Q4, before the clone it was on 2022Q1. Same behavior. So gitup needs to detect whether the target commit (want) is on another branch then it needs to perform a clone, not a pull.
Another sample:
# gitup ports
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /ports.git
# Target Directory: /usr/ports
# Have: 08f07d35843d6607bef4b0df44999e541a85cd42
# Want: b76aa00714838142a7b2b9fafa1aec10e8354da6
# Branch: main
# Action: pull
gitup: load_object: local file for object 9f7abadf31bd18130bcff145afabd23521756e59 -- (null) not found: No such file or directory
root@bsd1srv:~
It looks like the failure is occurring because the local repository scan is skipping the contents of cad/kicad-library-packages3d and cad/kicad-library-packages3d-devel because the paths pattern match "packages" is in the ignores list.
Does it work if you change "packages" to "/packages/" in the ignores list?
Indeed! I did:
"ignores":[
"/distfiles",
"/packages",
"/INDEX-11",
"/INDEX-12",
"/INDEX-13",
"/INDEX-14"
]
and if you look into .gitignore
it should have been like this:
$ cat .gitignore
/distfiles
/packages
/security/vuxml/vuln-flat.xml
Makefile.local
/*/*/work
/*/*/work-*
/INDEX-[0-9]*
*~
*.rej
*.orig
*.sw[p-z]
Basically, you need to update the sample gitup.conf
with the predeceding slash. Moreover, is there any POSIX or FreeBSD-specific function to implement this kind of globbing to readin .gitignore
and apply it if not defined in gitup.conf
explicitly?
The transition from 2022Q2 to 2022Q3 was successful so I think this issue is safe to close now. Thank you!
Running from: e6b52cd4d687060fa2b2496f7905ac169894ede1
with
and
then