From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Johannes Sixt <J.Sixt@eudaptics.com>,
Marius Storm-Olsen <marius@trolltech.com>,
git@vger.kernel.org
Subject: [PATCH] Make git-k an alias to gitk
Date: Wed, 30 May 2007 04:03:53 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0705300402050.4011@racer.site> (raw)
In-Reply-To: <fcaeb9bf0705291145q6a0d276o6a94ded3c3e0b6d1@mail.gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
On Tue, 29 May 2007, Nguyen Thai Ngoc Duy wrote:
> On 5/29/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> > Nguyen Thai Ngoc Duy wrote:
> > > I'd suggest create a small C wrapper to launch gitk. It
> > > would be much easier that way IMHO.
> >
> > Doh! You're right! It's even there already, right before our
> > eyes:
> >
> > pointy..clicky..pointy..clicky (aka: cp gitk git-k)
> >
> > $ git k
> >
> > :)
>
> Maybe we should teach git.c to try gitk if git-k is not found ;)
Something like this?
Makefile | 2 +-
git.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 5f94630..01ab1ff 100644
--- a/Makefile
+++ b/Makefile
@@ -262,7 +262,7 @@ EXTRA_PROGRAMS =
BUILT_INS = \
git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
git-get-tar-commit-id$X git-init$X git-repo-config$X \
- git-fsck-objects$X git-cherry-pick$X \
+ git-fsck-objects$X git-cherry-pick$X git-k$X \
$(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
# what 'all' will build and 'install' will install, in gitexecdir
diff --git a/git.c b/git.c
index 04eb344..53d81e9 100644
--- a/git.c
+++ b/git.c
@@ -216,6 +216,11 @@ static int handle_alias(int *argcp, const char ***argv)
return ret;
}
+static int cmd_gitk(int argc, const char **argv, const char *prefix)
+{
+ return execv("gitk", (char *const *)argv);
+}
+
const char git_version_string[] = GIT_VERSION;
#define RUN_SETUP (1<<0)
@@ -274,6 +279,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
{ "help", cmd_help },
{ "init", cmd_init_db },
{ "init-db", cmd_init_db },
+ { "k", cmd_gitk },
{ "log", cmd_log, RUN_SETUP | USE_PAGER },
{ "ls-files", cmd_ls_files, RUN_SETUP },
{ "ls-tree", cmd_ls_tree, RUN_SETUP },
--
1.5.2.2641.g404de-dirty
next prev parent reply other threads:[~2007-05-30 3:05 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 1:13 GIT on MinGW problem Aaron Gray
2007-05-12 1:17 ` Junio C Hamano
2007-05-12 2:25 ` Aaron Gray
2007-05-12 3:30 ` Han-Wen Nienhuys
2007-05-25 8:49 ` Johannes Sixt
2007-05-25 9:45 ` Marco Costalba
2007-05-25 10:20 ` Johannes Schindelin
2007-05-25 11:07 ` Johannes Sixt
2007-05-26 19:42 ` Han-Wen Nienhuys
2007-05-26 22:17 ` Johannes Schindelin
2007-05-27 6:56 ` Han-Wen Nienhuys
2007-05-27 10:52 ` Johannes Schindelin
2007-05-27 17:04 ` Han-Wen Nienhuys
2007-05-28 16:54 ` Nix
2007-05-27 20:44 ` Han-Wen Nienhuys
[not found] ` <Pine.LNX.4.64.0705272213350.4648@racer.site>
[not found] ` <f329bf540705271417k1874c1f2u3acc98dc25e058b9@mail.gmail.com>
2007-05-27 21:26 ` Johannes Schindelin
2007-05-25 21:37 ` Aaron Gray
2007-05-26 19:41 ` Han-Wen Nienhuys
2007-05-26 22:26 ` Johannes Schindelin
2007-05-26 22:39 ` Junio C Hamano
2007-05-26 22:45 ` Johannes Schindelin
2007-05-26 22:53 ` Han-Wen Nienhuys
2007-05-26 23:47 ` Jakub Narebski
2007-05-27 6:30 ` Han-Wen Nienhuys
2007-05-27 6:39 ` Shawn O. Pearce
2007-05-27 7:02 ` Han-Wen Nienhuys
2007-05-27 7:21 ` Steven Grimm
2007-05-27 9:09 ` Jakub Narebski
2007-05-27 23:18 ` Han-Wen Nienhuys
2007-05-28 0:04 ` Johannes Schindelin
2007-05-28 0:31 ` Han-Wen Nienhuys
2007-05-27 10:46 ` Johannes Schindelin
2007-05-27 18:50 ` Han-Wen Nienhuys
2007-05-27 19:52 ` GIT on MinGW, with tcltk for gitk Han-Wen Nienhuys
2007-05-27 20:39 ` Aaron Gray
2007-05-27 21:19 ` Han-Wen Nienhuys
2007-05-27 21:24 ` Aaron Gray
2007-05-27 21:39 ` Aaron Gray
2007-05-27 21:55 ` Han-Wen Nienhuys
2007-05-27 22:22 ` Aaron Gray
2007-05-27 22:28 ` Han-Wen Nienhuys
2007-05-27 22:56 ` GIT on MinGW - No symbolic links support Aaron Gray
2007-05-27 23:56 ` Johannes Schindelin
2007-05-29 7:11 ` Johannes Sixt
2007-05-27 22:22 ` GIT on MinGW, with tcltk for gitk Han-Wen Nienhuys
2007-05-29 10:54 ` GIT on MinGW problem Johannes Sixt
2007-05-29 11:45 ` Marius Storm-Olsen
2007-05-29 12:10 ` Johannes Sixt
2007-05-29 14:29 ` Han-Wen Nienhuys
2007-05-29 14:49 ` Johannes Sixt
2007-05-29 12:11 ` Johannes Schindelin
2007-05-29 13:05 ` Marius Storm-Olsen
2007-05-29 13:24 ` Johannes Sixt
2007-05-29 14:36 ` Marius Storm-Olsen
2007-05-29 13:47 ` Johannes Schindelin
2007-05-29 14:13 ` Johannes Sixt
2007-05-29 15:28 ` Nguyen Thai Ngoc Duy
2007-05-29 15:47 ` Johannes Sixt
2007-05-29 18:45 ` Nguyen Thai Ngoc Duy
2007-05-30 3:03 ` Johannes Schindelin [this message]
2007-05-30 7:06 ` [PATCH] Make git-k an alias to gitk Johannes Sixt
2007-05-30 2:16 ` GIT on MinGW problem Han-Wen Nienhuys
2007-05-30 2:39 ` Johannes Schindelin
2007-05-30 2:57 ` Shawn O. Pearce
2007-05-30 3:25 ` [PATCH] Git wrapper: add --redirect-stderr option Johannes Schindelin
2007-05-30 3:38 ` Shawn O. Pearce
2007-05-30 3:45 ` Johannes Schindelin
2007-05-30 3:53 ` Shawn O. Pearce
2007-05-30 4:12 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0705300402050.4011@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=J.Sixt@eudaptics.com \
--cc=git@vger.kernel.org \
--cc=marius@trolltech.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).