From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Kristian Høgsberg" <krh@redhat.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: builtin commit series sent
Date: Wed, 5 Sep 2007 22:09:53 -0400 [thread overview]
Message-ID: <20070906020953.GD18160@spearce.org> (raw)
In-Reply-To: <1189039527.20311.24.camel@hinata.boston.redhat.com>
Kristian Hgsberg <krh@redhat.com> wrote:
> There's one test that doesn't look right to me:
> t1400-update-ref.sh. The 'creating initial files' case does a git
> commit --amend and apparently expect to commit the changed contents of
> the file F, even though it hasn't been added to the index. Similarly,
> there's a git commit -F M just below it that does the same thing. I'm
> not sure how they pass with the shell script commit...
Yea. It doesn't actually matter in this test. The following
patch can be applied and the test will still pass:
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index c4c0dfa..ce045b2 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -198,11 +198,9 @@ test_expect_success \
GIT_AUTHOR_DATE="2005-05-26 23:41" \
GIT_COMMITTER_DATE="2005-05-26 23:41" git-commit -F M -a &&
h_OTHER=$(git rev-parse --verify HEAD) &&
- echo FIXED >F &&
GIT_AUTHOR_DATE="2005-05-26 23:44" \
GIT_COMMITTER_DATE="2005-05-26 23:44" git-commit --amend &&
h_FIXED=$(git rev-parse --verify HEAD) &&
- echo TEST+FIXED >F &&
echo Merged initial commit and a later commit. >M &&
echo $h_TEST >.git/MERGE_HEAD &&
GIT_AUTHOR_DATE="2005-05-26 23:45" \
The reason is the test is looking for a very specific date and
time in the branch's reflog. The reflog entry is not impacted by
editing F. Since the commit date is different here the --amend
created a different commit object, which was all that mattered.
Actually I think we probably should just apply the above patch
to clean up this test case. I'll submit it under a different
cover so Junio can more easily apply it.
--
Shawn.
prev parent reply other threads:[~2007-09-06 2:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 0:45 builtin commit series sent Kristian Høgsberg
2007-09-06 2:09 ` Shawn O. Pearce [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070906020953.GD18160@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=krh@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).