Skip to content

Commit 8a263ae

Browse files
author
Junio C Hamano
committed
GIT 1.1.3
3 parents 59617eb + 181dc77 + ae4a352 commit 8a263ae

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

commit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,10 @@ void clear_commit_marks(struct commit *commit, unsigned int mark)
359359
parents = commit->parents;
360360
commit->object.flags &= ~mark;
361361
while (parents) {
362-
if (parents->item && parents->item->object.parsed)
363-
clear_commit_marks(parents->item, mark);
362+
struct commit *parent = parents->item;
363+
if (parent && parent->object.parsed &&
364+
(parent->object.flags & mark))
365+
clear_commit_marks(parent, mark);
364366
parents = parents->next;
365367
}
366368
}

describe.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int compare_names(const void *_a, const void *_b)
9898
return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;
9999
}
100100

101-
static void describe(struct commit *cmit)
101+
static void describe(struct commit *cmit, int last_one)
102102
{
103103
struct commit_list *list;
104104
static int initialized = 0;
@@ -124,7 +124,8 @@ static void describe(struct commit *cmit)
124124
if (n) {
125125
printf("%s-g%s\n", n->path,
126126
find_unique_abbrev(cmit->object.sha1, abbrev));
127-
clear_commit_marks(cmit, SEEN);
127+
if (!last_one)
128+
clear_commit_marks(cmit, SEEN);
128129
return;
129130
}
130131
}
@@ -159,7 +160,7 @@ int main(int argc, char **argv)
159160
cmit = lookup_commit_reference(sha1);
160161
if (!cmit)
161162
usage(describe_usage);
162-
describe(cmit);
163+
describe(cmit, i == argc - 1);
163164
}
164165
return 0;
165166
}

diffcore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* passed around in one int (high 16-bit for merge and low 16-bit
1616
* for break).
1717
*/
18-
#define MAX_SCORE 60000
18+
#define MAX_SCORE 60000.0
1919
#define DEFAULT_RENAME_SCORE 30000 /* rename/copy similarity minimum (50%) */
2020
#define DEFAULT_BREAK_SCORE 30000 /* minimum for break to happen (50%)*/
2121
#define DEFAULT_MERGE_SCORE 48000 /* maximum for break-merge to happen (80%)*/

0 commit comments

Comments
 (0)