From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] ls-tree: add --abbrev[=<n>] option
Date: Tue, 7 Mar 2006 11:58:26 -0800 [thread overview]
Message-ID: <20060307195826.GA26870@localdomain> (raw)
In-Reply-To: <7vzmk2jfzr.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
> Output from ls-tree and ls-files -s are primarily for script
> consumption. diff-raw output which already has abbrev is also
> primarily for scripts, but we have an excuse there that human
> eyes can spot differences easier in abbreviated form and two
> values on the same row being different is the only information
> we are conveying in "git whatchanged" default output, and not
> abbreviating the object names makes pathnames pushed to far
> right of the display which will be chopped by "less -S".
>
> So I am not quite sure if I should take this, and a subsequent
> one you would probably send for ls-files ;-).
I've never used ls-files with -s, but it's a simple patch on its way :>
> Care to point out a use case I might have missed that this is
> useful? I've never done ls-tree to be read by _me_ (not by
> script) unless I am debugging ls-tree itself.
I'm a weirdo and I use vim as a repository browser:
(ref: http://www.gelato.unsw.edu.au/archives/git/0511/13088.html ,
I've since renamed my 'git-show' script to 'git-cat-any').
My usual buffer width is 80 columns. So when I want to see a file from
a certain tree that's not checked out: I'll run git-ls-tree -r <tree>
and output it to my vim buffer, find the corresponding sha1 for the
file, and hit my ',G' macro with my cursor over the blob sha1 to display
its contents. Abbreviating the sha1 is very useful for seeing longer
file paths on an 80 column buffer.
--
Eric Wong
next prev parent reply other threads:[~2006-03-07 19:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-07 13:52 [PATCH] ls-tree: add --abbrev[=<n>] option Eric Wong
2006-03-07 17:56 ` Junio C Hamano
2006-03-07 19:58 ` Eric Wong [this message]
2006-03-07 19:59 ` [PATCH] ls-files: " Eric Wong
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=20060307195826.GA26870@localdomain \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).