Comments (12)
This reproduction recipe is not sufficient to reproduce reliably; please come up with a script that does.
from git.
There's no script, this happens when checking out via Windows context menu. Sorry I forgot to mention it.
from git.
You seem to not be able to grok what @kusma wanted to communicate to you, so here's an expanded version:
-
You're using Git from within TortoiseGit (which can be inferred from you "checking out via Windows context menu");
-
Git for Windows (which you call msysgit) is not TortoiseGit, and if you're about reporting a problem in Git for Windows itself, you have to demonstrate how that problem manifests itself in plain Git for Windows.
-
The standard way to provide such demonstration is to capture a Git session exhibiting the problem.
To do this, you drop into a shell, cd
to your project directory, pefrorm steps 2 through 3 from your original bug report then run git branch
to show the branch wasn't changed after performing step 3. Then you copy the session text (the commands you type and the output they produce) to the clipboard and paste it here so the devs are able to analyze it.
It might also happen that you will see Git either somehow complaining when not switching branches or actually switching the branch (the exact behaviour depends on whether Git will encounter any conflicts).
This would mean the problem is not with Git but rather with TortoiseGit.
It might also happen that Git does complain when switching branches, but, say, fails to return a non-zero exit code, and TortoiseGit (wrongly) decides to not show the output Git produced since it signalized success.
In any case, it's all just guessing. Provide a transcript of your Git session for the further discussion to have any sense.
from git.
Ok, guys, I got it.
Installed http://msysgit.googlecode.com/files/Git-1.7.11-preview20120710.exe on a fresh machine (NO Tortoise or other VCS clients).
Here's the script
md c:\tmp
cd c:\tmp
git init
echo lala > test
git add test
git commit -m test
git checkout -b new
git checkout master
echo test2 > test2
git add test2
git commit -m test2
echo test2 again > test2
git checkout new
Here's what I get:
C:\tmp>git init
Initialized empty Git repository in C:/tmp/.git/
C:\tmp>echo lala 1>test
C:\tmp>git add test
C:\tmp>git commit -m test
[master (root-commit) 1205ed8] test
1 file changed, 1 insertion(+)
create mode 100644 test
C:\tmp>git checkout -b new
Switched to a new branch 'new'
C:\tmp>git checkout master
Switched to branch 'master'
C:\tmp>echo test2 1>test2
C:\tmp>git add test2
C:\tmp>git commit -m test2
[master af96777] test2
1 file changed, 1 insertion(+)
create mode 100644 test2
C:\tmp>echo test2 again 1>test2
C:\tmp>git checkout new
error: Your local changes to the following files would be overwritten by checkou
t:
test2
Please, commit your changes or stash them before you can switch branches.
Aborting
This is normal, ok.
But now I perform explorer context menu > Git branch > new.
Git silently fails without any error message.
Btw, Tortoise here works fine, i.e. it shows git error in the log.
from git.
So everything WORKS when you use Git for Windows, but does not when you use TortoiseGit? Then why are you reporting this to the Git for Windows developers rather than the TortoiseGit developers?
from git.
kusma, you don't understand.
Everything works when using MSysGit via CLI.
Everything works when using MSysGit + Tortoise.
DOESN'T work when using MSysGit via Windows context menu.
This menu (http://i.imgur.com/kYxgI.png) is a MSysGit one, isn't it?
from git.
I wonder if that menu option is provided by Git Cheetah.
I never enable its installation and only have the "Git GUI here" context-menu option (I also could have "Git bash here" as well, but I disable this when installing).
You could run regedit.exe and search for the "Git branch" string, exactly -- that would find a registry record for that context menu extension, and in that record you will be able to see the command which gets executed when that menu entry is activated.
from git.
Fr0st-Brutal: Thanks for making that clear. It's a Git-Cheetah menu, as kostix points out.
This seems to fix it for me:
diff --git a/common/cheetahmenu.c b/common/cheetahmenu.c
index 8b75c62..a153fe6 100644
--- a/common/cheetahmenu.c
+++ b/common/cheetahmenu.c
@@ -264,7 +264,7 @@ static int menu_branch(struct git_data *this_, UINT id)
status = exec_program_v(wd, NULL, &err, HIDDENMODE | WAITMODE, argv);
/* if nothing, terribly wrong happened, show the confirmation */
- if (-1 != status)
+ if (status)
/* strangely enough even success message is on stderr */
debug_git_mbox(err.buf);
from git.
Fine! We finally understood each other.
kusma, the fix will be available in the next release, I guess? I just don't have tools to compile all the stuff myself.
from git.
I didn't say that was "the fix", i said it worked for me. The next step is for you to apply this patch and build so you can verify that it works for you too.
from git.
@Fr0sT-Brutal see https://github.com/msysgit/msysgit/wiki/GitCheetah
from git.
@Fr0sT-Brutal Git for Windows -- and consequentially, Git Cheetah -- is a project that only is what it is because of volunteer-driven efforts. Waiting for others to scratch your itches won't solve them, most of the time.
Unfortunately, it seems that this is exactly such a time.
from git.
Related Issues (20)
- Redirect to Git for Windows 2.x HOT 10
- Why I am not able to use curl commands ? HOT 1
- "Entrust Root Certification Authority - G2" is not trusted HOT 5
- .git subdirectory is created in the wrong place on checkout when using relative directory HOT 16
- umeng123
- Windows installer not cryptographically signed. HOT 3
- Using mingw-perl HOT 5
- git rev-list crashes when --show-notes and --grep are specified HOT 2
- Git SVN crash HOT 3
- Git daemon and TortoiseGit HOT 2
- fox
- Git Blame - file.dot is not a Word Document HOT 3
- Missing patch tool for release candidate of Git for Windows. HOT 1
- Custom mergetool cmd support in git GUI HOT 1
- Git.exe is stuck if I run a wrong command. HOT 1
- Not able to clone gerrit repo over https via gitbash(windows client) HOT 5
- please add a release to announce the move of release downloads to the git-for-windows repo HOT 7
- <invalid>
- Filename too long when cloning a repo HOT 3
- Cannot Create Shortcut, Cannot Find App, Cannot Open App HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git.