git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* builtin commit series sent
@ 2007-09-06  0:45 Kristian Høgsberg
  2007-09-06  2:09 ` Shawn O. Pearce
  0 siblings, 1 reply; 2+ messages in thread
From: Kristian Høgsberg @ 2007-09-06  0:45 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I finally sat down and finished the last details in my git-commit.sh
port and made it pass the test suite.  The test suite is cruel, but
awesome.  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...

Also, there is some overlap in the patch set with Pierre's nice strbuf
work, but it's mostly just naming, and should be easy to work out.  I
have a couple of places where I manually add a NUL terminator, but I
like Pierres approach of always implicitly doing that.

I didn't work on this for a couple of weeks, and keeping up-to-date with
the various git-commit.sh changes that happened in the meantime
(templates, different option semantics etc) wasn't fun.  Also I don't
really have the time to maintain this out of tree, these days, so I'd
really appreciate, now that the work is finished, if we can get it in.

cheers,
Kristian

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: builtin commit series sent
  2007-09-06  0:45 builtin commit series sent Kristian Høgsberg
@ 2007-09-06  2:09 ` Shawn O. Pearce
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2007-09-06  2:09 UTC (permalink / raw)
  To: Kristian Høgsberg; +Cc: Git Mailing List

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.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-06  2:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-06  0:45 builtin commit series sent Kristian Høgsberg
2007-09-06  2:09 ` Shawn O. Pearce

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).