From: "Lou, Pengfei (NSB - CN/Hangzhou)" <pengfei.lou@nokia-sbell.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: RE: one bug on git
Date: Tue, 3 Dec 2019 08:29:31 +0000 [thread overview]
Message-ID: <1af00173f96243bea760baaddeb15777@nokia-sbell.com> (raw)
In-Reply-To: <5e27e2a9f6374742859b4b87d85c56e9@nokia-sbell.com>
[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]
Hello community
One problem I found recently within my working, please check my detail below.
I tried to run my script (check the attached file 'problem.sh') to build one git repository , it can be successful, but the command "git log -raw -1 ${revision}^ ${revision}" on that repo would generate some unexpected result, please check the result below
[pelou@hzling29 try_des]$ git --version
git version 2.6.2
[pelou@hzling29 try_des]$ git log --raw -1 164304f48726d31336e2e130a90e42b7f1c480f8
commit 164304f48726d31336e2e130a90e42b7f1c480f8
Author: pelou <mailto:pengfei.lou@nokia-sbell.com>
Date: Tue Dec 3 14:54:33 2019 +0800
3
:100644 100644 9a7456b... 8148ef7... M lpf
[pelou@hzling29 try_des]$ git log --raw -1 164304f48726d31336e2e130a90e42b7f1c480f8^ 164304f48726d31336e2e130a90e42b7f1c480f8
commit dd1a95338ffd471e5b270a487b585bbfcf9926a5
Author: pelou <mailto:pengfei.lou@nokia-sbell.com>
Date: Tue Dec 3 14:54:33 2019 +0800
2
:100644 100644 d474e1b... 9a7456b... M lpf
Next step I changed my script(check the attached file good.sh) and only add some delays after "git push", everything is normal, check it below
[pelou@hzling29 try_des]$ git log --raw -1 2027dc54da1896cf1dfa301c3444b1690d6cb1d8
commit 2027dc54da1896cf1dfa301c3444b1690d6cb1d8
Author: pelou <mailto:pengfei.lou@nokia-sbell.com>
Date: Tue Dec 3 15:00:45 2019 +0800
3
:100644 100644 9a7456b... 8148ef7... M lpf
[pelou@hzling29 try_des]$ git log --raw -1 2027dc54da1896cf1dfa301c3444b1690d6cb1d8^ 2027dc54da1896cf1dfa301c3444b1690d6cb1d8
commit 2027dc54da1896cf1dfa301c3444b1690d6cb1d8
Author: pelou <mailto:pengfei.lou@nokia-sbell.com>
Date: Tue Dec 3 15:00:45 2019 +0800
3
:100644 100644 9a7456b... 8148ef7... M lpf
So please help me fix it. Please let me know if I was wrong or miss some thing
Br, Hercules
[-- Attachment #2: good.sh --]
[-- Type: application/octet-stream, Size: 717 bytes --]
#!/bin/bash
gitMetaLayer=/var/fpwork/pelou/tmp/FCA_PS_CI_SCM-3695/ci_test/try_src
gitMetaLayer_work=/var/fpwork/pelou/tmp/FCA_PS_CI_SCM-3695/ci_test/try_des
rm -rf ${gitMetaLayer}
rm -rf ${gitMetaLayer_work}
mkdir -p ${gitMetaLayer}
cd ${gitMetaLayer}
git init -q --bare
mkdir -p ${gitMetaLayer_work}
cd ${gitMetaLayer_work}
git clone -q ${gitMetaLayer} ${gitMetaLayer_work}
touch lpf
git add lpf
git commit -a -m "init git repo"
echo -e "1\n" > lpf
git commit -a -m "1"
sleep 1
echo -e "2\n" > lpf
git commit -a -m "2"
sleep 1
echo -e "3\n" > lpf
git commit -a -m "3"
sleep 1
echo -e "4\n" > lpf
git commit -a -m "4"
sleep 1
echo -e "5\n" > lpf
git commit -a -m "5"
[-- Attachment #3: problem.sh --]
[-- Type: application/octet-stream, Size: 721 bytes --]
#!/bin/bash
gitMetaLayer=/var/fpwork/pelou/tmp/FCA_PS_CI_SCM-3695/ci_test/try_src
gitMetaLayer_work=/var/fpwork/pelou/tmp/FCA_PS_CI_SCM-3695/ci_test/try_des
rm -rf ${gitMetaLayer}
rm -rf ${gitMetaLayer_work}
mkdir -p ${gitMetaLayer}
cd ${gitMetaLayer}
git init -q --bare
mkdir -p ${gitMetaLayer_work}
cd ${gitMetaLayer_work}
git clone -q ${gitMetaLayer} ${gitMetaLayer_work}
touch lpf
git add lpf
git commit -a -m "init git repo"
echo -e "1\n" > lpf
git commit -a -m "1"
#sleep 1
echo -e "2\n" > lpf
git commit -a -m "2"
#sleep 1
echo -e "3\n" > lpf
git commit -a -m "3"
#sleep 1
echo -e "4\n" > lpf
git commit -a -m "4"
#sleep 1
echo -e "5\n" > lpf
git commit -a -m "5"
next prev parent reply other threads:[~2019-12-03 8:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <defeb7be75f54e8483ce529b2571478d@nokia-sbell.com>
2019-12-03 8:28 ` one bug on git Lou, Pengfei (NSB - CN/Hangzhou)
2019-12-03 8:29 ` Lou, Pengfei (NSB - CN/Hangzhou) [this message]
2019-12-03 8:56 ` Bryan Turner
2019-12-03 9:08 ` Lou, Pengfei (NSB - CN/Hangzhou)
2019-12-03 9:21 ` Bryan Turner
2019-12-03 9:25 ` Lou, Pengfei (NSB - CN/Hangzhou)
[not found] ` <CAGyf7-HmACw1im7C-RfkO5YLf0t+11LmqwPqMOjSTN5a4y7-hg@mail.gmail.com>
2019-12-03 9:30 ` Bryan Turner
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=1af00173f96243bea760baaddeb15777@nokia-sbell.com \
--to=pengfei.lou@nokia-sbell.com \
--cc=git@vger.kernel.org \
/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).