# [PATCH] Append ampersand to "Target" of lnk files created by do_cygwin_shortcut

2 messages from 2009-03-09 to 2009-03-09. Participants: Phil Lawrence, Shawn O. Pearce.
Thread: https://gitlist.dev/t/18235

## Phil Lawrence, 2009-03-09 22:09

Subject: [PATCH] Append ampersand to "Target" of lnk files created by do_cygwin_shortcut
Message-ID: <530ac78e0903091509y5209dec9q4c716d1e400357f3@mail.gmail.com>
URL: https://gitlist.dev/e/530ac78e0903091509y5209dec9q4c716d1e400357f3%40mail.gmail.com

```
On Mon, Mar 9, 2009 at 4:12 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> <snip!>
>
> Could you add those explanations to the commit message?

Done:

>From 0780db8d53bdd0bb02b154d23c3c80bcccc0d955 Mon Sep 17 00:00:00 2001
From: Phil Lawrence <prlawrence@gmail.com>
Date: Thu, 5 Mar 2009 17:56:58 -0600
Subject: [PATCH] Append ampersand to "Target" of lnk files created by
do_cygwin_shortcut

The git-gui menu item "Repository | Create Desktop Icon" creates a
shortcut (.lnk file) on the Windows desktop.  The purpose of the
created shortcut is to make it easy for a user to launch git-gui
for a particular repo in the future.

A Windows user would expect to see git gui launch when they click
the shortcut; they would not expect (nor want) to see a cmd window
open and remain open in the background.

msysGit avoids opening a command window altogether when it's Git GUI
shortcut is used.  Ideally, git on cygwin would also have shortcuts
that simply open the GUI, but as a first step, this change allows
the shell window to politely disappear after starting git gui as a
background process.

Signed-off-by: Phil Lawrence <prlawrence@gmail.com>
---
 lib/shortcut.tcl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/shortcut.tcl b/lib/shortcut.tcl
index 38c3151..2f20eb3 100644
--- a/lib/shortcut.tcl
+++ b/lib/shortcut.tcl
@@ -54,7 +54,7 @@ proc do_cygwin_shortcut {} {
                                        $argv0]
                                win32_create_lnk $fn [list \
                                        $sh -c \
-                                       "CHERE_INVOKING=1 source
/etc/profile;[sq $me]" \
+                                       "CHERE_INVOKING=1 source
/etc/profile;[sq $me] &" \
                                        ] \
                                        [file dirname [file normalize [gitdir]]]
                        } err]} {
--
1.6.1.9.g97c34

Phil Lawrence

```

## Shawn O. Pearce, 2009-03-09 23:23

Subject: Re: [PATCH] Append ampersand to "Target" of lnk files created by do_cygwin_shortcut
Message-ID: <20090309232300.GK11989@spearce.org>
URL: https://gitlist.dev/e/20090309232300.GK11989%40spearce.org
In-Reply-To: <530ac78e0903091509y5209dec9q4c716d1e400357f3@mail.gmail.com>

```
Phil Lawrence <prlawrence@gmail.com> wrote:
> From 0780db8d53bdd0bb02b154d23c3c80bcccc0d955 Mon Sep 17 00:00:00 2001
> From: Phil Lawrence <prlawrence@gmail.com>
> Date: Thu, 5 Mar 2009 17:56:58 -0600
> Subject: [PATCH] Append ampersand to "Target" of lnk files created by
> do_cygwin_shortcut
> 
> The git-gui menu item "Repository | Create Desktop Icon" creates a
> shortcut (.lnk file) on the Windows desktop.  The purpose of the
> created shortcut is to make it easy for a user to launch git-gui
> for a particular repo in the future.

Thanks.  The patch was white space damaged, but being only 2
characters it was easier for me to just redo the change than
to ask you to resend the patch.
 
> @@ -54,7 +54,7 @@ proc do_cygwin_shortcut {} {
>                                         $argv0]
>                                 win32_create_lnk $fn [list \
>                                         $sh -c \
> -                                       "CHERE_INVOKING=1 source
> /etc/profile;[sq $me]" \
> +                                       "CHERE_INVOKING=1 source
> /etc/profile;[sq $me] &" \
>                                         ] \
>                                         [file dirname [file normalize [gitdir]]]
>                         } err]} {

-- 
Shawn.

```
