git-gui console app ?

Previous thread: [RFC/PATCH] update-index: Add a --refresh-only option to refresh specified files. by Alexandre Julliard on Saturday, August 4, 2007 - 5:59 am. (3 messages)

Next thread: Terminology question about remote branches. by David Kastrup on Saturday, August 4, 2007 - 6:55 am. (36 messages)
To: <git@...>
Date: Saturday, August 4, 2007 - 6:10 am

Hello !

git-gui is a nice application and I like to use it while developping.
However as probably a lot of developpers do, I regularly code in Emacs
from a distant ssh client.
Therefor I'd want to find some app like git-gui running in console...
Does this exist or is there a project in development ?

Thanks for info

--
Erik
-

To: Erik Colson <eco@...>
Cc: <git@...>
Date: Saturday, August 4, 2007 - 7:29 am

Hi,

There is tig. http://repo.or.cz/w/tig.git

It is something similar to gitk but based on curses, so it is a viewer for
now. But I do not see any fundamental reason why it should not be
possible to teach it many of the tricks git-gui does.

Just fork it (you can even do that on repo.or.cz; tig.git is mirrored
there), and give it a go!

Ciao,
Dscho

-

To: <git@...>
Date: Saturday, August 4, 2007 - 7:53 am

Thanks for the very fast answer. I'm currently trying it out. However
I can't figure out how to view the 'changed but not updated' in diff
format...
Any clue what I'm missing ?

--
Erik
-

To: <git@...>
Date: Saturday, August 4, 2007 - 8:03 am

git-diff ?

By default, it will show the changes between your working tree and the
index (i.e., changed but not updated). You can show the diff of "updated
but not commited" with "git-diff --cached".

-Peff
-

To: <git@...>
Date: Saturday, August 4, 2007 - 8:38 am

Peff,

yep that is the info I would like to browse in a way git-gui does it...
showing a list of the files in the diff, and letting the user select a
file to show the part of the diff for that file.

--
Erik
-

To: Erik Colson <eco@...>
Cc: Jonas Fonseca <fonseca@...>, <git@...>
Date: Sunday, August 5, 2007 - 6:19 am

Ah, I see. There is a status mode for tig (tig -S), but you can't jump
to the diff of a particular file. It shouldn't be that difficult to add
for somebody familiar with the tig codebase, but I am not such a
somebody.

Jonas, am I right that this should be a one-liner? If you can point me
in the right direction, I can try to take a closer look, but I'm having
trouble following the code.

-Peff
-

To: Jeff King <peff@...>
Cc: Erik Colson <eco@...>, <git@...>
Date: Friday, August 10, 2007 - 9:31 am

Not quite a one-liner, but I've implemented something that will show
diffs of staged/unstaged changes as well as the content of untracked
files when pressing Enter on a file in the status view. To update the
status of a file (unstaged->staged, untracked->staged, etc) you now
have to press 'u'.

Hope this helps.

--
Jonas Fonseca
-

To: <git@...>
Date: Friday, August 10, 2007 - 10:25 am

Works like a charm ! Thanks for the implementation. Btw, I'm using
git (and tig) on MacosX and got it compiled by using the same remarks
you mention for FreeBSD, so may be you could add this to the INSTALL
document...

--
Erik
-

To: Erik Colson <eco@...>, <git@...>
Date: Saturday, August 11, 2007 - 6:22 am

Good to hear.

Now, I have to figure out how to clone git-gui's ability to stage

Yes, it might be a good idea to add it, but I would like to add
a configure script to figure this sort of thing out automatically.

--
Jonas Fonseca
-

To: Jonas Fonseca <fonseca@...>
Cc: Erik Colson <eco@...>, <git@...>
Date: Friday, August 10, 2007 - 10:21 am

Nice. This was exactly what I had envisioned. Minor help text fixup is
below.

-Peff

-- >8 --
status window: mention 'u' instead of Enter

Commits ca1d71ea and 89d917a bound the Enter functionality
to 'u' (and Enter now shows the diff).

Signed-off-by: Jeff King <peff@peff.net>
---
tig.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tig.c b/tig.c
index d9c9df8..40670e2 100644
--- a/tig.c
+++ b/tig.c
@@ -3156,15 +3156,15 @@ status_select(struct view *view, struct line *line)

switch (line->type) {
case LINE_STAT_STAGED:
- text = "Press Enter to unstage file for commit";
+ text = "Press 'u' to unstage file for commit";
break;

case LINE_STAT_UNSTAGED:
- text = "Press Enter to stage file for commit ";
+ text = "Press 'u' to stage file for commit ";
break;

case LINE_STAT_UNTRACKED:
- text = "Press Enter to stage file for addition";
+ text = "Press 'u' to stage file for addition";
break;

case LINE_STAT_NONE:
--
1.5.2.4

-

To: Jeff King <peff@...>
Cc: Erik Colson <eco@...>, <git@...>
Date: Saturday, August 11, 2007 - 6:11 am

Thanks! I forgot to mention that I applied something like what you
sent yesterday.

--
Jonas Fonseca
-

To: Erik Colson <eco@...>
Cc: <git@...>
Date: Saturday, August 4, 2007 - 2:38 pm

Since you are an Emacs user, perhaps contrib/emacs/* would be
more to your taste?

-

Previous thread: [RFC/PATCH] update-index: Add a --refresh-only option to refresh specified files. by Alexandre Julliard on Saturday, August 4, 2007 - 5:59 am. (3 messages)

Next thread: Terminology question about remote branches. by David Kastrup on Saturday, August 4, 2007 - 6:55 am. (36 messages)