Re: [PATCH] Add git-config --remove-section, document --rename-section

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

 



> Am I right assuming that you copied rename_section(), and modified it to 
> be remove_section()?

Yes, after extracting section_name_match.

> How about modifying rename_section() so that if new_name == NULL, it 
> removes the section?

It's not so immediate, because rename_section has to print all the non-section lines anyway, while remove_section has to remove them too.  I agree though that there is some duplicate code in getting the filename to open.

Thanks for writing the test, having an example will make my future work easier.

Paolo
-
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]