This repository was archived by the owner on Feb 3, 2023. It is now read-only.
Commit 53f880c
committed
Don't build a fake signature
When there is no user information in the configuration files, BuildSignature() sets
"unkown" as the name and uses the environment variables to create the
e-mail. This seems peculiar, since it means a consumer of the library
cannot use this method to figure out if this configuration does exist
but has to do it themselves.
As far as I can tell, this started as a way to provide something to the
reflog when the user has not set up the information as it's more
transient data and progress matters more than accuracy in that
case. This is now handled by libgit2 itself, so there is no need for
this behaviour inside the library.
This leaves us with the curious case of this fake signature only being
provided to a consumer of the library when this behaviour was due to
some internal users. It also makes it harder than it needs to be to know
if the signature the library provided is accurate.
Resolve this situation by returning null when there is no signature
configured. The internal users can then move to use a method which
throws a message mentioning the lack of a necessary signature.1 parent 01b9a62 commit 53f880c
File tree
3 files changed
+20
-45
lines changed- LibGit2Sharp
3 files changed
+20
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
| 746 | + | |
| 747 | + | |
752 | 748 | | |
753 | 749 | | |
754 | 750 | | |
| |||
758 | 754 | | |
759 | 755 | | |
760 | 756 | | |
761 | | - | |
| 757 | + | |
762 | 758 | | |
763 | 759 | | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
| 760 | + | |
| 761 | + | |
785 | 762 | | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
| 763 | + | |
792 | 764 | | |
793 | | - | |
| 765 | + | |
794 | 766 | | |
795 | 767 | | |
796 | | - | |
| 768 | + | |
| 769 | + | |
797 | 770 | | |
798 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
799 | 775 | | |
800 | | - | |
| 776 | + | |
| 777 | + | |
801 | 778 | | |
802 | 779 | | |
803 | | - | |
804 | | - | |
805 | | - | |
| 780 | + | |
806 | 781 | | |
807 | 782 | | |
808 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
0 commit comments