Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7617307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:07:00+00:00 2026-05-31T03:07:00+00:00

While playing around with some hooks I noticed that the output from the hooks

  • 0

While playing around with some hooks I noticed that the output from the hooks invoked when pushing to a remote repository are subtly different:

hooks/pre-receive
stdin: [[old-value new-value ref-name]]

hooks/update ref-name old-value new-value

hooks/post-receive
stdin: [[old-value new-value ref-name]]

hooks/post-update ref-name

Where:

  • *value: a commit hash
  • ref-name: for example, refs/heads/master

The format of the information the hooks receive is not consistent, but of particular interest to this question is that pre and post receive can accept multiple updated refs via standard input. The docs say:

This hook executes once for the receive operation. It takes no arguments, but for each ref to be updated it receives on standard input a line of the format:

old-value new-value ref-name

Therefore, under what circumstances would these hooks receive multiple values?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:07:01+00:00Added an answer on May 31, 2026 at 3:07 am

    Pushing multiple branch/tag will generate multiple values. You can do commands like:

    git push origin branch1 branch2 branch3 tag1 tag2 tag3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While playing around with playframework yabe-siena-gae, I noticed a datastore file created for the
Huh that's ironic ,while playing around today i wondered if a can Increase Int64.MaxValue
I have been playing around with Threads and Tasks (.net 4) and noticed some
I've noticed some memory leaks in an app i'm building, after playing around with
While playing around with regexps in Scala I wrote something like this: scala> val
There is an eval() function in Python I stumbled upon while playing around. I
I've been playing with some algorithms on the internet for a while and I
I'm playing around with a simple webserver written in F#. As I have noticed,
So I was playing around with some code and wanted to see which method
I am playing around with Twisted and while trying to rewrite an old java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.