Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specification of arbitrary point in git history as the diff target in committed changes context mode #225

Open
cmrgKoradir opened this issue Apr 24, 2024 · 5 comments

Comments

@cmrgKoradir
Copy link

For debugging purposes, it's useful to be able to point at e.g. the last release. And try and chat with Codiumate about the changes since then.
I'd like to not have to create and push artificial branches just so I can talk to codiumate about it.

IS
The user needs to create a branch and push it to remote if they want to specify it as a comparison target.

SHOULD
Allow commit hashes and tags to be specified as a diff target.

@ArtsiomCh
Copy link
Collaborator

Seems like you will be able to achieve what you want without creating extra branches with soon released Local Changes mode (presently available in our VSCode extension only).
Pull latest changes (main) and then reset head to the commit (with keeping file's changes) you want to start review/discuss from.
Then just use Local Changes mode.

@cmrgKoradir
Copy link
Author

@ArtsiomCh Sure, soft reset on a revision would put all the changes since then into the index, but you also lose the ability to differentiate between your current and past changes.

So what would your suggestion be? Have two local repositories, open in two separate instances of IntelliJ and use one to work in and the other to talk to Codium about past changes? And then manually copy code between the instances?

That's an even worse workaround than pushing an obsolete branch to remote.

@ArtsiomCh
Copy link
Collaborator

Didn't get you... You want to deal with two types of changes in the same time: uncommitted changes and committed since some commit/hash ?
If so, there is no such ability and probably will no be.

@cmrgKoradir
Copy link
Author

cmrgKoradir commented Apr 24, 2024

I want to reason about past changes in order to make current changes.

just talking about code is of limited value by itself, I actually want to do something with the result of that discussion.

In your workaround, resetting your head to the commit from which you want to include the changes moves all past changes into the "current" changes from git's pov.

So there's two workflows available if you want to use the "local changes" mode for this purpose, whenever that becomes available:

  1. after every tiny change commit/amend to a WIP commit and reset to your diff target in order to continue the discussion with codiumate, then after each question reset to your WIP commit and amend it based on the answer(s) you got from codiumate, then reset to the diff target again to continue the conversation, and so on.

  2. have two repositories, one where you actually keep working, and the other where you have reset to your diff target so you can talk about the changes with codiumate, then manually copy snippets between the instances

Neither of these approaches sounds very intuitive or user-friendly to me.
So I might just as well create an obsolete branch, push that to remote and not use the "local changes" mode at all, which spares me all that hassle.

@ArtsiomCh
Copy link
Collaborator

For discussion with Codiumate about any piece of code (doesn't matter if it was currently changed or before) we'll introduce ability to add any arbitrary pieces of code to context for AI.
Work is already in progress, so expect that in coming weeks.

@ArtsiomCh ArtsiomCh reopened this Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants