* git problem
@ 2011-10-03 2:57 Larry Finger
2011-10-03 3:59 ` unable to resolve reference refs/tags/v3.1-rc8: Success (Re: git problem) Jonathan Nieder
0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2011-10-03 2:57 UTC (permalink / raw)
To: LKML
I had my system freeze when doing a pull from Linus's repo. Since then, every
pull results in the following errors:
~> git pull
error: unable to resolve reference refs/tags/v3.1-rc8: Success
From git://github.com/torvalds/linux
! [new tag] v3.1-rc8 -> v3.1-rc8 (unable to update local ref)
Any suggestions on how to fix this error?
Thanks,
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* unable to resolve reference refs/tags/v3.1-rc8: Success (Re: git problem)
2011-10-03 2:57 git problem Larry Finger
@ 2011-10-03 3:59 ` Jonathan Nieder
2011-10-03 4:15 ` Larry Finger
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Nieder @ 2011-10-03 3:59 UTC (permalink / raw)
To: Larry Finger; +Cc: LKML, git
Hi,
Larry Finger wrote:
> I had my system freeze when doing a pull from Linus's repo. Since then,
> every pull results in the following errors:
>
> ~> git pull
> error: unable to resolve reference refs/tags/v3.1-rc8: Success
> From git://github.com/torvalds/linux
> ! [new tag] v3.1-rc8 -> v3.1-rc8 (unable to update local ref)
Could you try pulling again with
"/path/to/git/sources/bin-wrappers/git pull" after applying this
patch?
Thanks,
diff --git i/refs.c w/refs.c
index a615043b..b15f78a4 100644
--- i/refs.c
+++ w/refs.c
@@ -493,12 +493,15 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *
char *buf;
int fd;
- if (--depth < 0)
+ if (--depth < 0) {
+ errno = ELOOP;
return NULL;
+ }
git_snpath(path, sizeof(path), "%s", ref);
/* Special case: non-existing file. */
if (lstat(path, &st) < 0) {
+ int saved_errno = errno;
struct ref_list *list = get_packed_refs(NULL);
while (list) {
if (!strcmp(ref, list->name)) {
@@ -509,6 +512,7 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *
}
list = list->next;
}
+ errno = saved_errno;
if (reading || errno != ENOENT)
return NULL;
hashclr(sha1);
@@ -562,7 +566,8 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *
*flag |= REF_ISSYMREF;
}
if (len < 40 || get_sha1_hex(buffer, sha1))
- return NULL;
+ die("ref %s is corrupt: length=%d, content=%.*s", ref,
+ (int) len, (int) len, buffer);
return ref;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: unable to resolve reference refs/tags/v3.1-rc8: Success (Re: git problem)
2011-10-03 3:59 ` unable to resolve reference refs/tags/v3.1-rc8: Success (Re: git problem) Jonathan Nieder
@ 2011-10-03 4:15 ` Larry Finger
2011-10-03 4:40 ` unable to resolve reference refs/tags/v3.1-rc8: Success Jonathan Nieder
0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2011-10-03 4:15 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: LKML, git
On 10/02/2011 10:59 PM, Jonathan Nieder wrote:
> Hi,
>
> Larry Finger wrote:
>
>> I had my system freeze when doing a pull from Linus's repo. Since then,
>> every pull results in the following errors:
>>
>> ~> git pull
>> error: unable to resolve reference refs/tags/v3.1-rc8: Success
>> From git://github.com/torvalds/linux
>> ! [new tag] v3.1-rc8 -> v3.1-rc8 (unable to update local ref)
>
> Could you try pulling again with
> "/path/to/git/sources/bin-wrappers/git pull" after applying this
> patch?
>
> Thanks,
>
> diff --git i/refs.c w/refs.c
> index a615043b..b15f78a4 100644
> --- i/refs.c
> +++ w/refs.c
> @@ -493,12 +493,15 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *
> char *buf;
> int fd;
>
> - if (--depth< 0)
> + if (--depth< 0) {
> + errno = ELOOP;
> return NULL;
> + }
>
> git_snpath(path, sizeof(path), "%s", ref);
> /* Special case: non-existing file. */
> if (lstat(path,&st)< 0) {
> + int saved_errno = errno;
> struct ref_list *list = get_packed_refs(NULL);
> while (list) {
> if (!strcmp(ref, list->name)) {
> @@ -509,6 +512,7 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *
> }
> list = list->next;
> }
> + errno = saved_errno;
> if (reading || errno != ENOENT)
> return NULL;
> hashclr(sha1);
> @@ -562,7 +566,8 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *
> *flag |= REF_ISSYMREF;
> }
> if (len< 40 || get_sha1_hex(buffer, sha1))
> - return NULL;
> + die("ref %s is corrupt: length=%d, content=%.*s", ref,
> + (int) len, (int) len, buffer);
> return ref;
> }
After applying that patch, I get
finger@larrylap:~/linux-2.6> ~/git/git pull
fatal: ref refs/tags/v3.1-rc8 is corrupt: length=41, content=
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: unable to resolve reference refs/tags/v3.1-rc8: Success
2011-10-03 4:15 ` Larry Finger
@ 2011-10-03 4:40 ` Jonathan Nieder
2011-10-03 5:11 ` Larry Finger
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Nieder @ 2011-10-03 4:40 UTC (permalink / raw)
To: Larry Finger; +Cc: LKML, git
Larry Finger wrote:
> After applying that patch, I get
>
> finger@larrylap:~/linux-2.6> ~/git/git pull
> fatal: ref refs/tags/v3.1-rc8 is corrupt: length=41, content=
Great, thanks.
In the short term I'd suggest just removing the corrupt
.git/refs/tags/v3.1-rc8 file with "rm" so it can be fetched again.
Hopefully later tonight I can prepare a real patch to fix this, though
I wouldn't mind if someone else takes care of it first.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: unable to resolve reference refs/tags/v3.1-rc8: Success
2011-10-03 4:40 ` unable to resolve reference refs/tags/v3.1-rc8: Success Jonathan Nieder
@ 2011-10-03 5:11 ` Larry Finger
0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2011-10-03 5:11 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: LKML, git
On 10/02/2011 11:40 PM, Jonathan Nieder wrote:
> Larry Finger wrote:
>
>> After applying that patch, I get
>>
>> finger@larrylap:~/linux-2.6> ~/git/git pull
>> fatal: ref refs/tags/v3.1-rc8 is corrupt: length=41, content=
>
> Great, thanks.
>
> In the short term I'd suggest just removing the corrupt
> .git/refs/tags/v3.1-rc8 file with "rm" so it can be fetched again.
> Hopefully later tonight I can prepare a real patch to fix this, though
> I wouldn't mind if someone else takes care of it first.
Thanks. That did the trick.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* git problem
@ 2008-04-02 19:21 Ken Moffat
0 siblings, 0 replies; 6+ messages in thread
From: Ken Moffat @ 2008-04-02 19:21 UTC (permalink / raw)
To: linux-kernel
I seem to be doing something wrong. I'm trying to bisect to
discover which commit causes my failure to shut down or restart from
gdm on one box (the gdm window disappears, but the background
remains instead of falling back to a console and shutting down).
So far, I've discovered that the problem is slightly intermittent,
so I'm not labelling a kernel good until it successfully restarts or
shuts down 10 times (indications are that a bad version will fail in
the first 3 attempts).
Anyway, I've confirmed my supposition that 2.6.24 was good in this
respect, and that 2.6.25-rc1 was bad. After about a day of
bisection / archive / build /test I went to set an extraversion in
the Makefile (everything had been labelled 2.6.24 because this was
before rc1), and discovered it was already labelled as 2.6.24-rc4,
i.e. far too early.
Reset, repeated, git came up with the same commits (I wondered if
I'd mispasted at some point). Looked at the log, this seemed to be
the newest thing available. Reset, looked at the full log, but I'm
out of my depth trying to understand this.
FWIW, these were the commits it told me to test:
[1c17f4d615f34a4ecfcf9132d643126b226f5e79] x86: ioremap_nocache fix
good
[d2fc0bacd5c438cb459fdf531eff00ab18422a00] Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
bad
[7c0141591fcf92ddc96a4ee04e35783a15bd68c8] [ALSA] virtuoso: monitor external power on D2X
good
[b6cf160c4b788a31f6a4017a469b956ca77febf4] Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
bad
[5de8b3acda2d03f8aeb21b5a267645088718c356] USB: CP2101 New Device IDs
bad - dated 3rd Jan, but I think it was merged in the right timeframe
[f776c4cda449bab463f5388eb07bd63dc52e2b13] [NETFILTER]: ebtables: Update modules' descriptions
bad
[e78c9d285709f535caae405f1da5b2936f51f0b5] b43legacy: fix MAC control and microcode init
bad
[e1a9c9872dd004617555dff079b357a6ffd945e9] Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
good
[294d5cc233d81ec4aec77ebc60dc5752a3d0082a] Add schedule_timeout_killable
- This appears to date from 6th December, and to have been merged
around then.
Confused. Help ? Please ?
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-10-03 5:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 2:57 git problem Larry Finger
2011-10-03 3:59 ` unable to resolve reference refs/tags/v3.1-rc8: Success (Re: git problem) Jonathan Nieder
2011-10-03 4:15 ` Larry Finger
2011-10-03 4:40 ` unable to resolve reference refs/tags/v3.1-rc8: Success Jonathan Nieder
2011-10-03 5:11 ` Larry Finger
-- strict thread matches above, loose matches on Subject: below --
2008-04-02 19:21 git problem Ken Moffat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox