Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jgit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Faculty of Technology
Software Engineering
tools
cms
jgit
Commits
333a0536
Commit
333a0536
authored
14 years ago
by
Shawn Pearce
Committed by
Code Review
14 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Speed up check for modifications of tracked resources"
parents
f60df9db
b919a943
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java
+6
-4
6 additions, 4 deletions
org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java
with
6 additions
and
4 deletions
org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java
+
6
−
4
View file @
333a0536
...
...
@@ -567,7 +567,12 @@ public boolean isModified(File wd, boolean forceContentCheck) {
return
true
;
File
file
=
getFile
(
wd
);
if
(!
file
.
exists
())
long
length
=
file
.
length
();
if
(
length
==
0
)
{
if
(!
file
.
exists
())
return
true
;
}
if
(
length
!=
size
)
return
true
;
// JDK1.6 has file.canExecute
...
...
@@ -600,9 +605,6 @@ public boolean isModified(File wd, boolean forceContentCheck) {
}
}
if
(
file
.
length
()
!=
size
)
return
true
;
// Git under windows only stores seconds so we round the timestamp
// Java gives us if it looks like the timestamp in index is seconds
// only. Otherwise we compare the timestamp at millisecond prevision.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment