Merge branch 'sn/fsmonitor-missing-clock'
Sample watchman interface hook sometimes failed to produce correctly formatted JSON message, which has been corrected. * sn/fsmonitor-missing-clock: fsmonitor: query watchman with right valid jsonmaint
commit
70055ef1bf
|
|
@ -86,12 +86,13 @@ sub watchman_query {
|
||||||
# recency index to select candidate nodes and "fields" to limit the
|
# recency index to select candidate nodes and "fields" to limit the
|
||||||
# output to file names only. Then we're using the "expression" term to
|
# output to file names only. Then we're using the "expression" term to
|
||||||
# further constrain the results.
|
# further constrain the results.
|
||||||
|
my $last_update_line = "";
|
||||||
if (substr($last_update_token, 0, 1) eq "c") {
|
if (substr($last_update_token, 0, 1) eq "c") {
|
||||||
$last_update_token = "\"$last_update_token\"";
|
$last_update_token = "\"$last_update_token\"";
|
||||||
|
$last_update_line = qq[\n"since": $last_update_token,];
|
||||||
}
|
}
|
||||||
my $query = <<" END";
|
my $query = <<" END";
|
||||||
["query", "$git_work_tree", {
|
["query", "$git_work_tree", {$last_update_line
|
||||||
"since": $last_update_token,
|
|
||||||
"fields": ["name"],
|
"fields": ["name"],
|
||||||
"expression": ["not", ["dirname", ".git"]]
|
"expression": ["not", ["dirname", ".git"]]
|
||||||
}]
|
}]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue