Skip to content

Git pull on settings with local branch and without remote throws exception #611

Description

@jan-vcapgemini

Expected behavior

As an IDEasy user I expect to be informed when I've set the wrong branch on my settings repository.

Actual behavior

When I checkout a local branch without a remote and run any ide command I get following exception:

$ ide -t --version
java.lang.IllegalStateException: Running command 'C:\Program Files\Git\mingw64\bin\git.exe' with arguments 'rev-parse' '@{u}' failed: Running command 'C:\Program Files\Git\mingw64\bin\git.exe' with arguments 'rev-parse' '@{u}' failed with exit code 128!
        at com.devonfw.tools.ide.process.ProcessContextImpl.run(ProcessContextImpl.java:173)
        at com.devonfw.tools.ide.context.GitContextImpl.isRepositoryUpdateAvailable(GitContextImpl.java:74)
        at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:862)
        at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:788)
        at com.devonfw.tools.ide.cli.Ideasy.runOrThrow(Ideasy.java:89)
        at com.devonfw.tools.ide.cli.Ideasy.run(Ideasy.java:52)
        at com.devonfw.tools.ide.cli.Ideasy.main(Ideasy.java:29)
        at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: com.devonfw.tools.ide.cli.CliException: Running command 'C:\Program Files\Git\mingw64\bin\git.exe' with arguments 'rev-parse' '@{u}' failed with exit code 128!
        at com.devonfw.tools.ide.process.ProcessContextImpl.performLogOnError(ProcessContextImpl.java:289)
        at com.devonfw.tools.ide.process.ProcessContextImpl.run(ProcessContextImpl.java:164)
        ... 7 more


Error: IDEasy failed with exit code 255

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. Go to yourproject/settings
  2. Run: git checkout -b testbranch
  3. try to run ide -t --version

Related/Dependent Issues

Comments/Hints:

Affected version:

  • OS: Windows
  • IDEasy: 2024.09.002-beta-SNAPSHOT

Metadata

Metadata

Assignees

Labels

gitgit version management tool integrationready-to-implementsettingside-settings repo and replated processes and features

Type

Fields

No fields configured for Bug.

Projects

Status
✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions