Hacker News new | past | comments | ask | show | jobs | submit login
Git 1.8.0 (raw.github.com)
159 points by _riwy on Oct 22, 2012 | hide | past | favorite | 53 comments



> "git branch --set-upstream" is deprecated and may be removed in a relatively distant future. "git branch [-u|--set-upstream-to]" has been introduced with a saner order of arguments.

It would be great if changes to the git CLI were thoroughly thought through instead of one-off fixes like this. This is the reason the interface is such a mess.

  git branch foo --track origin/foo
But if you forgot --track:

  git branch foo
then it's:

  git branch foo --set-upstream-to origin/foo
and don't you dare do

  git branch --set-upstream-to origin/foo

Upstream and track are the same - why two different words?

And now we have --set-upstream-to and --set-upstream, which will be fun for git newbies to distinguish.


Kind of related:

The usual pattern of a copy command:

copy source destination

The pattern of git push command

push destination source:destination

http://perlalchemy.blogspot.com/2011/04/git-push-and-other-c...


It does occasionally feel like the CLI development happens with a very short time scale imagined rather than planning it out, which is slightly odd given Linus' involvement.


Wait, what exactly happens in that last one that I shouldn't dare do?


I should have written:

  git branch --set-upstream origin/foo
This counter-intuitively creates a LOCAL (!) branch named origin/foo which tracks the current branch. I would expect this to set the upstream of the current branch, given that most commands operate on the current branch unless otherwise specified. Instead it does something completely unexpected and useless.


So why are you unhappy about this option being deprecated? Have you tried it in this release? It tells you it's deprecated and which options exist. If you do what you show in this command, it tells you how to undo it with the new more sensible option.


which invalidates part of your point, because --set-upstream is now _deprecated_.


It's deprecated in the next release not this one, and it will be around for years to come. People will google and find the old way documented and have to read up on the difference, adding to the cognitivie baggage of git.

Regardless, my point is the interface is horrible and this is just adding to the patchwork. Why not add --track semantics or unify these flags?


--set-upstream is deprecated in this release.


Deprecated, but not removed yet. It "may be removed in a relatively distant future"


This is what deprecated means. You can't just remove an API that's existed for years and scripts may depend on without giving them time to adapt. This shows a warning when it's used so it's clear which scripts should be changed.


    You're over the rate limit. Serve this file from your own servers. Contact support@github.com if you have questions.


I'm surprised they don't exempt high profile public projects from limits like that. Git being hosted on Github is hugely beneficial to their image.

Any roadblocks should be eliminated for VIPs, especially if the consequence is just a few bucks more in bandwidth bills.


We actually don't care about rate limits with this type of raw request. The limits are in place because people (usually porn sites) hot link js/css/image assets which can lead quickly to an insane number of requests.

If file extensions could be used to determine whether a resource could be used like this, we'd only apply the rate limits to those. Browsers don't care about extensions or event content types though. They'll happily use whatever's at the other end of a URL for <link rel=stylesheet>, <script>, and <img> tags.

As for whitelisting, it's a path we just don't want to go down for raw requests. We do a lot of that for the API and it isn't cheap to maintain.


Browsers will ignore content-type in many cases (html5 embraced that quirk), but they do have to sniff the bytes to confirm their hunch. You could use `file` to detect images. Or use the content length, maybe by changing hit quotas into bandwidth quotas.

https://code.google.com/p/browsersec/wiki/Part2#Content_hand... http://mimesniff.spec.whatwg.org/


"The limits are in place because people (usually porn sites) hot link js/css/image assets"

I'd like to be surprised by that but I'm not.


You can view the text at this link: https://github.com/git/git/blob/master/Documentation/RelNote...

Also note, it is quite easy to transform github urls back and forth.

For all text files, there is a `blob` portion that comes after the repository name and before the branch. You can change that to `blame`, `commits`, `edit`, or `raw`. When changing it to `raw`, the user is redirected to the `raw.github.com` subdomain. `blob` is the normal view, and `commits` is a history of the file.

Note that using the `edit` version will instantly create a fork in your account for that repo. Resulting in notifications for it, regardless of whether you actually edit it. I guess it's eager forking so that the user doesn't notice this in the foreground. Blech.

You can also change the branch name - it is master in this case - to whatever branch you want. Or commit-sha. Or tag. Almost anything tree-ish will work with Github's UI.

The cool thing about this is that it also pretty much works for the gist service they provide, which allows you to do stuff like:

  - create javascript-based inline diffs
  - show changes across multiple forks of a gist
  - consolidate commits for a file
Pretty hackable.



got the same "You're over the rate limit. Serve this file from your own servers. Contact support@github.com if you have questions."


i am able to access the file from that link.



Thank you.


That's a good change. I've never had the need to "git push" an entire repo, and pushing the current branch is simply more natural to do.


That's great, guys using Homebrew can get this version by writing these:

    brew update
    brew upgrade git


I really wish a day when I am able to download the code with minimal footprint. (few previous versions).


That's a shallow clone: git clone --depth N ...


git archive allows you to download only a specific version (though, it doesn't work for github because they haven't enabled it)


Seems to be back up. I assume they waived the rate limit.

    curl --head https://raw.github.com/git/git/master/Documentation/RelNotes/1.8.0.txt
    HTTP/1.1 200 OK
    Server: nginx
    Date: Mon, 22 Oct 2012 05:32:02 GMT
    Content-Type: text/plain; charset=utf-8
    Connection: keep-alive
    Status: 200 OK
    X-Runtime: 14
    X-RateLimit-Limit: 100
    Content-Length: 1
    X-Frame-Options: deny
    Cache-Control: no-cache
    X-RateLimit-Remaining: 100


X-RateLimit-Limit? Sounds redundant.


They're the same headers the Twitter API uses: https://dev.twitter.com/docs/rate-limiting/1.1


maybe they meant to have

   X-RateLimit-reset-at
   X-RateLimit-remaining
etc, so X-RateLimit- works as a sort of namespace.


Why in the Release Notes do they use the verb "learned" to describe adding a command line option to a feature?

  "git cherry-pick" learned the "--allow-empty-message" option
It's not like Git has obtained sentience and has started to teach itself new tricks, though that would be an interesting development.

I understand what they are trying to say I just thought the choice of verb and subject was odd, leaving out the developers as those acting on the code.


Writing it in the passive voice is slightly more awkward. E.g., "git cherry-pick" was enhanced with an "--allow-empty-message option".

Similarly, writing it in the active voice but attributing the verb properly ends up with meaningless words: "Developers taught cherry-pick to..." or "We taught cherry-pick to...". Every entry would begin that way; having the first words be the relevant subsection of git makes it easier to skim through the release notes.


I would have gone for

"git cherry-pick" acquired the "--allow-empty-message" option

or

"git cherry-pick" now has the "--allow-empty-message" option

myself. I think the subject is fine with the emphasis where it belongs. The verb is weird, though.


Developers often anthropomorphize things to gloss over irrelevant details. The focus is on what, not how, and anthropomorphizing is the quickest route to get that across.


Does someone have more info on this:

A credential helper for Win32 to allow access to the keychain of the logged-in user has been added.


You can find it in contrib: https://github.com/gitster/git/tree/master/contrib/credentia...

See man 7 gitcredentials on how to set it up.


> In the next major release (not this one), we will change the behavior of the "git push" command.

So wait, is that in this release or not? Why put this at the very most top part of the file without even mentioning what release it will actually be in?


No, it is not in THIS release. it is in the NEXT major release. 1.8.0 is the current major release. 1.9.0 (or 2.0.0, whatever) will have the change.


Deprecation notice, I guess:

    "git push" will warn about the upcoming change until you set this 
    variable in this release.


Anyone have a mirror? GitHub has stopped serving this as it's over their rate limit.



Can git work with subtrees yet?


Is updating worth it?


looking for saner nested submodule pulling , reading now


btw, what is Github's rate limit?


I don't know, but it's not meant for hosting pages or page resources unless you use their "pages" feature, so they set it pretty low.


Based on headers the limit is 100 requests (per hour if the same as API).


Didn't Github suffer a DoS attack in the past few days?


Yea, these notices under light load are nothing new though.


Awesome, now when and where do I download it for Windows??? "Please checkout the source and build it yourself" - wtf.


Or wait for it to appear in the Cygwin release cycle. Or, msysgit. I think you're being overly dramatic.


As a windows user, you should know by now that you are a second class git user. You'll have to wait.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: