Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Git Rename File
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dmayola
Junior Member

Spain
13 Posts

Posted - Mar 16 2022 :  12:32:59 PM  Show Profile  Reply with Quote
Hello,

Is there any way I could rename files but use git mv instead of a simple rename?

Ref: https://docs.wholetomato.com/default.asp?W287

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 18 2022 :  07:17:00 AM  Show Profile  Reply with Quote
The idea is interesting, I have opened a feature request to keep an eye on it:

case=147954

but what happens if you are not using git as your source control system? Not everyone does after all.

VA its self isn't going to know the login details for git, so it won't have permission by its self to issue this command.

zen is the art of being at one with the two'ness
Go to Top of Page

dmayola
Junior Member

Spain
13 Posts

Posted - Mar 22 2022 :  05:16:43 AM  Show Profile  Reply with Quote
You can probably check if you are in a git repository (for instance, git status will fail if you are not in one), and a checkbox in VS settings wouldn't hurt, just in case someone doesn't want to use it.
Also, regarding permissions, I don't think it's a problem, I wouldn't expect VA to commit my files right away, just make sure VA renames it using git mv. So, I can commit it manually later.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 22 2022 :  08:41:06 AM  Show Profile  Reply with Quote
I don't use git, so this might be a stupid question, but don't you need to know some more details than just the file name, like the repository it maps to? Or are you guaranteed no overlap?

zen is the art of being at one with the two'ness
Go to Top of Page

dmayola
Junior Member

Spain
13 Posts

Posted - Mar 24 2022 :  05:07:26 AM  Show Profile  Reply with Quote
You don't need to know about the repository since this data is already stored in your local folder, under .git folder.
Names can be duplicated as far they are not in the same folder, the same as a regular filesystem, and in case you do a git mv current_file.txt new_file.txt where new_file.txt already exists, it will report an error fatal: destination exists
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 24 2022 :  09:51:28 AM  Show Profile  Reply with Quote
Useful to know, thank you, I have added a note about this to the case.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000