Thomas Rast
8f8f5476cd
Introduce new pretty formats %g[sdD] for reflog information
...
Add three new --pretty=format escapes:
%gD long reflog descriptor (e.g. refs/stash@{0})
%gd short reflog descriptor (e.g. stash@{0})
%gs reflog message
This is achieved by passing down the reflog info, if any, inside the
pretty_print_context struct.
We use the newly refactored get_reflog_selector(), and give it some
extra functionality to extract a shortened ref. The shortening is
cached inside the commit_reflogs struct; the only allocation of it
happens in read_complete_reflog(), where it is initialised to 0. Also
add another helper get_reflog_message() for the message extraction.
Note that the --format="%h %gD: %gs" tests may not work in real
repositories, as the --pretty formatter doesn't know to leave away the
": " on the last commit in an incomplete (because git-gc removed the
old part) reflog. This equivalence is nevertheless the main goal of
this patch.
Thanks to Jeff King for reviews, the %gd testcase and documentation.
Signed-off-by: Thomas Rast <trast@student.ethz.ch >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2009-10-19 22:28:26 -07:00
..
2009-03-03 21:43:19 -08:00
2009-07-31 11:24:18 -07:00
2009-10-09 14:56:32 -07:00
2009-06-30 11:17:54 -07:00
2009-03-21 23:24:46 -07:00
2008-12-29 00:40:10 -08:00
2009-02-09 20:59:26 -08:00
2009-10-09 14:43:04 -07:00
2009-07-28 13:32:59 -07:00
2008-12-19 19:10:46 -08:00
2009-03-19 02:47:40 -07:00
2009-04-06 00:27:09 -07:00
2009-03-22 10:33:36 -07:00
2009-09-07 15:45:13 -07:00
2009-09-13 01:36:13 -07:00
2009-09-11 00:23:07 -07:00
2009-03-02 12:34:54 -08:00
2009-08-05 11:59:56 -07:00
2009-09-13 13:54:39 -07:00
2009-06-13 10:48:59 -07:00
2009-03-17 12:08:43 -07:00
2009-10-09 14:54:15 -07:00
2009-03-22 20:59:20 -07:00
2009-05-25 12:08:15 -07:00
2009-03-22 21:02:38 -07:00
2009-05-23 01:39:45 -07:00
2009-09-07 15:24:38 -07:00
2008-11-23 19:32:39 -08:00
2009-01-05 11:43:28 -08:00
2009-08-29 14:08:03 -07:00
2009-10-09 17:21:46 -07:00
2008-09-03 14:51:19 -07:00
2009-09-13 11:24:26 -07:00
2009-05-09 00:19:25 -07:00
2008-08-17 01:01:42 -07:00
2009-06-18 10:19:50 -07:00
2009-04-20 15:56:07 -07:00
2008-08-18 22:05:44 -07:00
2009-04-18 14:43:24 -07:00
2009-01-23 21:51:20 -08:00
2009-07-28 13:32:59 -07:00
2009-07-28 13:32:59 -07:00
2009-07-28 13:32:59 -07:00
2009-07-28 13:32:59 -07:00
2009-05-24 11:21:05 -07:00
2009-07-31 07:48:09 -07:00
2008-08-01 23:21:44 -07:00
2009-10-02 03:58:24 -04:00
2009-10-09 14:40:25 -07:00
2009-04-13 09:36:52 -07:00
2009-07-22 21:57:41 -07:00
2008-12-21 12:04:12 -08:00
2009-09-29 08:27:45 -07:00
2009-07-22 21:54:54 -07:00
2008-11-14 21:38:11 -08:00
2008-08-03 13:38:22 -07:00
2008-08-29 21:46:33 -07:00
2009-04-18 14:45:59 -07:00
2009-07-12 14:36:40 -07:00
2009-07-25 02:17:54 -07:00
2009-08-23 15:03:53 -07:00
2009-08-26 12:05:58 -07:00
2009-08-06 14:01:13 -07:00
2008-08-01 23:21:44 -07:00
2009-05-13 21:06:11 -07:00
2009-09-11 00:23:07 -07:00
2008-08-01 23:21:44 -07:00
2009-08-05 10:29:37 -07:00
2008-12-09 20:57:52 -08:00
2008-12-09 20:57:52 -08:00
2008-08-01 23:21:44 -07:00
2008-12-09 20:57:52 -08:00
2009-10-09 14:43:04 -07:00
2009-04-12 15:19:12 -07:00
2009-05-24 11:21:05 -07:00
2009-05-16 10:28:59 -07:00
2009-08-29 14:08:03 -07:00
2008-08-30 13:23:01 -07:00
2009-07-24 09:10:16 -07:00
2009-04-05 00:39:37 -07:00
2009-06-11 19:50:45 -07:00
2009-03-25 17:28:33 -07:00
2008-08-01 23:21:44 -07:00
2009-07-10 23:57:21 -07:00
2008-09-30 14:30:00 -07:00
2008-08-01 23:21:44 -07:00
2009-09-13 11:29:18 -07:00
2009-09-13 01:32:49 -07:00
2009-06-27 14:11:28 -07:00
2009-08-05 11:59:56 -07:00
2008-12-19 19:10:46 -08:00
2008-12-19 19:10:46 -08:00
2009-08-05 10:34:01 -07:00
2009-08-10 19:05:00 -07:00
2009-06-09 23:47:49 -07:00
2009-05-31 17:03:40 -07:00
2008-08-01 23:21:44 -07:00
2009-07-28 13:30:42 -07:00
2009-08-15 15:17:47 -07:00
2009-08-12 16:36:04 -07:00
2009-06-13 17:08:37 -07:00
2008-12-21 18:34:49 -08:00
2008-08-08 18:27:19 -07:00
2009-07-31 11:22:50 -07:00
2009-04-11 11:01:15 -07:00
2009-02-08 12:38:08 -08:00
2009-08-05 10:29:37 -07:00
2009-06-20 23:50:42 -07:00
2008-08-01 23:21:44 -07:00
2008-12-02 16:13:16 -08:00
2009-10-13 01:01:04 -07:00
2008-08-01 23:21:44 -07:00
2009-08-27 16:59:25 -07:00
2009-08-18 20:47:11 -07:00
2009-08-10 19:05:00 -07:00
2009-08-29 14:08:03 -07:00
2008-12-19 19:10:46 -08:00
2009-04-25 09:29:38 -07:00
2009-08-28 22:39:17 -07:00
2008-09-03 14:51:19 -07:00
2009-08-07 20:45:31 -07:00
2008-07-30 21:42:55 -07:00
2008-09-24 15:49:21 -07:00
2008-08-01 23:21:44 -07:00
2009-08-26 12:05:58 -07:00
2009-10-10 00:05:19 -07:00
2009-08-12 16:14:41 -07:00
2009-09-22 19:40:05 -07:00
2009-08-12 16:14:41 -07:00
2009-04-20 13:45:02 -07:00
2008-09-19 19:48:30 -07:00
2008-11-14 21:48:10 -08:00
2009-09-14 02:23:49 -07:00
2009-04-07 21:58:25 -07:00
2009-03-03 21:42:44 -08:00
2009-06-03 00:09:16 -07:00
2008-12-17 00:57:33 -08:00
2009-01-21 00:15:34 -08:00
2009-06-30 11:17:55 -07:00
2008-10-20 23:39:37 -07:00
2009-10-09 14:54:55 -07:00
2008-12-19 19:35:55 -08:00
2009-03-17 12:08:43 -07:00
2009-07-25 10:07:06 -07:00
2009-03-27 00:33:19 -07:00
2009-04-01 11:02:42 -07:00
2009-03-27 00:33:20 -07:00
2009-03-27 00:33:19 -07:00
2009-04-01 11:02:42 -07:00
2009-05-24 11:21:05 -07:00
2009-05-25 11:23:18 -07:00
2009-03-25 17:28:33 -07:00
2009-10-19 22:28:26 -07:00
2009-02-24 23:53:40 -08:00
2009-01-25 22:25:20 -08:00
2009-03-03 21:40:36 -08:00
2008-08-05 11:38:11 -07:00
2008-08-05 11:38:11 -07:00
2008-08-05 11:38:11 -07:00
2008-08-05 11:38:11 -07:00
2008-12-16 22:06:47 -08:00
2008-12-16 22:08:28 -08:00
2008-08-06 13:40:53 -07:00
2008-12-16 22:13:36 -08:00
2008-08-24 14:47:24 -07:00
2009-03-03 21:40:36 -08:00
2008-10-21 13:37:42 -07:00
2008-11-27 01:00:45 -08:00
2008-12-07 15:11:54 -08:00
2008-12-19 19:27:35 -08:00
2008-08-17 11:42:10 -07:00
2009-03-03 21:40:36 -08:00
2009-03-03 21:40:36 -08:00
2009-02-07 00:51:47 -08:00
2009-05-03 15:29:31 -07:00
2008-12-24 19:41:08 -08:00
2009-03-15 13:05:05 -07:00
2009-04-02 12:34:16 -07:00
2009-04-12 15:57:58 -07:00
2009-04-19 17:34:26 -07:00
2009-05-03 16:54:14 -07:00
2009-03-03 23:37:19 -08:00
2009-05-12 22:30:29 -07:00
2009-06-03 22:47:48 -07:00
2009-06-21 21:15:50 -07:00
2009-07-28 23:59:30 -07:00
2009-05-06 18:16:40 -07:00
2009-08-21 20:16:10 -07:00
2009-08-29 14:31:01 -07:00
2009-09-13 01:28:13 -07:00
2009-09-16 14:53:26 -07:00
2009-07-29 00:32:42 -07:00
2009-10-10 00:05:19 -07:00
2009-07-13 11:09:41 -07:00
2009-04-28 00:40:00 -07:00
2009-06-09 23:46:47 -07:00
2009-09-08 01:18:46 -07:00
2009-08-12 16:14:41 -07:00