git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Error pushing new branch: value too great for base (error token is...
@ 2015-08-05 17:32 Gaurav Chhabra
  2015-08-05 17:53 ` Eric Sunshine
  0 siblings, 1 reply; 6+ messages in thread
From: Gaurav Chhabra @ 2015-08-05 17:32 UTC (permalink / raw)
  To: git

I had written the following code to check whether a push is for branch deletion:

#!/bin/bash

NULL="0000000000000000000000000000000000000000"

while read old_sha new_sha refname ; do
    echo "Stdin: [$old_sha] [$new_sha] [$refname]"

    if [[ "$new_sha" -eq "$NULL" ]]; then   # Line 17
        echo "Skipping checks..."
        continue
    fi
    ...
    ...
    ...
done


While it works fine for branch deletion, i noticed that if i create a
branch and push it to remote, i get the following error due to the
above-mentioned code:

$ git push origin rel-a
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 407 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Stdin: [0000000000000000000000000000000000000000]
[9226289d2416af4cb7365d7aaa5e382bdb3d9a89] [refs/heads/rel-a]
remote:
remote: hooks/pre-receive: line 17: [[:
9226289d2416af4cb7365d7aaa5e382bdb3d9a89: value too great for base
(error token is "922628
9d2416af4cb7365d7aaa5e382bdb3d9a89")


Although the new branch gets pushed to remote but i'm not sure why i'm
getting this error and how can i fix it. I checked online and i get
few links where folks had similar issue but in each such case, the
error token was 08 or 09. I still tried the suggestion of using "10#"
in front of my $new_sha variable but to no avail.

Any suggestions?

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

end of thread, other threads:[~2015-08-11  6:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-05 17:32 Error pushing new branch: value too great for base (error token is Gaurav Chhabra
2015-08-05 17:53 ` Eric Sunshine
     [not found]   ` <CAGDgvc2hc+f5CuPXc2pr5uYd9kniVpuffrb6z416CicxBgVxJQ@mail.gmail.com>
2015-08-10  9:54     ` Gaurav Chhabra
2015-08-10 22:29       ` Jacob Keller
2015-08-10 22:47         ` Eric Sunshine
2015-08-11  6:30           ` Gaurav Chhabra

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 NNTP newsgroup(s).