mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-08 17:08:04 +02:00
Bug fixes (#184)
* Fix gist content when going back to editing * Fix not outputting non-truncated large files for editon/zip download * Allow dashes in usernames * Delete keys associated to deleted user * Fix error message when there is no files in gist * Show if there is not files in gist preview * Fix log parsing for the 11th empty commit
This commit is contained in:
@ -22,6 +22,12 @@ var (
|
||||
|
||||
const truncateLimit = 2 << 18
|
||||
|
||||
type RevisionNotFoundError struct{}
|
||||
|
||||
func (m *RevisionNotFoundError) Error() string {
|
||||
return "revision not found"
|
||||
}
|
||||
|
||||
func RepositoryPath(user string, gist string) string {
|
||||
return filepath.Join(config.GetHomeDir(), ReposDirectory, strings.ToLower(user), gist)
|
||||
}
|
||||
|
@ -94,6 +94,11 @@ func parseLog(out io.Reader, maxBytes int) []*Commit {
|
||||
|
||||
scanner.Scan()
|
||||
|
||||
if len(scanner.Bytes()) == 0 {
|
||||
commits = append(commits, currentCommit)
|
||||
break
|
||||
}
|
||||
|
||||
// if there is no shortstat, it means that the commit is empty, we add it and move onto the next one
|
||||
if scanner.Bytes()[0] != ' ' {
|
||||
commits = append(commits, currentCommit)
|
||||
|
Reference in New Issue
Block a user