Re: [PATCH] Can show relative date of the commit with future timestamp

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Can show relative date of the commit with future timestamp

From: Jundong Xue <hidden>
Date: 2016-06-15 22:54:13

I find an interesting and useful usage of git: todo/timeline.
For this purpose I just make a git repo and all the commits with
specified timestamp: some in the past, e.g. the date I was born; some
in the future, e.g. todo list.

I config my ~/.gitconfig as below:
[alias]
    lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset)
- %C(bold green)(%cr)%C(reset) %C(green)%s%C(reset) %C(bold white)―
%cn%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit
--date=relative
    lg = !"git lg1"
    todo = !"git lg" | grep future | grep --color -E
'future|days|hours|minutes|seconds'

tomxue@ubuntu:~/mycode/life$ git todo
* d768da9 - (in the future: 3 hours later) Meeting with vendor ― Tom
Xue (HEAD, master)
* 5fcd556 - (in the future: 12 days later) Take my personal holiday ― Tom Xue
* 9dd280b - (in the future: 11 months later) 端午节 ― Tom Xue
* 4680099 - (in the future: 9 months later) 清明节 ― Tom Xue
* 59d5266 - (in the future: 8 months later) 元宵节 ― Tom Xue
* b5308da - (in the future: 7 months later) 除夕 ― Tom Xue
* 3fe2e71 - (in the future: 4 months later) 重阳节 ― Tom Xue
* 4fad90c - (in the future: 3 months later) 中秋 ― Tom Xue
* 3dfec58 - (in the future: 7 weeks later) 七夕 ― Tom Xue
* f547a6e - (in the future: 7 months later) 我的阴历生日: 12-18 ― Tom Xue
* 5d4d240 - (in the future: 7 months later) 我的阳历生日 ― Tom Xue
* 5b165e7 - (in the future: 9 months later) Father阴历生日: 阴历3-6 ― Tom Xue
* 7b73d53 - (in the future: 10 months later) Father阳历生日 ― Tom Xue
* b6cd036 - (in the future: 6 months later) Mother阴历生日: 阴历11-23 ― Tom Xue
* 97c5163 - (in the future: 6 months later) Mother阳历生日 ― Tom Xue
* f96843c - (in the future: 5 months later) Brother阴历生日: 阴历11-4 ― Tom Xue
* c4a5432 - (in the future: 5 months later) Brother阳历生日 ― Tom Xue
* e1bfba1 - (in the future: 4 months later) Afei阳历生日 ― Tom Xue
* b551e6c - (in the future: 4 months later) Afei阴历生日: 阴历9-25 ― Tom Xue
* 0d7e644 - (in the future: 7 weeks later) 家人来京计划启动 ― Tom Xue
* 6e7ba31 - (in the future: 10 months later) Mother's day: 2nd
Sunday@May ― Tom Xue
* 4fc7701 - (in the future: 12 months later) Father's day: 3rd
Sunday@June ― Tom Xue
* 69a582e - (in the future: 10 months later) Dropbox 100G deadline ― Tom Xue

And I take a screenshot of it, which is colorful and more impressive
FYI. The link is below.
https://www.box.com/s/84b9cf402ea9419c7fe2

The link is just a picture and safe.

Except that, I think to give some accurate relative date of future
timestamp commit is also not bad.
If I make this kind of commit, I hope not only to see "in the future",
but also to see "how long/far in the future".

BR,
Tom

Re: [PATCH] Can show relative date of the commit with future timestamp

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:32

Jundong Xue [off-list ref] writes:
tomxue@ubuntu:~/mycode/life$ git todo
* d768da9 - (in the future: 3 hours later) Meeting with vendor — Tom
Xue (HEAD, master)
* 5fcd556 - (in the future: 12 days later) Take my personal holiday — Tom Xue
* 9dd280b - (in the future: 11 months later) 端午节 — Tom Xue
* 4680099 - (in the future: 9 months later) 清明节 — Tom Xue
* 59d5266 - (in the future: 8 months later) 元宵节 — Tom Xue
* b5308da - (in the future: 7 months later) 除夕 — Tom Xue
...
I was re-reading the backlog and after looking at it again, I do not
think what the patch tries to do is a bad thing.  There are changes
I want to see _how_ it is done, though.

Especially, the duplication of the exact same logic in the future
and in the past is an unmaintainable mess.

I have queued a replacement in 'pu'.

Re: [PATCH] Can show relative date of the commit with future timestamp

From: Jundong Xue <hidden>
Date: 2016-06-15 22:54:32

Thank you for reconsider my patch! As you said, my implementation is
not good while the idea is not bad.
I checked out the latest git source code and patch it with your
replacement, and it looks nice, I like it.

This patch comes from my real need. And I think someone may need it as
well. To be honest, this is my first submitted patch in my life.


On Tue, Aug 21, 2012 at 6:51 AM, Junio C Hamano [off-list ref] wrote:
Jundong Xue [off-list ref] writes:
quoted
tomxue@ubuntu:~/mycode/life$ git todo
* d768da9 - (in the future: 3 hours later) Meeting with vendor ― Tom
Xue (HEAD, master)
* 5fcd556 - (in the future: 12 days later) Take my personal holiday ― Tom Xue
* 9dd280b - (in the future: 11 months later) 端午节 ― Tom Xue
* 4680099 - (in the future: 9 months later) 清明节 ― Tom Xue
* 59d5266 - (in the future: 8 months later) 元宵节 ― Tom Xue
* b5308da - (in the future: 7 months later) 除夕 ― Tom Xue
...
I was re-reading the backlog and after looking at it again, I do not
think what the patch tries to do is a bad thing.  There are changes
I want to see _how_ it is done, though.

Especially, the duplication of the exact same logic in the future
and in the past is an unmaintainable mess.

I have queued a replacement in 'pu'.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help