Re: [PATCH 2/2] Use $(git rev-parse --show-toplevel) in cd_to_toplevel()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 10 Jan 2010, Jonathan Nieder wrote:
> Why not 'cdup=$(git rev-parse --show-toplevel) && cd "$cdup"'
> unconditionally?  That would avoid having to look for the .git dir
> twice and would mirror setup_work_tree() a bit more closely.

Depends on what you think is the lesser of to evials, running 
'git rev-parse' twice or preforming a cd when theres no need to, but after
looking at setup_work_tree() I agree with you and will send in a new patch.

-- 
Steven
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]