1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-28 09:08:41 +02:00

Merge pull request #1975 from mark2185/fix-unmatching-remote-branch-name

This commit is contained in:
Jesse Duffield 2022-06-09 20:12:56 +10:00 committed by GitHub
commit cdec70cc06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 112 additions and 1 deletions

View File

@ -341,7 +341,7 @@ func (self *BranchesController) fastForward(branch *models.Branch) error {
err := self.git.Sync.Pull(
git_commands.PullOptions{
RemoteName: branch.UpstreamRemote,
BranchName: branch.Name,
BranchName: branch.UpstreamBranch,
FastForwardOnly: true,
},
)

View File

@ -0,0 +1 @@
ref: refs/heads/master

View File

@ -0,0 +1,6 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = /home/mark/Downloads/gits/lazygit/test/integration/fetchRemoteBranchWithNonmatchingName/actual/./repo

View File

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@ -0,0 +1,3 @@
x�ÍA
Â0@Q×9Å왉ÓI
"BW=FšL°Ð!R"èííÜ~üÜÌÖÄrê»* J®˜d £Æ¬¥Dò‰jà…¯E¸¦<x—ÞýÙv˜f¸MóC?É^›^r³;� L9ŒpF�èŽzLºþÉ�}ëº)¹2ê,Ó

View File

@ -0,0 +1,2 @@
x�ŽA
à E»öî ÅqÆD!”BV9†Ž# Ä& ííëºúðyïóy¯um]Ú)¢m‚Ù� !–HXJÌ€Åö Á²ëÉ¢ŽxÊ«‹6£Gœ t~L‘†.$è£Òñ� ßí¹Ÿz^ô4/ùÄzlrã½Þ5 ŽÀxƒ¾kŒêm?ÕäO\ÕoY7Aõñ?:l

View File

@ -0,0 +1,2 @@
# pack-refs with: peeled fully-peeled sorted
b090d7f0029e74de260f7458721b8edd1e618edc refs/heads/master

View File

@ -0,0 +1 @@
b090d7f0029e74de260f7458721b8edd1e618edc branch 'master' of ../origin

View File

@ -0,0 +1 @@
ref: refs/heads/master-local

View File

@ -0,0 +1 @@
12d38e54cd419303587ba4613fb1194ec5c9d04f

View File

@ -0,0 +1,14 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[user]
email = CI@example.com
name = CI
[remote "origin"]
url = ../origin
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master-local"]
remote = origin
merge = refs/heads/master

View File

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@ -0,0 +1,8 @@
0000000000000000000000000000000000000000 3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 CI <CI@example.com> 1654108479 +0200 commit (initial): myfile1
3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 commit: myfile2
12d38e54cd419303587ba4613fb1194ec5c9d04f 72ee6cc86de71389b9c70e24c7d8c8837e7d3566 CI <CI@example.com> 1654108479 +0200 commit: myfile3
72ee6cc86de71389b9c70e24c7d8c8837e7d3566 b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108479 +0200 commit: myfile4
b090d7f0029e74de260f7458721b8edd1e618edc 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 reset: moving to HEAD~2
12d38e54cd419303587ba4613fb1194ec5c9d04f 0000000000000000000000000000000000000000 CI <CI@example.com> 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local
0000000000000000000000000000000000000000 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local
12d38e54cd419303587ba4613fb1194ec5c9d04f b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108482 +0200 pull --no-edit --ff-only origin master: Fast-forward

View File

@ -0,0 +1,7 @@
0000000000000000000000000000000000000000 3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 CI <CI@example.com> 1654108479 +0200 commit (initial): myfile1
3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 commit: myfile2
12d38e54cd419303587ba4613fb1194ec5c9d04f 72ee6cc86de71389b9c70e24c7d8c8837e7d3566 CI <CI@example.com> 1654108479 +0200 commit: myfile3
72ee6cc86de71389b9c70e24c7d8c8837e7d3566 b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108479 +0200 commit: myfile4
b090d7f0029e74de260f7458721b8edd1e618edc 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 reset: moving to HEAD~2
12d38e54cd419303587ba4613fb1194ec5c9d04f 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local
12d38e54cd419303587ba4613fb1194ec5c9d04f b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108482 +0200 pull --no-edit --ff-only origin master: Fast-forward

View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000 b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108479 +0200 fetch origin: storing head

View File

@ -0,0 +1,3 @@
x�ÍA
Â0@Q×9Å왉ÓI
"BW=FšL°Ð!R"èííÜ~üÜÌÖÄrê»* J®˜d £Æ¬¥Dò‰jà…¯E¸¦<x—ÞýÙv˜f¸MóC?É^›^r³;� L9ŒpF�èŽzLºþÉ�}ëº)¹2ê,Ó

View File

@ -0,0 +1,2 @@
x�ŽA
à E»öî ÅqÆD!”BV9†Ž# Ä& ííëºúðyïóy¯um]Ú)¢m‚Ù� !–HXJÌ€Åö Á²ëÉ¢ŽxÊ«‹6£Gœ t~L‘†.$è£Òñ� ßí¹Ÿz^ô4/ùÄzlrã½Þ5 ŽÀxƒ¾kŒêm?ÕäO\ÕoY7Aõñ?:l

View File

@ -0,0 +1 @@
b090d7f0029e74de260f7458721b8edd1e618edc

View File

@ -0,0 +1 @@
b090d7f0029e74de260f7458721b8edd1e618edc

View File

@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":703,"Mod":0,"Key":256,"Ch":108},{"Timestamp":1151,"Mod":0,"Key":256,"Ch":82},{"Timestamp":1692,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2183,"Mod":0,"Key":256,"Ch":45},{"Timestamp":2372,"Mod":0,"Key":256,"Ch":108},{"Timestamp":2498,"Mod":0,"Key":256,"Ch":111},{"Timestamp":2617,"Mod":0,"Key":256,"Ch":99},{"Timestamp":2663,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2724,"Mod":0,"Key":256,"Ch":108},{"Timestamp":3196,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3837,"Mod":0,"Key":256,"Ch":102},{"Timestamp":4854,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":213,"Height":56}]}

View File

@ -0,0 +1,36 @@
#!/bin/sh
set -e
set -e
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
echo test1 > myfile1
git add .
git commit -am "myfile1"
echo test2 > myfile2
git add .
git commit -am "myfile2"
echo test3 > myfile3
git add .
git commit -am "myfile3"
echo test4 > myfile4
git add .
git commit -am "myfile4"
cd ..
git clone --bare ./repo origin
cd repo
git reset --hard HEAD~2
git remote add origin ../origin
git fetch origin
git branch --set-upstream-to=origin/master

View File

@ -0,0 +1 @@
{ "description": "allow unsetting the upstream of the current branch", "speed": 10 }