Skip to content

Commit 197979b

Browse files
committed
Use +0000 instead of -0000 for timezone indicator in timestamps.
Git seems to always output +0000, so when filter-branching, every single commit changes hash because dates are changed from - to +0.
1 parent 1a41c96 commit 197979b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/repository.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ void Repository::finalizeTags()
470470
QByteArray s = "progress Creating annotated tag " + tagName.toUtf8() + " from ref " + branchRef + "\n"
471471
+ "tag " + tagName.toUtf8() + "\n"
472472
+ "from " + branchRef + "\n"
473-
+ "tagger " + tag.author + ' ' + QByteArray::number(tag.dt) + " -0000" + "\n"
473+
+ "tagger " + tag.author + ' ' + QByteArray::number(tag.dt) + " +0000" + "\n"
474474
+ "data " + QByteArray::number( message.length() ) + "\n";
475475
fastImport.write(s);
476476
}
@@ -645,7 +645,7 @@ void Repository::Transaction::commit()
645645
s.setCodec("UTF-8");
646646
s << "commit " << branchRef << endl;
647647
s << "mark :" << QByteArray::number(mark) << endl;
648-
s << "committer " << QString::fromUtf8(author) << ' ' << datetime << " -0000" << endl;
648+
s << "committer " << QString::fromUtf8(author) << ' ' << datetime << " +0000" << endl;
649649

650650
s << "data " << message.length() << endl;
651651
}

0 commit comments

Comments
 (0)