Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-06-03 Thread Duy Nguyen
On Thu, May 30, 2013 at 3:07 AM, Junio C Hamano gits...@pobox.com wrote: *1* blame is an oddball (and I suspect the recent log -Ln,m:path may share the same) in that it really wants a concret path, not a pathspec, so you cannot even say cd Documentation; git blame :/Makefile

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-06-02 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: So the problem is that I can't do: git blame -- :/Makefile So blame has to be converted to use pathspec semantics, and should error out when the pathspec doesn't match the concrete path of a file. Correct, that is what I wrote in two

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-30 Thread Ramkumar Ramachandra
Jonathan Nieder wrote: That's detectable and could be made to error out, so it's not too bad. Sure it's possible, but I'm arguing about whether it's worth the effort. There can be loops like a - b - c - d - e - a. Given that nobody has even bothered to get git to print an error message when a

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-30 Thread Jonathan Nieder
Felipe Contreras wrote: On Thu, May 30, 2013 at 12:23 AM, Jonathan Nieder jrnie...@gmail.com wrote: Felipe Contreras wrote: On Wed, May 29, 2013 at 6:43 PM, Jonathan Nieder jrnie...@gmail.com wrote: A bigger problem (in my opinion) with allowing arbitrary changes to the meaning of existing

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-30 Thread Felipe Contreras
On Thu, May 30, 2013 at 9:54 AM, Jonathan Nieder jrnie...@gmail.com wrote: Felipe Contreras wrote: On Thu, May 30, 2013 at 12:23 AM, Jonathan Nieder jrnie...@gmail.com wrote: Felipe Contreras wrote: On Wed, May 29, 2013 at 6:43 PM, Jonathan Nieder jrnie...@gmail.com wrote: A bigger problem

Fwd: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Bráulio Bhavamitra
-- Forwarded message -- From: Bráulio Bhavamitra brauli...@gmail.com Date: Wed, May 29, 2013 at 8:23 AM Subject: [git-users] Highlevel (but simple to implement) commands provided by default for git To: git-us...@googlegroups.com Hello all, One of the things I note about git

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Ramkumar Ramachandra
Bráulio Bhavamitra wrote: root = rev-parse --show-toplevel What is your usecase for this? upstream = !git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD) Again, what is the usecase? What doesn't @{u} do? upstream-remote = !git upstream | sed -e 's/\\/.*$//g'

Re: Fwd: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Junio C Hamano
Bráulio Bhavamitra brauli...@gmail.com writes: root = rev-parse --show-toplevel Hmm, part of my cdup shell function looks something like cdup () { ... error detection etc... d=$(git rev-parse --show-toplevel) cd $d } so I can quickly go up to the top-level.

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Felipe Contreras
On Wed, May 29, 2013 at 1:11 PM, Bráulio Bhavamitra brauli...@gmail.com wrote: -- Forwarded message -- From: Bráulio Bhavamitra brauli...@gmail.com Date: Wed, May 29, 2013 at 8:23 AM Subject: [git-users] Highlevel (but simple to implement) commands provided by default for git

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Felipe Contreras
On Wed, May 29, 2013 at 1:26 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Bráulio Bhavamitra wrote: root = rev-parse --show-toplevel What is your usecase for this? Some Git commands expect to be in the top level directory (e.g. git blame). upstream-remote = !git upstream | sed -e

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Ramkumar Ramachandra
Felipe Contreras wrote: On Wed, May 29, 2013 at 1:26 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Bráulio Bhavamitra wrote: root = rev-parse --show-toplevel What is your usecase for this? Some Git commands expect to be in the top level directory (e.g. git blame). Um, git blame

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: On Wed, May 29, 2013 at 1:26 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Bráulio Bhavamitra wrote: root = rev-parse --show-toplevel What is your usecase for this? Some Git commands expect to be in the top level directory (e.g.

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Some Git commands expect to be in the top level directory (e.g. git blame). Git things we can fix [*1*], but more importantly, build structure of many project may require you to go up to the top to build the whole thing, so being able to get a relative path to the top

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Ramkumar Ramachandra
Felipe Contreras wrote: We should probably also add typical shortucts: d = diff l = log f = fetch p = push r = reset ci = commit rb = rebase co = checkout st = status pi = cherry-pick mt = mergetool Terrible idea. We'll be eating up more subcommands that the user cannot override.

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: cd Documentation; git blame :/Makefile *scratches head* You lean new things every day ;-). cd Documentation; git blame ../Makefile Isn't this how pathspecs are specified everywhere? The whole point of show-cdup is that people

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Ramkumar Ramachandra
Junio C Hamano wrote: The whole point of show-cdup is that people (especially those in java land) bury themselves in a hierarchy so deep that it is not feasible to tell Go count the hierarchy and prefix that many ../ yourself to them. Ah. The answer to we cannot count ../ issue is :(top)

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Ramkumar Ramachandra
Bráulio Bhavamitra wrote: Agree, these aliased should work as a fallback or as an automatic short version Making builtins override'able is also a terrible idea. It opens doors to potential bugs we don't want to deal with. Simple example: am = log -1 log = am -3 -- To unsubscribe from

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: Bráulio Bhavamitra wrote: Agree, these aliased should work as a fallback or as an automatic short version Making builtins override'able is also a terrible idea. It opens doors to potential bugs we don't want to deal with. Simple example: am = log -1

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Felipe Contreras
On Wed, May 29, 2013 at 3:00 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Felipe Contreras wrote: On Wed, May 29, 2013 at 1:26 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Bráulio Bhavamitra wrote: root = rev-parse --show-toplevel What is your usecase for this? Some Git

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Felipe Contreras
On Wed, May 29, 2013 at 3:27 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Felipe Contreras wrote: We should probably also add typical shortucts: d = diff l = log f = fetch p = push r = reset ci = commit rb = rebase co = checkout st = status pi = cherry-pick mt = mergetool

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Felipe Contreras
On Wed, May 29, 2013 at 6:43 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ramkumar Ramachandra wrote: Bráulio Bhavamitra wrote: Agree, these aliased should work as a fallback or as an automatic short version Making builtins override'able is also a terrible idea. It opens doors to

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Jonathan Nieder
Felipe Contreras wrote: On Wed, May 29, 2013 at 6:43 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ramkumar Ramachandra wrote: Making builtins override'able is also a terrible idea. It opens doors to potential bugs we don't want to deal with. Simple example: am = log -1 log = am -3

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

2013-05-29 Thread Felipe Contreras
On Thu, May 30, 2013 at 12:23 AM, Jonathan Nieder jrnie...@gmail.com wrote: Felipe Contreras wrote: On Wed, May 29, 2013 at 6:43 PM, Jonathan Nieder jrnie...@gmail.com wrote: A bigger problem (in my opinion) with allowing arbitrary changes to the meaning of existing commands is that scripts,