William Martin
efd8ff6d46
General cleanup and docs
2024-11-26 22:30:11 +01:00
William Martin
6b7f1ff060
Allow client fetch to use insecure credentials pattern
2024-11-26 22:30:03 +01:00
William Martin
7affcadb5e
Allow client push to use insecure credential pattern
2024-11-26 22:29:58 +01:00
William Martin
75712de712
Allow client pull to use insecure credential pattern
2024-11-26 22:29:51 +01:00
William Martin
5f5c5270c9
Allow opt-in to insecure pattern
2024-11-26 22:29:43 +01:00
William Martin
46922694dc
Support secure credential pattern
2024-11-26 22:29:38 +01:00
Hiran Wijesinghe
fd51a69308
Handle --bare clone targets ( #9271 )
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-07-24 12:35:24 +02:00
William Martin
3aa3d61108
Merge pull request #8929 from cli/wm/parse-url-no-nakaed-return
...
Remove naked returns from git ParseURL
2024-04-05 16:33:09 +02:00
William Martin
b0b147e60c
Use testify in git url tests
2024-04-05 16:07:04 +02:00
William Martin
1b57b0f917
Minorly refactor scheme normalization in git ParseURL
2024-04-05 12:29:27 +02:00
William Martin
2c2a09c73e
Test for parsing error in git ParseURL
2024-04-05 12:25:24 +02:00
William Martin
27f3d62d02
Remove naked returns from git ParseURL
2024-04-05 12:23:47 +02:00
Babak K. Shandiz
47efef6d70
Fix parsing IPv6 remote URLs ( #8893 )
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-05 11:54:55 +02:00
William Martin
5fe6eebfea
Update incorrect regex comment for client Commits
2024-02-28 13:38:39 +01:00
William Martin
2ee6737053
Use regex to split apart the git client Commit logs
...
Theoretically this should be clearer and more robust than the previous
version which had some custom loop logic while trying to parse newlines
and determine whether it had reached a new commit entry by trying to parse
a git sha. This would not have worked correctly if a commit body contained
a sha on a new line.
2024-02-27 20:49:00 +01:00
William Martin
2b0484f5aa
Use null byte separators when fetching comments from git
2024-02-27 18:00:40 +01:00
William Martin
fb353caf19
Add new tests to git client Commits
...
This adds coverage for mutliple commits and commits with
newlines in bodies.
2024-02-27 17:33:17 +01:00
William Martin
2af0c899d8
Remove unnecessary split conditional from client Commits
...
Since this is guarded by the line starting with a git sha, it must
be a line of the form 'sha,title,body', so there can never be only
two entries since the Split fn will produce an empty string in the
last spot in the case of a missing body.
2024-02-27 17:26:51 +01:00
William Martin
0541d286c1
Extract new test helper for git client Commits
2024-02-27 14:41:45 +01:00
Federico Guerinoni
42613172bd
pr: Add flag fillverbose
...
This is used to fill the body of PR with all commits msg + body
of every commits because there can be lot of useful information.
Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
2024-02-01 09:12:04 +01:00
Federico Guerinoni
6dfae58b47
git: Return body from list of commits
...
This allow to use body of every commits between two ref.
2024-02-01 09:09:06 +01:00
Sam Coe
08fb744229
Simplify git AddRemote to remove unused arg ( #8392 )
2023-12-04 15:48:08 -04:00
Keming
ba60f89f42
Delete local tag when running gh release delete --cleanup-tag ( #7884 )
2023-09-07 12:04:15 +00:00
Sam Coe
fac497108b
Set upstream remote to track all branches after initial fetch ( #7542 )
2023-06-12 09:23:56 +09:00
Alexander Seiler
218f29f296
Correct some typos
2023-04-21 03:51:31 +02:00
Benjamin Chadwick
82662685e3
Autocomplete branch flags ( #6031 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-03-29 16:09:44 +00:00
Alex Petrov
7d4ab65af3
fix: correctly set ErrNotOnAnyBranch error in git client ( #7082 )
...
Before, git client was not correctly setting `ErrNotOnAnyBranch` error.
Because of that, `gh pr status` was not functioning correctly when run
from the detached HEAD. This commit fixes that.
Fixes #7051
2023-03-06 09:16:29 +11:00
Mislav Marohnić
14eb873b9e
Avoid implicitly fetching when adding a new git remote ( #6990 )
2023-02-07 21:22:02 +00:00
Mislav Marohnić
8df1e9946f
repo set-default: support bare git repos
...
The command was using this to check for git repo context:
git rev-parse --is-inside-work-tree
With this change, this is used instead:
git rev-parse --git-dir
The latter approach works in the context of a bare git repository, which does not have a worktree.
2023-01-18 20:45:12 +01:00
Nate Smith
941dc26cc8
Update git/client.go
...
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-12-14 16:15:37 -08:00
vilmibm
76c58930d9
tests pass
2022-12-13 10:48:03 -08:00
vilmibm
7e3e2d96a8
Merge remote-tracking branch 'origin/trunk' into base-cmd
2022-12-13 10:39:40 -08:00
Sam Coe
98ab1f2587
Authenticate network git commands ( #6541 )
2022-11-15 13:14:37 +02:00
Sam Coe
6bbfc5056d
Use git client in extension manager ( #6547 )
2022-11-10 11:38:12 +02:00
Sam Coe
f96b2fce57
Refactor git client and add tests ( #6525 )
2022-11-03 11:58:38 +01:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 ( #6474 )
2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression ( #6472 )
...
* Revert "Refactor to use new git client (#6447 )"
This reverts commit 57fbe4f317 .
* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client ( #6447 )
2022-10-19 21:11:36 +03:00
tdakkota
d41efa7a6a
Fix #6452 ( #6453 )
2022-10-18 06:36:52 +00:00
Sam Coe
2944f7c3ab
Create git client ( #6354 )
2022-10-14 07:47:03 +00:00
Eng Zer Jun
471cbea4fa
test: use t.Setenv to set env vars in tests ( #6333 )
...
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
Mislav Marohnić
6ca9406554
pr create: allow git push step to prompt on stdin
2022-09-21 20:57:53 +02:00
Sam Coe
743a747804
Use go-gh for SSH hostname alias translation ( #5654 )
2022-06-08 21:32:29 +00:00
Ahmed Adan
31bee2e639
Add --upstream-remote-name flag to gh replo clone ( #5619 )
2022-05-24 13:12:01 +02:00
Sam Coe
22a5d2abf8
Refactor code to live inside default pkg
2022-05-18 08:40:30 +02:00
bchadwic
66a69bdec5
fixing lint and formatting
2022-05-18 08:40:29 +02:00
bchadwic
86658513b1
Created more test cases, added in env section
2022-05-18 08:40:29 +02:00
bchadwic
ca5e9a49b5
thinking of a better solution, wip. BaseRepo() might be better split up
2022-05-18 08:40:29 +02:00
bchadwic
a98395f4e8
headed in the right direction. Needs tests and to be cleaned up. This is a working example of the teams design combined with https://github.com/cli/cli/pull/4859#issuecomment-1012776582
2022-05-18 08:40:29 +02:00
bchadwic
38097e8cad
created gh config base a way to configure the base repo
2022-05-18 08:40:28 +02:00