mirror of
https://github.com/git/git.git
synced 2026-01-19 23:20:34 +00:00
Merge branch 'js/patch' into next
* js/patch: format-patch: use clear_commit_marks() instead of some ad-hockery t4014: fix for whitespace from "wc -l"
This commit is contained in:
@@ -160,15 +160,6 @@ static void reopen_stdout(struct commit *commit, int nr, int keep_subject)
|
||||
freopen(filename, "w", stdout);
|
||||
}
|
||||
|
||||
static void reset_all_objects_flags()
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < obj_allocs; i++)
|
||||
if (objs[i])
|
||||
objs[i]->flags = 0;
|
||||
}
|
||||
|
||||
static int get_patch_id(struct commit *commit, struct diff_options *options,
|
||||
unsigned char *sha1)
|
||||
{
|
||||
@@ -220,7 +211,10 @@ static void get_patch_ids(struct rev_info *rev, struct diff_options *options)
|
||||
}
|
||||
|
||||
/* reset for next revision walk */
|
||||
reset_all_objects_flags();
|
||||
clear_commit_marks((struct commit *)o1,
|
||||
SEEN | UNINTERESTING | SHOWN | ADDED);
|
||||
clear_commit_marks((struct commit *)o2,
|
||||
SEEN | UNINTERESTING | SHOWN | ADDED);
|
||||
o1->flags = flags1;
|
||||
o2->flags = flags2;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ test_expect_success "format-patch --ignore-if-in-upstream" '
|
||||
|
||||
git format-patch --stdout master..side >patch0 &&
|
||||
cnt=`grep "^From " patch0 | wc -l` &&
|
||||
test "$cnt" = 3
|
||||
test $cnt = 3
|
||||
|
||||
'
|
||||
|
||||
@@ -46,7 +46,7 @@ test_expect_success "format-patch --ignore-if-in-upstream" '
|
||||
git format-patch --stdout \
|
||||
--ignore-if-in-upstream master..side >patch1 &&
|
||||
cnt=`grep "^From " patch1 | wc -l` &&
|
||||
test "$cnt" = 2
|
||||
test $cnt = 2
|
||||
|
||||
'
|
||||
|
||||
@@ -55,7 +55,7 @@ test_expect_success "format-patch result applies" '
|
||||
git checkout -b rebuild-0 master &&
|
||||
git am -3 patch0 &&
|
||||
cnt=`git rev-list master.. | wc -l` &&
|
||||
test "$cnt" = 2
|
||||
test $cnt = 2
|
||||
'
|
||||
|
||||
test_expect_success "format-patch --ignore-if-in-upstream result applies" '
|
||||
@@ -63,7 +63,7 @@ test_expect_success "format-patch --ignore-if-in-upstream result applies" '
|
||||
git checkout -b rebuild-1 master &&
|
||||
git am -3 patch1 &&
|
||||
cnt=`git rev-list master.. | wc -l` &&
|
||||
test "$cnt" = 2
|
||||
test $cnt = 2
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user