Command line hint of the day

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Command line hint of the day

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:11

So I got a question about ppp in the kernel, and quite frankly, the things 
I know about ppp can be engraved with a jack-hammer on a grain of rice.

So what did I do?

	git whatchanged $(git-ls-files *ppp*)

actually does something useful. It will only look at files that are 
_currently_ called *ppp*, so you'd not see files that have been deleted, 
but it does the right thing for what I wanted.

You can also do "git log" or "gitk" instead of "git whatchanged", but the 
whatchanged thing has the advantage that it can run incrementally. Doing a 
"git log" ends up figuring out _all_ the commits before it can display 
them, since it also does the densification etc.

Maybe we should have a git man-page section of "strange but useful 
examples"? Things people do just because they are useful, but may not be 
immediately obvious to somebody who comes from CVS-land and uses git as 
just another old SCM?

		Linus

Re: Command line hint of the day

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:42:11

Linus Torvalds wrote:
Maybe we should have a git man-page section of "strange but useful 
examples"? Things people do just because they are useful, but may not be 
immediately obvious to somebody who comes from CVS-land and uses git as 
just another old SCM?
Sounds like a good idea. The sed1liners.txt (sic) has probably saved me 
several hundred hours of boring and tedious cut'n paste work (or more 
interesting but still not exactly fun one-shot programming).

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help