Skip to content

Commit

Permalink
fix: checking out to remote branch
Browse files Browse the repository at this point in the history
  • Loading branch information
topliceanurazvan committed Apr 19, 2023
1 parent b0dfd49 commit 3b506ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/redux/services/gitFolderMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export async function monitorGitFolder(rootFolderPath: string | null, thunkAPI:

const absolutePathEndsWithGit = absolutePath.endsWith(`${sep}.git`);

if (path.startsWith(`${absolutePath}${absolutePathEndsWithGit ? '' : `${sep}.git`}${sep}FETCH_HEAD`)) {
if (
path.startsWith(`${absolutePath}${absolutePathEndsWithGit ? '' : `${sep}.git`}${sep}FETCH_HEAD`) ||
path.startsWith(`${absolutePath}${absolutePathEndsWithGit ? '' : `${sep}.git`}${sep}HEAD`)
) {
getRepoInfo({path: rootFolderPath})
.then(repo => {
thunkAPI.dispatch(setRepo(repo));
Expand Down

0 comments on commit 3b506ee

Please sign in to comment.