Commit d74a4e5
sequencer: use logmsg_reencode in get_message
This simplifies the code, as logmsg_reencode handles the
reencoding for us in a single call. It also means we learn
logmsg_reencode's trick of pulling the buffer from disk when
commit->buffer is NULL (we currently just silently return!).
It is doubtful this matters in practice, though, as
sequencer operations would not generally turn off
save_commit_buffer.
Note that we may be fixing a bug here. The existing code
does:
if (same_encoding(to, from))
reencode_string(buf, to, from);
That probably should have been "!same_encoding".
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent b000c59 commit d74a4e5
1 file changed
Lines changed: 5 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | 119 | | |
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
125 | | - | |
126 | 123 | | |
127 | 124 | | |
128 | 125 | | |
129 | 126 | | |
130 | 127 | | |
131 | | - | |
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 132 | | |
142 | 133 | | |
143 | 134 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 135 | + | |
152 | 136 | | |
153 | 137 | | |
154 | 138 | | |
| |||
167 | 151 | | |
168 | 152 | | |
169 | 153 | | |
170 | | - | |
| 154 | + | |
171 | 155 | | |
172 | 156 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 157 | + | |
193 | 158 | | |
194 | 159 | | |
195 | 160 | | |
| |||
485 | 450 | | |
486 | 451 | | |
487 | 452 | | |
488 | | - | |
| 453 | + | |
489 | 454 | | |
490 | 455 | | |
491 | 456 | | |
| |||
650 | 615 | | |
651 | 616 | | |
652 | 617 | | |
653 | | - | |
| 618 | + | |
654 | 619 | | |
655 | 620 | | |
656 | 621 | | |
| |||
0 commit comments