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

Windows: hide git application window. #381

Merged
merged 1 commit into from Jun 17, 2015
Merged

Conversation

bozaro
Copy link
Contributor

@bozaro bozaro commented Jun 11, 2015

Original problem (https://code.google.com/p/tortoisegit/issues/detail?id=2518):

  1. Install Git LFS (https://git-lfs.github.com/)
    • Download and unpack archive;
    • Put git-lfs.exe on any avaialble in PATH directory;
    • Run "git lfs init"
  2. Clone repository from: https://github.com/bozaro/test
  3. Change image "tux.png"
  4. Show "Git Commit" window

On showing "Git Commit" window you will see black window blink for each changed LFS file (twice in this case).

You also will see black window blink on refreshing change list by F5 key.

@bozaro bozaro force-pushed the blinking branch 2 times, most recently from 2fa1c18 to d630ed3 Compare June 11, 2015 12:21
@technoweenie technoweenie mentioned this pull request Jun 11, 2015
38 tasks
@technoweenie
Copy link
Contributor

Awesome! This issue came up in internal testing, but we weren't sure what we could do about it.

I want to review and include this with a new v0.5.2 release next week. #281

If other Windows users can vouch for this, that'd be great. Windows is not my primary OS.

@bozaro: Is there a way to replicate this on Windows without Tortoise?

@@ -7,7 +7,6 @@ import (
"io"
"os/exec"
"strings"

"github.com/github/git-lfs/vendor/_nuts/github.com/rubyist/tracerx"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the empty line again? This is the import formatting done by goimports. If you have it installed, you can use script/fmt to format the git-lfs code.

Here's how you can update this PR (replace editor with the editor of your choice; only needed if you don't have goimports):

$ editor git/git.go
$ script/fmt
$ git add --patch git/git.go
$ git commit --amend
$ git push <remote> <localbranch>:blinking

@michael-k
Copy link
Contributor

👍 for using build tags!

@bozaro
Copy link
Contributor Author

bozaro commented Jun 12, 2015

@technoweenie
To reproduce the problem you need to run git-lfs without windows.
I know two ways to do this:

  • Run from another application (in this case TortoiseGit);
  • Compile the program as a GUI-application and run:go build -ldflags "-H=windowsgui"

@bozaro
Copy link
Contributor Author

bozaro commented Jun 13, 2015

@technoweenie
Important note: when the problem was detected, the blinking was due to call git version. This call has been removed in #382.

When I tried to fix the problem, to run without TortoiseGit I used the following trick: I remove changes from #382 and build git-lfs as GUI-application: go build -ldflags "-H=windowsgui"
After that I simply run git-lfs without any arguments:

  • Expected result: silent run without any blinking console windows;
  • Actual result: on application run shown black console window for short time.

@bozaro
Copy link
Contributor Author

bozaro commented Jun 17, 2015

Do I need anything else from me to solve this problem?
The problem of flashing windows is showstopper for using git-lfs and TortoiseGit (perhaps it affect any more GUI for git).

@michael-k
Copy link
Contributor

This pull request contains merge conflicts that must be resolved.

The signature of execCommand has changed upstream. Please remove the parameter stdin io.Reader and

if stdin != nil {
    cmd.Stdin = stdin
}

A rebase would be helpful.

Original problem (https://code.google.com/p/tortoisegit/issues/detail?id=2518):

 1. Install Git LFS (https://git-lfs.github.com/)
   * Download and unpack archive;
   * Put git-lfs.exe on any avaialble in PATH directory;
   * Run "git lfs init"
 2. Clone repository from: https://github.com/bozaro/test
 3. Change image "tux.png"
 4. Show "Git Commit" window

On showing "Git Commit" window you will see black window blink for each changed LFS file (twice in this case).

You also will see black window blink on refreshing change list by F5 key.
@bozaro
Copy link
Contributor Author

bozaro commented Jun 17, 2015

@michael-k
Updated commit.

@technoweenie
Copy link
Contributor

I was hoping someone else on Windows would chime in. I'll do some Windows QA for the v0.5.2 launch though. Thanks so much for filling in our Windows knowledge gaps 👍

technoweenie added a commit that referenced this pull request Jun 17, 2015
Windows: hide git application window.
@technoweenie technoweenie merged commit 07c3844 into git-lfs:master Jun 17, 2015
@bozaro bozaro deleted the blinking branch March 10, 2017 19:31
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

Successfully merging this pull request may close these issues.

None yet

3 participants