aboutsummaryrefslogtreecommitdiff
path: root/builtin-push.c
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Junio C Hamano2006-10-02
|\ | | | | | | | | | | * maint: git-push: .git/remotes/ file does not require SP after colon git-mv: invalidate the removed path properly in cache-tree
| * git-push: .git/remotes/ file does not require SP after colonv1.4.2.3Junio C Hamano2006-10-02
| | | | | | | | | | | | | | | | Although most people would have one after colon if only for readability, we never required it in git-parse-remote, so let's not require one only in git-push. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Replace uses of strdup with xstrdup.Shawn Pearce2006-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like xmalloc and xrealloc xstrdup dies with a useful message if the native strdup() implementation returns NULL rather than a valid pointer. I just tried to use xstrdup in new code and found it to be missing. However I expected it to be present as xmalloc and xrealloc are already commonly used throughout the code. [jc: removed the part that deals with last_XXX, which I am finding more and more dubious these days.] Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | avoid to use error that shadows the function name, use err instead.Pierre Habouzit2006-08-23
| | | | | | | | | | | | | | | | builtin-apply.c and builtin-push.c uses a local variable called 'error' which shadows the error() function. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | remove unnecessary initializationsDavid Rientjes2006-08-15
| | | | | | | | | | | | | | | | [jc: I needed to hand merge the changes to the updated codebase, so the result needs to be checked.] Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | builtin-push.c cleanupDavid Rientjes2006-08-14
|/ | | | | | | Removes conditional return in builtin-push.c Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fixup command names in some usage strings.Ramsay Allan Jones2006-08-03
| | | | | | | | | Most usage strings, such as for command xxx, start with "git-xxx". This updates the rebels to conform to the general pattern. (The git wrapper is an exception to this, of course ...) Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-push: allow -f as an alias for --forceJeff King2006-08-02
| | | | | | | | | This was already documented in the options section of the manpage. This patch implements it, adds it to the usage message, and mentions it at the top of the manpage. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Call setup_git_directory() much earlierLinus Torvalds2006-07-29
| | | | | | | | | This changes the calling convention of built-in commands and passes the "prefix" (i.e. pathname of $PWD relative to the project root level) down to them. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Avoid C99 comments, use old-style C comments instead.Pavel Roskin2006-07-10
| | | | | | | | | | This doesn't make the code uglier or harder to read, yet it makes the code more portable. This also simplifies checking for other potential incompatibilities. "gcc -std=c89 -pedantic" can flag many incompatible constructs as warnings, but C99 comments will cause it to emit an error. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix more typos, primarily in the codePavel Roskin2006-07-10
| | | | | | | | | The only visible change is that git-blame doesn't understand "--compability" anymore, but it does accept "--compatibility" instead, which is already documented. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-push: don't pass --thin to HTTP transportNick Hengeveld2006-06-05
| | | | | | | git-http-push does not currently use packs to transfer objects. Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-push: --all and --tags _are_ explicit refspecsJohannes Schindelin2006-05-04
| | | | | | | | ... so do not get refspecs from remotes/* or the config if one of them was specified. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-push: also ask config for remote informationJohannes Schindelin2006-05-02
| | | | | | | | | | | | | Now you can store your remote information in the config file like this: [remote.upstream] url = me@company.com:the-project push = master:iceballs [jc: fixed up to adjust a different fix for Push: lines earlier.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix builtin-push to honor Push: lines in remotes file.Junio C Hamano2006-04-30
| | | | | | | [jc: originally from Johannes Schindelin, but reworked to lift a hard limit of Push: lines] Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-push: resurrect parsing of Push: linesJohannes Schindelin2006-04-30
| | | | | | | The C'ification of push left these behind. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git builtin "push"Linus Torvalds2006-04-30
This adds a builtin "push" command, which is largely just a C'ification of the "git-push.sh" script. Now, the reason I did it as a built-in is partly because it's yet another step on relying less on shell, but it's actually mostly because I've wanted to be able to push to _multiple_ repositories, and the most obvious and simplest interface for that would seem be to just have a "remotes" file that has multiple URL entries. (For "pull", having multiple entries should either just select the first one, or you could fall back on the others on failure - your choice). And quite frankly, it just became too damn messy to do that in shell. Besides, we actually have a fair amount of infrastructure in C, so it just wasn't that hard to do. Of course, this is almost totally untested. It probably doesn't work for anything but the one trial I threw at it. "Simple" doesn't necessarily mean "obviously correct". Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>