mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-16 07:58:04 +00:00
devel/got: update to 0.53
User-visible changes: - add a gotadmin utility with info, pack, indexpack, and listpack commands - do not update symlinks which are already up-to-date - fix 3-way merge of files which lack a final \n - avoid an error in tog(1) while the terminal window is being resized - catch invalid reference names passed to 'got ref -l' - fix unrelated changes being merged by got cherrypick/backout/rebase/histedit - new -I option for 'got status' to show files which match an ignore pattern
This commit is contained in:
parent
abf3649244
commit
57445751af
@ -1,5 +1,5 @@
|
||||
PORTNAME= got
|
||||
PORTVERSION= 0.52
|
||||
PORTVERSION= 0.53
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= https://gameoftrees.org/releases/
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1617736627
|
||||
SHA256 (got-0.52.tar.gz) = 625875685cbed6637cf99dc93df3ca2fa9128519752fe8cc5bd509b50a46e8b7
|
||||
SIZE (got-0.52.tar.gz) = 494359
|
||||
TIMESTAMP = 1624457436
|
||||
SHA256 (got-0.53.tar.gz) = 2401652e959457ddba67eef93a31b3dd6efea89198a3c02eebc964edb03961f3
|
||||
SIZE (got-0.53.tar.gz) = 519143
|
||||
|
@ -1,8 +1,8 @@
|
||||
--- Makefile.orig 2020-09-09 15:30:46 UTC
|
||||
--- Makefile.orig 2021-04-10 22:50:22 UTC
|
||||
+++ Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
-SUBDIR = libexec got tog
|
||||
+SUBDIR = openbsd-compat libexec got tog
|
||||
-SUBDIR = libexec got tog gotadmin
|
||||
+SUBDIR = openbsd-compat libexec got tog gotadmin
|
||||
|
||||
.PHONY: release dist
|
||||
|
||||
|
13
devel/got/files/patch-gotadmin_Makefile
Normal file
13
devel/got/files/patch-gotadmin_Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
--- gotadmin/Makefile.orig 2021-06-22 19:37:49 UTC
|
||||
+++ gotadmin/Makefile
|
||||
@@ -24,10 +24,6 @@ DPADD = ${LIBZ} ${LIBUTIL}
|
||||
NOMAN = Yes
|
||||
.endif
|
||||
|
||||
-realinstall:
|
||||
- ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \
|
||||
- -m ${BINMODE} ${PROG} ${BINDIR}/${PROG}
|
||||
-
|
||||
dist:
|
||||
mkdir ../got-${GOT_VERSION}/${PROG}
|
||||
cp ${SRCS} ${MAN} ../got-${GOT_VERSION}/${PROG}
|
10
devel/got/files/patch-lib_repository__admin.c
Normal file
10
devel/got/files/patch-lib_repository__admin.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- lib/repository_admin.c.orig 2021-06-23 15:24:57 UTC
|
||||
+++ lib/repository_admin.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <dirent.h>
|
||||
+#include <endian.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
@ -1,102 +0,0 @@
|
||||
https://git.gameoftrees.org/gitweb/?p=got.git;a=commitdiff;h=c6e8a8268ec4f4240d51dcfd54d05c5370060747
|
||||
|
||||
--- lib/worktree.c.orig 2021-04-06 19:21:25 UTC
|
||||
+++ lib/worktree.c
|
||||
@@ -1246,14 +1246,16 @@ install_blob(struct got_worktree *worktree, const char
|
||||
* safe location in the work tree!
|
||||
*/
|
||||
static const struct got_error *
|
||||
-replace_existing_symlink(const char *ondisk_path, const char *target_path,
|
||||
- size_t target_len)
|
||||
+replace_existing_symlink(int *did_something, const char *ondisk_path,
|
||||
+ const char *target_path, size_t target_len)
|
||||
{
|
||||
const struct got_error *err = NULL;
|
||||
ssize_t elen;
|
||||
char etarget[PATH_MAX];
|
||||
int fd;
|
||||
|
||||
+ *did_something = 0;
|
||||
+
|
||||
/*
|
||||
* "Bad" symlinks (those pointing outside the work tree or into the
|
||||
* .got directory) are installed in the work tree as a regular file
|
||||
@@ -1277,6 +1279,7 @@ replace_existing_symlink(const char *ondisk_path, cons
|
||||
return NULL; /* nothing to do */
|
||||
}
|
||||
|
||||
+ *did_something = 1;
|
||||
err = update_symlink(ondisk_path, target_path, target_len);
|
||||
if (fd != -1 && close(fd) == -1 && err == NULL)
|
||||
err = got_error_from_errno2("close", ondisk_path);
|
||||
@@ -1398,7 +1401,6 @@ install_symlink(int *is_bad_symlink, struct got_worktr
|
||||
|
||||
if (*is_bad_symlink) {
|
||||
/* install as a regular file */
|
||||
- *is_bad_symlink = 1;
|
||||
got_object_blob_rewind(blob);
|
||||
err = install_blob(worktree, ondisk_path, path,
|
||||
GOT_DEFAULT_FILE_MODE, GOT_DEFAULT_FILE_MODE, blob,
|
||||
@@ -1409,20 +1411,26 @@ install_symlink(int *is_bad_symlink, struct got_worktr
|
||||
|
||||
if (symlink(target_path, ondisk_path) == -1) {
|
||||
if (errno == EEXIST) {
|
||||
+ int symlink_replaced;
|
||||
if (path_is_unversioned) {
|
||||
err = (*progress_cb)(progress_arg,
|
||||
GOT_STATUS_UNVERSIONED, path);
|
||||
goto done;
|
||||
}
|
||||
- err = replace_existing_symlink(ondisk_path,
|
||||
- target_path, target_len);
|
||||
+ err = replace_existing_symlink(&symlink_replaced,
|
||||
+ ondisk_path, target_path, target_len);
|
||||
if (err)
|
||||
goto done;
|
||||
if (progress_cb) {
|
||||
- err = (*progress_cb)(progress_arg,
|
||||
- reverting_versioned_file ?
|
||||
- GOT_STATUS_REVERT : GOT_STATUS_UPDATE,
|
||||
- path);
|
||||
+ if (symlink_replaced) {
|
||||
+ err = (*progress_cb)(progress_arg,
|
||||
+ reverting_versioned_file ?
|
||||
+ GOT_STATUS_REVERT :
|
||||
+ GOT_STATUS_UPDATE, path);
|
||||
+ } else {
|
||||
+ err = (*progress_cb)(progress_arg,
|
||||
+ GOT_STATUS_EXISTS, path);
|
||||
+ }
|
||||
}
|
||||
goto done; /* Nothing else to do. */
|
||||
}
|
||||
@@ -1930,11 +1938,19 @@ update_blob(struct got_worktree *worktree,
|
||||
goto done;
|
||||
}
|
||||
|
||||
- if (ie && status != GOT_STATUS_MISSING &&
|
||||
- (te->mode & S_IXUSR) == (sb.st_mode & S_IXUSR)) {
|
||||
+ if (ie && status != GOT_STATUS_MISSING && S_ISREG(sb.st_mode) &&
|
||||
+ (S_ISLNK(te->mode) ||
|
||||
+ (te->mode & S_IXUSR) == (sb.st_mode & S_IXUSR))) {
|
||||
+ /*
|
||||
+ * This is a regular file or an installed bad symlink.
|
||||
+ * If the file index indicates that this file is already
|
||||
+ * up-to-date with respect to the repository we can skip
|
||||
+ * updating contents of this file.
|
||||
+ */
|
||||
if (got_fileindex_entry_has_commit(ie) &&
|
||||
memcmp(ie->commit_sha1, worktree->base_commit_id->sha1,
|
||||
SHA1_DIGEST_LENGTH) == 0) {
|
||||
+ /* Same commit. */
|
||||
err = sync_timestamps(worktree->root_fd,
|
||||
path, status, ie, &sb);
|
||||
if (err)
|
||||
@@ -1946,6 +1962,7 @@ update_blob(struct got_worktree *worktree,
|
||||
if (got_fileindex_entry_has_blob(ie) &&
|
||||
memcmp(ie->blob_sha1, te->id.sha1,
|
||||
SHA1_DIGEST_LENGTH) == 0) {
|
||||
+ /* Different commit but the same blob. */
|
||||
err = sync_timestamps(worktree->root_fd,
|
||||
path, status, ie, &sb);
|
||||
goto done;
|
@ -1,8 +1,8 @@
|
||||
--- regress/cmdline/Makefile.orig 2020-10-21 11:24:20 UTC
|
||||
--- regress/cmdline/Makefile.orig 2021-06-22 19:37:49 UTC
|
||||
+++ regress/cmdline/Makefile
|
||||
@@ -80,4 +80,6 @@ fetch:
|
||||
tree:
|
||||
./tree.sh -q -r "$(GOT_TEST_ROOT)"
|
||||
@@ -83,4 +83,6 @@ tree:
|
||||
pack:
|
||||
./pack.sh -q -r "$(GOT_TEST_ROOT)"
|
||||
|
||||
-.include <bsd.regress.mk>
|
||||
+regress: ${REGRESS_TARGETS} .PHONY .SILENT
|
||||
|
@ -1,4 +1,5 @@
|
||||
bin/got
|
||||
bin/gotadmin
|
||||
bin/tog
|
||||
libexec/got-fetch-pack
|
||||
libexec/got-index-pack
|
||||
@ -11,6 +12,7 @@ libexec/got-read-pack
|
||||
libexec/got-read-tag
|
||||
libexec/got-read-tree
|
||||
man/man1/got.1.gz
|
||||
man/man1/gotadmin.1.gz
|
||||
man/man1/tog.1.gz
|
||||
man/man5/git-repository.5.gz
|
||||
man/man5/got-worktree.5.gz
|
||||
|
Loading…
Reference in New Issue
Block a user