Commit 880dcab35c715d7ccd529331823fa3d52671951c

Stefan Sperling 2018-07-10T22:53:34

remove hash from tog log view

diff --git a/tog/tog.c b/tog/tog.c
index b406ca3..0c8100f 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -213,11 +213,8 @@ draw_commit(struct got_commit_object *commit, struct got_object_id *id)
 	int author_width, logmsg_width;
 	char *newline, *smallerthan;
 	char *line = NULL;
-	char *id_str = NULL;
-	size_t id_len;
 	int col, limit;
 	static const size_t date_display_cols = 9;
-	static const size_t id_display_cols = 8;
 	static const size_t author_display_cols = 16;
 	const int avail = COLS;
 
@@ -234,25 +231,6 @@ draw_commit(struct got_commit_object *commit, struct got_object_id *id)
 	if (col > avail)
 		goto done;
 
-	err = got_object_id_str(&id_str, id);
-	if (err)
-		return err;
-	id_len = strlen(id_str);
-	if (avail < date_display_cols + id_display_cols) {
-		limit = MIN(id_len, avail - date_display_cols);
-		waddnstr(tog_log_view.window, id_str, limit);
-	} else {
-		limit = MIN(id_display_cols, id_len);
-		waddnstr(tog_log_view.window, id_str, limit);
-	}
-	col += limit;
-	while (col <= avail && col < date_display_cols + id_display_cols + 2) {
-		waddch(tog_log_view.window, ' ');
-		col++;
-	}
-	if (col > avail)
-		goto done;
-
 	author0 = strdup(commit->author);
 	if (author0 == NULL) {
 		err = got_error_from_errno();
@@ -308,7 +286,6 @@ done:
 	free(author0);
 	free(wauthor);
 	free(line);
-	free(id_str);
 	return err;
 }