From: Eric Sunshine <sunshine@sunshineco.com>
To: Gaurav Chhabra <varuag.chhabra@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Error pushing new branch: value too great for base (error token is...
Date: Wed, 5 Aug 2015 13:53:19 -0400 [thread overview]
Message-ID: <CAPig+cTXO3699MdqSFVDBcnKcHAT=Mkp=c=r3C8F5nT8tfr6gw@mail.gmail.com> (raw)
In-Reply-To: <CAGDgvc3Gxn=pKBfYC+yrUhCmL9X6bqjPVwVokF0qPsXmhx_EaQ@mail.gmail.com>
On Wed, Aug 5, 2015 at 1:32 PM, Gaurav Chhabra <varuag.chhabra@gmail.com> wrote:
> I had written the following code to check whether a push is for branch deletion:
>
> #!/bin/bash
>
> NULL="0000000000000000000000000000000000000000"
> if [[ "$new_sha" -eq "$NULL" ]]; then # Line 17
> 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?
Yes, try using the string comparison '=' operator rather than the
numeric comparison operator '-eq'.
if [[ "$new_sha" = "$NULL" ]]; then
next prev parent reply other threads:[~2015-08-05 17:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
[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
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='CAPig+cTXO3699MdqSFVDBcnKcHAT=Mkp=c=r3C8F5nT8tfr6gw@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=varuag.chhabra@gmail.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).