반응형
Git에 티타임이있는 이유는 무엇입니까?
Git의 소스 코드에 있는 date.c 파일에서 다음과 같은 특수 시간 이름 구조에 주목합니다.
static const struct special {
const char *name;
void (*fn)(struct tm *, struct tm *, int *);
} special[] = {
{ "yesterday", date_yesterday },
{ "noon", date_noon },
{ "midnight", date_midnight },
{ "tea", date_tea },
{ "PM", date_pm },
{ "AM", date_am },
{ "never", date_never },
{ "now", date_now },
{ NULL }
};
나는 대부분의 유용성 (다소)을 이해하지만 왜 "티"타임 (17:00 시간 평가)이 있습니까? 이건 그냥 달걀 인가요?
이 커밋은 왜 포함되어 있는지에 대한 단서를 줄 수 있습니다 : https://github.com/git/git/commit/a8aca418d6484400d6804e22717bd49ca06c28e9
처음에는 농담으로 제안 실제로는 사용자가 자신의 맞춤 시간 / 날짜 기간을 포함 할 수있는 기능을 보여주기 위해 구현되었습니다.
On Fri, 18 Nov 2005, David Roundy wrote:
> Don't forget "high noon"! (and perhaps "tea time"?) :)
Done.
[torvalds@g5 git]$ ./test-date "now" "midnight" "high noon" "tea-time"
now -> bad -> Wed Dec 31 16:00:00 1969
now -> Fri Nov 18 08:50:54 2005
midnight -> bad -> Wed Dec 31 16:00:00 1969
midnight -> Fri Nov 18 00:00:00 2005
high noon -> bad -> Wed Dec 31 16:00:00 1969
high noon -> Thu Nov 17 12:00:00 2005
tea-time -> bad -> Wed Dec 31 16:00:00 1969
tea-time -> Thu Nov 17 17:00:00 2005
Thanks for pointing out tea-time.
This is also written to easily extended to allow people to add their own
important dates like Christmas and their own birthdays.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
참고 URL : https://stackoverflow.com/questions/51365138/why-does-git-have-a-tea-time
반응형
'IT' 카테고리의 다른 글
HTTP 401- 적절한 WWW-Authenticate 헤더 값은 무엇입니까? (0) | 2020.08.15 |
---|---|
Xcode는 C 및 Objective-C 코드 만 리팩터링 할 수 있습니다. (0) | 2020.08.15 |
Android 테마 배경색 설정 (0) | 2020.08.15 |
UIImagePickerController 오류 : 오류되지 않은 뷰를 스냅 샷하면 iOS 7에서 빈 스냅 샷이 생성됨 (0) | 2020.08.15 |
의존성 배치 컨테이너의 이점은 무엇입니까? (0) | 2020.08.15 |