On Fri, Jul 01, 2022 at 07:01:07AM -0700, Francesco Scappatura wrote:

> Changing branch is always annoying because IDE only shows most recent used 
> files independently from the branch you are on. So especially in big 
> project, after a branch switch you usually have to go find your files 
> manually.
> 
> What do you think about introducing a new feature for keeping track of 
> recently used file separately for each branch ?
> 
> e.g 
> master 
> file 1 file 2 file 3
> feature 
> file 1 file 5 file 9
> 
> Then IDE developer can rely on this file in order to populate recently used 
> file list. Please let me know your thoughts.

I'm not really sure why one need to rely on Git to implement this in IDE.

Your

> master 
> file 1 file 2 file 3
> feature 
> file 1 file 5 file 9

is just a map (a key to value mapping):

 master: [file1, file2, file3]
 feature: [file1, file5, file9]

and implementing some sort of persistent storage of such a mapping is a
no-brainer task even for newbie software programmer.

To "connect" such a mapping to Git, an IDE could install a so-called
"post-checkout" hook (Git has "hooks" to make it possible to programmatically
implement handling of the events of certain classes) which would be executed
by Git each time a new commit (or a branch) is checked out.

A program hooked to the post-checkout even has access to the reference (a
branch is one sort of reference in Git's parlance) which has been checked out
before the new checkout has happened, so such a program could tell the IDE
it communicates with something like "hey, update the mapping for the
such-and-such reference and then restore the mapping for the that-and-that
reference".

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/20220701183834.r4jbctylnmlhg2fe%40carbon.

Reply via email to