Re: [PATCH 4/4] git update-index --cacheinfo can be used to select a stage when there are merged and unmerged entries

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

Re: [PATCH 4/4] git update-index --cacheinfo can be used to select a stage when there are merged and unmerged entries

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:19

Jaime Soriano Pastor [off-list ref] writes:
Subject: Re: [PATCH 4/4] git update-index --cacheinfo can be used to select
 a stage when there are merged and unmerged entries
Hmph, what does it even mean?  Shared with your [1/4] is that it is
unclear if you are stating an existing problem to be fixed or
describing the desired end result.

Also "update-index --cacheinfo" is not about "selecting" but is
about stuffing an entry to the index, so "can be used to select"
is doubly puzzling...
  ...
+test_expect_success 'git update-index --cacheinfo to select a stage to use' '
+	setup_stage_state &&
+	git cat-file blob :1:conflict > conflict &&
Style: no SP between redirection and its target.
+	git update-index --cacheinfo 100644,`git hash-object conflict`,conflict
Style: we prefer $() over ``
+	git ls-files -s conflict > output &&
+	test_line_count = 1 output
Is "we have only one line" the only thing we care about?  Don't we
want to check which stage the entry is at?
+'
+
 test_done

Re: [PATCH 4/4] git update-index --cacheinfo can be used to select a stage when there are merged and unmerged entries

From: Jaime Soriano Pastor <hidden>
Date: 2016-06-15 23:02:19

On Wed, Aug 20, 2014 at 11:08 PM, Junio C Hamano [off-list ref] wrote:
Jaime Soriano Pastor [off-list ref] writes:
quoted
Subject: Re: [PATCH 4/4] git update-index --cacheinfo can be used to select
 a stage when there are merged and unmerged entries
Hmph, what does it even mean?  Shared with your [1/4] is that it is
unclear if you are stating an existing problem to be fixed or
describing the desired end result.

Also "update-index --cacheinfo" is not about "selecting" but is
about stuffing an entry to the index, so "can be used to select"
is doubly puzzling...
Well, somehow I understand "update-index --cacheinfo" as a low level
version of add. I was trying to explain the desired end result, yes.
quoted
  ...
+test_expect_success 'git update-index --cacheinfo to select a stage to use' '
+     setup_stage_state &&
+     git cat-file blob :1:conflict > conflict &&
Style: no SP between redirection and its target.
Ok.
quoted
+     git update-index --cacheinfo 100644,`git hash-object conflict`,conflict
Style: we prefer $() over ``
Ok.
quoted
+     git ls-files -s conflict > output &&
+     test_line_count = 1 output
Is "we have only one line" the only thing we care about?  Don't we
want to check which stage the entry is at?
Yes, it'd be better.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help