Re: [PATCH v2 18/25] t5500, t5539: tests for shallow depth since a specific date

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

Re: [PATCH v2 18/25] t5500, t5539: tests for shallow depth since a specific date

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:08:09

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
+	cd shallow-since &&
+	GIT_COMMITTER_DATE="100000000 +0700" git commit --allow-empty -m one &&
+	GIT_COMMITTER_DATE="200000000 +0700" git commit --allow-empty -m two &&
+	GIT_COMMITTER_DATE="300000000 +0700" git commit --allow-empty -m three &&
Didn't --date="@10000000 +0700" work?

Not a complaint but genuinely curious.
+	git clone --shallow-since "300000000 +0700" "file://$(pwd)/." ../shallow11 &&
Are we required to add TZ to --shallow-since, or we merely tolerate
if there is one (I am hoping that it is the latter)?
+	git -C ../shallow11 log --pretty=tformat:%s HEAD >actual &&
+	echo three >expected &&
+	test_cmp expected actual
+	)
+'
+
+test_expect_success 'fetch shallow since ...' '
+	git -C shallow11 fetch --shallow-since "200000000 +0700" origin &&
+	git -C shallow11 log --pretty=tformat:%s origin/master >actual &&
+	echo three >expected &&
+	echo two  >>expected &&
test_write_lines perhaps?
+	test_cmp expected actual
+'

Re: [PATCH v2 18/25] t5500, t5539: tests for shallow depth since a specific date

From: Duy Nguyen <hidden>
Date: 2016-06-15 23:08:13

On Tue, Feb 9, 2016 at 4:24 AM, Junio C Hamano [off-list ref] wrote:
Nguyễn Thái Ngọc Duy  [off-list ref] writes:
quoted
+     cd shallow-since &&
+     GIT_COMMITTER_DATE="100000000 +0700" git commit --allow-empty -m one &&
+     GIT_COMMITTER_DATE="200000000 +0700" git commit --allow-empty -m two &&
+     GIT_COMMITTER_DATE="300000000 +0700" git commit --allow-empty -m three &&
Didn't --date="@10000000 +0700" work?

Not a complaint but genuinely curious.
Nope. --date sets author date, but rev-list --since only cares about
committer date.
quoted
+     git clone --shallow-since "300000000 +0700" "file://$(pwd)/." ../shallow11 &&
Are we required to add TZ to --shallow-since, or we merely tolerate
if there is one (I am hoping that it is the latter)?
Hmm.. I'm not familiar with date parsing code. I was sure that the
parsing here (to timestamp) is the same as "rev-list --since" done on
the server side. The function used is approxidate() which seems to
ignore timezone.
quoted
+     git -C ../shallow11 log --pretty=tformat:%s HEAD >actual &&
+     echo three >expected &&
+     test_cmp expected actual
+     )
+'
+
+test_expect_success 'fetch shallow since ...' '
+     git -C shallow11 fetch --shallow-since "200000000 +0700" origin &&
+     git -C shallow11 log --pretty=tformat:%s origin/master >actual &&
+     echo three >expected &&
+     echo two  >>expected &&
test_write_lines perhaps?
I was lazy. probably could go with cat <<EOF.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help