johnmehr / gitup

A minimalist, dependency-free FreeBSD program to clone/pull Git repositories.
BSD 2-Clause "Simplified" License
51 stars 9 forks source link

Using tags: valid and invalid arguments #93

Closed grahamperrin closed 1 year ago

grahamperrin commented 1 year ago

I see #27 but (sorry) I can't tell what I'm doing wrong …

root@fuji:~ # gitup release
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Have: 525ecfdad597980ea4cd59238e24c8530dbcd31d
# Want: 525ecfdad597980ea4cd59238e24c8530dbcd31d
# Branch: releng/13.2
# Done.
root@fuji:~ # gitup release -t releng/13.1.0
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Tag: releng/13.1.0
# Have: 525ecfdad597980ea4cd59238e24c8530dbcd31d
gitup: get_commit_details: refs/tags/releng/13.1.0 doesn't exist in /src.git: Invalid argument
root@fuji:~ # gitup release -t releng/13.2.0
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Tag: releng/13.2.0
# Have: 525ecfdad597980ea4cd59238e24c8530dbcd31d
gitup: get_commit_details: refs/tags/releng/13.2.0 doesn't exist in /src.git: Invalid argument
root@fuji:~ # gitup stable -t releng/13.2.0
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Tag: releng/13.2.0
gitup: get_commit_details: refs/tags/releng/13.2.0 doesn't exist in /src.git: Invalid argument
root@fuji:~ # gitup stable 
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Want: 74393887695971d59e108b950e27d21b3070e1fc
# Branch: stable/13
# Action: clone
 * /usr/src/.cirrus.yml
 …
 - /usr/src/tools/build/options/WITH_LIBCPLUSPLUS
#
# Please review the following file(s) for important changes.
#       /usr/src/UPDATING
#
# Done.
root@fuji:~ # gitup stable -t releng/13.2.0
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Tag: releng/13.2.0
# Have: 74393887695971d59e108b950e27d21b3070e1fc
gitup: get_commit_details: refs/tags/releng/13.2.0 doesn't exist in /src.git: Invalid argument
root@fuji:~ # 
johnmehr commented 1 year ago

It looks like 'releng' is only used for branches and 'release' is used for tags so if you swap 'releng/13.2.0' with 'release/13.2.0' it should work.

grahamperrin commented 1 year ago

Yep, my bad, a typo (repeatedly). Thanks!