<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/send-pack.c, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-01-24T22:37:23Z</updated>
<entry>
<title>push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE</title>
<updated>2013-01-24T22:37:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-23T21:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75e5c0dc5529aed42122b3a774e6b17383e51b66'/>
<id>urn:sha1:75e5c0dc5529aed42122b3a774e6b17383e51b66</id>
<content type='text'>
When we push to update an existing ref, if:

 * the object at the tip of the remote is not a commit; or
 * the object we are pushing is not a commit,

it won't be correct to suggest to fetch, integrate and push again,
as the old and new objects will not "merge".  We should explain that
the push must be forced when there is a non-committish object is
involved in such a case.

If we do not have the current object at the tip of the remote, we do
not even know that object, when fetched, is something that can be
merged.  In such a case, suggesting to pull first just like
non-fast-forward case may not be technically correct, but in
practice, most such failures are seen when you try to push your work
to a branch without knowing that somebody else already pushed to
update the same branch since you forked, so "pull first" would work
as a suggestion most of the time.  And if the object at the tip is
not a commit, "pull first" will fail, without making any permanent
damage.  As a side effect, it also makes the error message the user
will get during the next "push" attempt easier to understand, now
the user is aware that a non-commit object is involved.

In these cases, the current code already rejects such a push on the
client end, but we used the same error and advice messages as the
ones used when rejecting a non-fast-forward push, i.e. pull from
there and integrate before pushing again.

Introduce new rejection reasons and reword the messages
appropriately.

[jc: with help by Peff on message details]

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: require force for refs under refs/tags/</title>
<updated>2012-12-02T09:44:34Z</updated>
<author>
<name>Chris Rorvick</name>
<email>chris@rorvick.com</email>
</author>
<published>2012-11-30T01:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbfeddb12e5bb540ed3c852eebda3df9117bd150'/>
<id>urn:sha1:dbfeddb12e5bb540ed3c852eebda3df9117bd150</id>
<content type='text'>
References are allowed to update from one commit-ish to another if the
former is an ancestor of the latter.  This behavior is oriented to
branches which are expected to move with commits.  Tag references are
expected to be static in a repository, though, thus an update to
something under refs/tags/ should be rejected unless the update is
forced.

Signed-off-by: Chris Rorvick &lt;chris@rorvick.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-pack: move core code to libgit.a</title>
<updated>2012-10-29T07:08:30Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-10-26T15:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f5d942e1ede7ce5e74537d3021df9fdc179a8377'/>
<id>urn:sha1:f5d942e1ede7ce5e74537d3021df9fdc179a8377</id>
<content type='text'>
send_pack() is used by transport.c, part of libgit.a while it stays in
builtin/send-pack.c. Move it to send-pack.c so that we won't get
undefined reference if a program that uses libgit.a happens to pull it
in.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Build-in send-pack, with an API for other programs to call.</title>
<updated>2007-11-03T05:40:44Z</updated>
<author>
<name>Daniel Barkalow</name>
<email>barkalow@iabervon.org</email>
</author>
<published>2007-10-30T02:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96249c04c07f00485a3ed1052ff10b27ab147fc5'/>
<id>urn:sha1:96249c04c07f00485a3ed1052ff10b27ab147fc5</id>
<content type='text'>
Also marks some more things as const, as needed.

Signed-off-by: Daniel Barkalow &lt;barkalow@iabervon.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Miscellaneous const changes and utilities</title>
<updated>2007-11-03T05:40:43Z</updated>
<author>
<name>Daniel Barkalow</name>
<email>barkalow@iabervon.org</email>
</author>
<published>2007-10-30T01:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4577370e9bfeca8652880b99b8499f76d18865ba'/>
<id>urn:sha1:4577370e9bfeca8652880b99b8499f76d18865ba</id>
<content type='text'>
The list of remote refs in struct transport should be const, because
builtin-fetch will get confused if it changes.

The url in git_connect should be const (and work on a copy) instead of
requiring the caller to copy it.

match_refs doesn't modify the refspecs it gets.

get_fetch_map and get_remote_ref don't change the list they get.

Allow transport get_refs_list methods to modify the struct transport.

Add a function to copy a list of refs, when a function needs a mutable
copy of a const list.

Add a function to check the type of a ref, as per the code in connect.c

Signed-off-by: Daniel Barkalow &lt;barkalow@iabervon.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/forkexec'</title>
<updated>2007-11-01T20:47:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-11-01T20:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4340a813d007b592534de664d152d66417dbe809'/>
<id>urn:sha1:4340a813d007b592534de664d152d66417dbe809</id>
<content type='text'>
* js/forkexec:
  Use the asyncronous function infrastructure to run the content filter.
  Avoid a dup2(2) in apply_filter() - start_command() can do it for us.
  t0021-conversion.sh: Test that the clean filter really cleans content.
  upload-pack: Run rev-list in an asynchronous function.
  upload-pack: Move the revision walker into a separate function.
  Use the asyncronous function infrastructure in builtin-fetch-pack.c.
  Add infrastructure to run a function asynchronously.
  upload-pack: Use start_command() to run pack-objects in create_pack_file().
  Have start_command() create a pipe to read the stderr of the child.
  Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec.
  Use run_command() to spawn external diff programs instead of fork/exec.
  Use start_command() to run content filters instead of explicit fork/exec.
  Use start_command() in git_connect() instead of explicit fork/exec.
  Change git_connect() to return a struct child_process instead of a pid_t.

Conflicts:

	builtin-fetch-pack.c
</content>
</entry>
<entry>
<title>Merge branch 'jk/send-pack' into HEAD</title>
<updated>2007-10-31T04:38:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-10-31T04:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ae4dd05725e1613375e03f206077959853d6b51'/>
<id>urn:sha1:7ae4dd05725e1613375e03f206077959853d6b51</id>
<content type='text'>
* jk/send-pack:
  t5516: test update of local refs on push
  send-pack: don't update tracking refs on error
</content>
</entry>
<entry>
<title>Merge branch 'db/fetch-pack'</title>
<updated>2007-10-25T04:59:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-10-25T04:59:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d90a7fda355c251b8ffdd79617fb083c18245ec2'/>
<id>urn:sha1:d90a7fda355c251b8ffdd79617fb083c18245ec2</id>
<content type='text'>
* db/fetch-pack: (60 commits)
  Define compat version of mkdtemp for systems lacking it
  Avoid scary errors about tagged trees/blobs during git-fetch
  fetch: if not fetching from default remote, ignore default merge
  Support 'push --dry-run' for http transport
  Support 'push --dry-run' for rsync transport
  Fix 'push --all branch...' error handling
  Fix compilation when NO_CURL is defined
  Added a test for fetching remote tags when there is not tags.
  Fix a crash in ls-remote when refspec expands into nothing
  Remove duplicate ref matches in fetch
  Restore default verbosity for http fetches.
  fetch/push: readd rsync support
  Introduce remove_dir_recursively()
  bundle transport: fix an alloc_ref() call
  Allow abbreviations in the first refspec to be merged
  Prevent send-pack from segfaulting when a branch doesn't match
  Cleanup unnecessary break in remote.c
  Cleanup style nit of 'x == NULL' in remote.c
  Fix memory leaks when disconnecting transport instances
  Ensure builtin-fetch honors {fetch,transfer}.unpackLimit
  ...
</content>
</entry>
<entry>
<title>Change git_connect() to return a struct child_process instead of a pid_t.</title>
<updated>2007-10-21T05:30:39Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2007-10-19T19:47:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98158e9cfd2808613f305bf587ce697762c884bb'/>
<id>urn:sha1:98158e9cfd2808613f305bf587ce697762c884bb</id>
<content type='text'>
This prepares the API of git_connect() and finish_connect() to operate on
a struct child_process. Currently, we just use that object as a placeholder
for the pid that we used to return. A follow-up patch will change the
implementation of git_connect() and finish_connect() to make full use
of the object.

Old code had early-return-on-error checks at the calling sites of
git_connect(), but since git_connect() dies on errors anyway, these checks
were removed.

[sp: Corrected style nit of "conn == NULL" to "!conn"]

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>send-pack: don't update tracking refs on error</title>
<updated>2007-10-18T07:45:59Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2007-10-18T06:19:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=334f4831e5a779d42e521b770a26eae1ecb27e86'/>
<id>urn:sha1:334f4831e5a779d42e521b770a26eae1ecb27e86</id>
<content type='text'>
Previously, we updated the tracking refs (which match refs we
are pushing) while generating the list of refs to send.
However, at that point we don't know whether the refs were
accepted.

Instead, we now wait until we get a response code from the
server. If an error was indicated, we don't update any local
tracking refs. Technically some refs could have been updated
on the remote, but since the local ref update is just an
optimization to avoid an extra fetch, we are better off
erring on the side of correctness.

The user-visible message is now generated much later in the
program, and has been tweaked to make more sense.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
</feed>
