Re: [PATCH] help.c: strip suffix only if the STRIP_EXTENSION defined

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

 



Hello Jeff,

On Wed, Mar 16, 2016 at 11:31 PM, Jeff King <peff@xxxxxxxx> wrote:
> This is billed as an optimization in the commit message, but these two
> pieces of code are not the same. The original always strips ".exe",
> whether or not STRIP_EXTENSION is defined, and whether or not it is
> ".exe".
>
> In practice it works out because people on Unix systems do not have
> "git-foo.exe", and nobody sets STRIP_EXTENSION to other things.  But I
> tend to think this is an improvement in robustness.
>
> I also wonder if this should be sharing the strip_extension() helper
> added in your 63ca1c0.

Yes, I want to move strip_extension() (from 63ca1c0) to the git-compat-util.h
and adapt/reuse it in the help.c. What do you think about this?

Thank you.
--
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]