-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Creating batch script to start Git-SDK, is it possible to specify a specific $HOME directory? #736
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
Comments
What is
I think you meant
Why not just call
Yes, you are! 😃 |
OK, have fixed the variable And I have set the executable to be Update: I discovered even if I don't use my script I am still having this problem:
|
Do you know where this |
Yes the account name is
|
I usually start my git-bash inside of the SDK with Remark: Public is a special account which is used as something like a base for all users. It should not be used for working. The public directory / user / group is always there, without creating it. |
This does not set |
From what I can gather this all is dependent on SSH does provide a configuration option to specify the identity file:
This may be a short-term solution as other problems may crop up from this |
I apologize from the start—my previous post is in error. I had forgot that I had edited the
And forgot that I had done so before making that ssh configuration. When I use the current setting:
... there is still a problem. Therefore the answer on the previous post, if the user wants to define a custom Apologize for any inconvenience that this may have caused. |
@Todd-Weed sorry, I lost track and do not have time to re-read the entire thread carefully. Is the original report still valid, i.e. is there a bug we need to fix in Git for Windows (or its SDK)? |
Setting a custom |
Well, this is what we have to fix, then. Give me access to a machine where this is a problem and I'll fix it. Alternatively, I can help you debug it (but this is not something for the lazy of heart, it will require a little bit of work and effort). |
Happening to me - neither the default My setup:
export HOME='J:\'
cd "$HOME"
. "$HOME/.config/sh/shrc" Note that setting |
For the record: the Patches welcome. |
Just making some notes... https://github.com/git-for-windows/git/blob/master/compat/win32/git-wrapper.c#L56-L58 is the comment that starts the setting of Homedrive etc. https://github.com/git-for-windows/git/blob/master/compat/win32/git-wrapper.c#L389-L429 look to be the checking of the cmd line arguments for options. Looks like it won't be that hard for a volunteer to have a go. All the framework examples are there to copy... |
I can't set my $HOME using I tried setting db_home the following values:
When I start
I really want my Git setup to be 100% portable and don't want it to rely on Windows environment variables. |
@dogancelik it is really not nice to hide a request for help in a different ticket. A much better venue would have been the Git for Windows mailing list/forum. As to your question, The proper way to address your problem would be to patch the git-wrapper to set One such way would be to add another resource setting (similar to |
@dscho I'm sorry about that, I didn't want to open up a new issue so I asked here, so I have to set |
I'll close this for now. If anybody feels strongly enough about this issue, there is tons of information in my comments above how to fix this, and I'll still be here if anybody gets stuck implementing the new feature. |
The microsoft/git fork includes pre- and post-command hooks, with the initial intention of using these for VFS for Git. In that environment, these are important hooks to avoid concurrent issues when the virtualization is incomplete. However, in the Office monorepo the post-command hook is used in a different way. A custom hook is used to update the sparse-checkout, if necessary. To avoid this hook from being incredibly slow on every Git command, this hook checks for the existence of a "sentinel file" that is written by a custom post-index-change hook and no-ops if that file does not exist. However, even this "no-op" is 200ms due to the use of two scripts (one simple script in .git/hooks/ does some environment checking and then calls a script from the working directory which actually contains the logic). Add a new config option, 'postCommand.strategy', that will allow for multiple possible strategies in the future. For now, the one we are adding is 'post-index-change' which states that we should write a sentinel file instead of running the 'post-index-change' hook and then skip the 'post-command' hook if the proper sentinel file doesn't exist. (If it does exist, then delete it and run the hook.) --- This fork contains changes specific to monorepo scenarios. If you are an external contributor, then please detail your reason for submitting to this fork: * [ ] This is an early version of work already under review upstream. * [ ] This change only applies to interactions with Azure DevOps and the GVFS Protocol. * [ ] This change only applies to the virtualization hook and VFS for Git. * [x] This change only applies to custom bits in the microsoft/git fork.
This feature was introduced in #736 but had a few pain points that were discovered when testing the full replacement of the existing post-index-change and post-command hooks in our internal environment: 1. When using `core.hooksPath` to point to a directory within the worktree, the sentinel files were being written into the worktree. Write to `$GITDIR/info/` instead. 2. The existing internal post-index-change hook only signaled that work needed to be done if actually the _worktree_ changed. Make the sentinel file logic more restrictive to only write in these cases. Tests are added to confirm both of these behavior changes. To reflect the changed behavior, the name `post-index-change` was renamed to `worktree-change`.
Setup
Details
Question
I am trying to create a batch script to start
start_shell.cmd
with a specific (i.e. alternate$HOME
directory). Is this possible to do? Here is my script:This will set my
$HOMEDRIVE
,$HOMEPATH
, and$HOME
toD:
,\
, and/d
respectively. The script does start the shell knowing the D drive. Unfortunately... for this to work with SSH is going to take more knowledge:Is there something I can do to make this happen? The only relavent information I have found is this article and not enough details exist for me to attempt it.
If their is time available for help, I would be much appreciated.
The text was updated successfully, but these errors were encountered: