summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* restrict the patch filteringDon Zickus2007-03-121-3/+34
| | | | | | | | | | | I have come across many emails that use long strings of '-'s as separators for ideas. This patch below limits the separator to only 3 '-', with the intent that long string of '-'s will stay in the commit msg and not in the patch file. Signed-off-by: Don Zickus <dzickus@redhat.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-mailinfo.c infrastrcture changesDon Zickus2007-03-125-248/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am working on a project that required parsing through regular mboxes that didn't necessarily have patches embedded in them. I started by creating my own modified copy of git-am and working from there. Very quickly, I noticed git-mailinfo wasn't able to handle a big chunk of my email. After hacking up numerous solutions and running into more limitations, I decided it was just easier to rewrite a big chunk of it. The following patch has a bunch of fixes and features that I needed in order for me do what I wanted. Note: I'm didn't follow any email rfc papers but I don't think any of the changes I did required much knowledge (besides the boundary stuff). List of major changes/fixes: - can't create empty patch files fix - empty patch files don't fail, this failure will come inside git-am - multipart boundaries are now handled - only output inbody headers if a patch exists otherwise assume those headers are part of the reply and instead output the original headers - decode and filter base64 patches correctly - various other accidental fixes I believe I didn't break any existing functionality or compatibility (other than what I describe above, which is really only the empty patch file). I tested this through various mailing list archives and everything seemed to parse correctly (a couple thousand emails). [jc: squashed in another patch from Don's five patch series to fix the test case, as this patch exposes the bug in the test.] Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano2007-03-121-0/+5
|\ | | | | | | | | * 'master' of git://repo.or.cz/git-gui: git-gui: Support of "make -s" in: do not output anything of the build itself
| * Merge branch 'maint'gitgui-0.6.5Shawn O. Pearce2007-03-124-156/+15
| |\ | | | | | | | | | | | | | | | | | | | | | * maint: git-gui: Allow 'git gui version' outside of a repository git-gui: Revert "git-gui: Display all authors of git-gui." git-gui: Revert "Don't modify CREDITS-FILE if it hasn't changed." git-gui: Allow committing empty merges
| * | git-gui: Support of "make -s" in: do not output anything of the build itselfAlex Riesen2007-03-061-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | Merge branch 'maint'Junio C Hamano2007-03-125-158/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Don't package the git-gui credits file anymore git-gui: Allow 'git gui version' outside of a repository git-gui: Revert "git-gui: Display all authors of git-gui." git-gui: Revert "Don't modify CREDITS-FILE if it hasn't changed." git-gui: Allow committing empty merges
| * \ \ Merge branch 'maint' of git://repo.or.cz/git/fastimport into maintJunio C Hamano2007-03-121-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * 'maint' of git://repo.or.cz/git/fastimport: fast-import: grow tree storage more aggressively
| * | | | Don't package the git-gui credits file anymoreShawn O. Pearce2007-03-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since git-gui 0.6.4 the credits file is no longer produced. This file was removed from git-gui due to build issues that a lot of users and Git developers have reported running into. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano2007-03-124-156/+15
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * 'maint' of git://repo.or.cz/git-gui: git-gui: Allow 'git gui version' outside of a repository git-gui: Revert "git-gui: Display all authors of git-gui." git-gui: Revert "Don't modify CREDITS-FILE if it hasn't changed." git-gui: Allow committing empty merges
| | * | | git-gui: Allow 'git gui version' outside of a repositorygitgui-0.6.4Shawn O. Pearce2007-03-121-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I got a little surprise one day when I tried to run 'git gui version' outside of a Git repository to determine what version of git-gui was installed on that system. Turns out we were doing the repository check long before we got around to command line argument handling. We now look to see if the only argument we have been given is 'version' or '--version', and if so, print out the version and exit immediately; long before we consider looking at the Git version or working directory. This way users can still get to the git-gui version number even if Git's version cannot be read. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| | * | | git-gui: Revert "git-gui: Display all authors of git-gui."Shawn O. Pearce2007-03-124-135/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 871f4c97ad7e021d1a0a98c80c5da77fcf70e4af. Too many users have complained about the credits generator in git-gui, so I'm backing the entire thing out. This revert will finish that series. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| | * | | git-gui: Revert "Don't modify CREDITS-FILE if it hasn't changed."Shawn O. Pearce2007-03-121-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92446aba47b0e0db28f7b858ea387efcca30ab44. Too many users have complained about the credits generator in git-gui, so I'm backing the entire thing out. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| | * | | git-gui: Allow committing empty mergesShawn O. Pearce2007-03-121-1/+1
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Johannes Sixt noticed that git-gui would not let the user commit a merge created by `git merge -s ours` as the ours strategy does not alter the tree (that is HEAD^1^{tree} = HEAD^{tree} after the merge). The same issue arises from amending such a merge commit. We now permit an empty commit (no changed files) if we are doing a merge commit. Core Git does this with its command line based git-commit tool, so it makes sense for the GUI to do the same. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | | Merge branch 'master' of git://repo.or.cz/git/fastimportJunio C Hamano2007-03-122-4/+54
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://repo.or.cz/git/fastimport: Remove unnecessary casts from fast-import New fast-import test case for valid tree sorting fast-import: grow tree storage more aggressively
| * | | | Remove unnecessary casts from fast-importShawn O. Pearce2007-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jeff King pointed out that these casts are quite unnecessary, as the compiler should be doing them anyway, and may cause problems in the future if the size of the argument for to_atom were to ever be increased. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | | Merge branch 'maint'Shawn O. Pearce2007-03-121-2/+2
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | * maint: fast-import: grow tree storage more aggressively
| | * | | fast-import: grow tree storage more aggressivelyJeff King2007-03-121-2/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building up a tree for a commit, fast-import dynamically allocates memory for the tree entries. When more space is needed, the allocated memory is increased by a constant amount. For very large trees, this means re-allocating and memcpy()ing the memory O(n) times. To compound this problem, releasing the previous tree resource does not free the memory; it is kept in a pool for future trees. This means that each of the O(n) allocations will consume increasing amounts of memory, giving O(n^2) memory consumption. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | New fast-import test case for valid tree sortingJeff King2007-03-121-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Git tree sorting convention is more complex than just the name, it needs to include the mode too to make sure trees sort as though their name ends with "/". This is a simple test case that verifies fast-import keeps the tree ordering correct after editing the same tree twice in a single input stream. A recent proposed patch series (that has not yet been applied) will cause this test to fail, due to a bug in the way the series handles sorting within the trees. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | | Fix t5510-fetch's use of sedShawn O. Pearce2007-03-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX says sed may add a trailing LF if there isn't already one there. We shouldn't rely on it not adding that LF, as some systems (Mac OS X for example) will add it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Simplify closing two fds at once in run-command.cShawn O. Pearce2007-03-121-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I started hacking on a change to add stdout redirection support to the run_command family, but found I was using a lot of close calls on two pipes in an array (such as for pipe). So I'm doing a tiny bit of refactoring first to make the next set of changes clearer. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Re-fix get_sha1_oneline()Linus Torvalds2007-03-121-5/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | What the function wants to return is not if we saw any return from pop_most_recent_commit(), but if we found what was asked for. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | git-bundle: only die if pack would be empty, warn if ref is skippedJohannes Schindelin2007-03-111-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A use case for git-bundle expected to be quite common is this: $ git bundle create daily.bundle --since=10.days.ago --all The expected outcome is _not_ to error out if only a couple of the refs were not changed during the last 10 days. This patch complains loudly about refs which are skipped due to the pack not containing the corresponding objects, but dies only if no objects would be in the pack _at all_. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | git-send-email: configurable bcc and chain-reply-toAvi Kivity2007-03-112-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chain-reply-to is a personal perference, and is unlikely to change from patchset to patchset. Similarly, bcc is likely to have the same values every invocation is one likes to bcc oneself. So, allow both to be set via configuration variables. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint'Junio C Hamano2007-03-112-1/+19
|\ \ \ | |/ / | | | | | | | | | | | | * maint: git-send-email: Document configuration options git-merge: warn when -m provided on a fast forward
| * | git-send-email: Document configuration optionsAvi Kivity2007-03-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Wishing to implement an email aliases file, I found that they were already implmented. Document them for the next user. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-merge: warn when -m provided on a fast forwardJ. Bruce Fields2007-03-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warn the user that the "-m" option is ignored in the case of a fast forward. That may save some confusion in the case where the user doesn't know about fast forwards yet and may not realize that the behavior here is intentional. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/boundary'Junio C Hamano2007-03-114-197/+243
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/boundary: git-bundle: prevent overwriting existing bundles git-bundle: die if a given ref is not included in bundle git-bundle: handle thin packs in subcommand "unbundle" git-bundle: Make thin packs git-bundle: avoid packing objects which are in the prerequisites bundle: fix wrong check of read_header()'s return value & add tests revision --boundary: fix uncounted case. revision --boundary: fix stupid typo git-bundle: make verify a bit more chatty. revision traversal: SHOWN means shown git-bundle: various fixups revision traversal: retire BOUNDARY_SHOW revision walker: Fix --boundary when limited
| * | | git-bundle: prevent overwriting existing bundlesJohannes Schindelin2007-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not only does it prevent accidentally losing older bundles, but it also fixes a subtle bug: when writing into an existing bundle, git-pack-objects would not truncate the bundle. Therefore, fetching from the bundle would trigger an error in unpack-objects: "fatal: pack has junk at the end". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-bundle: die if a given ref is not included in bundleJohannes Schindelin2007-03-081-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The earlier patch tried to be nice by just warning, but it seems more likely that the user wants to adjust the parameters. Also, it prevents a bundle containing _all_ revisions in the case when the user only gave one ref, but also rev-list options which excluded the ref. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-bundle: handle thin packs in subcommand "unbundle"Johannes Schindelin2007-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch to make the packs in a bundle thin forgot the receiving side. D'oh. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-bundle: Make thin packsJohannes Schindelin2007-03-071-59/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thin packs are way smaller, but they rely on the receiving end to have the base objects. However, Git's pack protocol also uses thin packs by default. So make the packs contained in bundles thin, since bundles are just another transport. The patch looks a bit bigger than intended, mainly because --thin _implies_ that pack-objects should run its own rev-list. Therefore, this patch removes all the stuff we used to roll rev-list ourselves. This commit also changes behaviour slightly: since we now know early enough if a specified ref is _not_ contained in the pack, we can avoid putting that ref into the pack. So, we don't die() here, but warn() instead, and skip that ref. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-bundle: avoid packing objects which are in the prerequisitesJohannes Schindelin2007-03-072-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When saying something like "--since=1.day.ago" or "--max-count=5", git-bundle finds the boundary commits which are recorded as prerequisites. However, it failed to tell pack-objects _not_ to pack the objects which are in these. Fix that. And add a test for that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | bundle: fix wrong check of read_header()'s return value & add testsJohannes Schindelin2007-03-062-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If read_header() fails, it returns <0, not 0. Further, an open(/dev/null) was not checked for errors. Also, this adds two tests to make sure that the bundle file looks correct, by checking if it has the header has the expected form, and that the pack contains the right amount of objects. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | revision --boundary: fix uncounted case.Junio C Hamano2007-03-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the list is truly limited and get_revision_1() returned NULL, the code incorrectly returned it without switching to boundary emiting mode. Silly. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | revision --boundary: fix stupid typoJunio C Hamano2007-03-061-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-bundle: make verify a bit more chatty.Junio C Hamano2007-03-061-20/+35
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | revision traversal: SHOWN means shownJunio C Hamano2007-03-061-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the code to set SHOWN on the commit from get_revision_1() back to get_revision(), so that the bit means what it originally meant: this commit has been given back to the caller. Also it fixes the --reverse breakage Dscho pointed out. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-bundle: various fixupsJunio C Hamano2007-03-061-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | verify_bundle() returned with an error early only when all prerequisite commits were missing. It should error out much earlier when some are missing. When the rev-list is limited in ways other than revision range (e.g. --max-count or --max-age), create_bundle() listed all positive refs given from the command line as if they are available, but resulting pack may not have some of them. Add a logic to make sure all of them are included, and error out otherwise. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | revision traversal: retire BOUNDARY_SHOWJunio C Hamano2007-03-063-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the flag internally used by revision traversal to decide which commits are indeed boundaries and renames it to CHILD_SHOWN. builtin-bundle uses the symbol for its verification, but I think the logic it uses it is wrong. The flag is still useful but it is local to the git-bundle, so it is renamed to PREREQ_MARK. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | revision walker: Fix --boundary when limitedJunio C Hamano2007-03-062-116/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up the boundary processing in the commit walker. It - rips out the boundary logic from the commit walker. Placing "negative" commits in the revs->commits list was Ok if all we cared about "boundary" was the UNINTERESTING limiting case, but conceptually it was wrong. - makes get_revision_1() function to walk the commits and return the results as if there is no funny postprocessing flags such as --reverse, --skip nor --max-count. - makes get_revision() function the postprocessing phase: If reverse is given, wait for get_revision_1() to give everything that it would normally give, and then reverse it before consuming. If skip is given, skip that many before going further. If max is given, stop when we gave out that many. Now that we are about to return one positive commit, mark the parents of that commit to be potential boundaries before returning, iff we are doing the boundary processing. Return the commit. - After get_revision() finishes giving out all the positive commits, if we are doing the boundary processing, we look at the parents that we marked as potential boundaries earlier, see if they are really boundaries, and give them out. It loses more code than it adds, even when the new gc_boundary() function, which is purely for early optimization, is counted. Note that this patch is purely for eyeballing and discussion only. It breaks git-bundle's verify logic because the logic does not use BOUNDARY_SHOW flag for its internal computation anymore. After we correct it not to attempt to affect the boundary processing by setting the BOUNDARY_SHOW flag, we can remove BOUNDARY_SHOW from revision.h and use that bit assignment for the new CHILD_SHOWN flag. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Change {pre,post}-receive hooks to use stdinShawn O. Pearce2007-03-113-58/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sergey Vlasov, Andy Parkins and Alex Riesen all pointed out that it is possible for a single invocation of receive-pack to be given more refs than the OS might allow us to pass as command line parameters to a single hook invocation. We don't want to break these up into multiple invocations (like xargs might do) as that makes it impossible for the pre-receive hook to verify multiple related ref updates occur at the same time, and it makes it harder for post-receive to send out a single batch notification. Instead we pass the reference data on a pipe connected to the hook's stdin, supplying one ref per line to the hook. This way a single hook invocation can obtain an infinite amount of ref data, without bumping into any operating system limits. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Split back out update_hook handling in receive-packShawn O. Pearce2007-03-111-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we have decided to change the calling conventions for the pre-receive and post-receive hooks to take the ref data on stdin rather than on the command line we cannot use the same logic to invoke the update hook anymore. So we take a small step backwards towards what we used to have, and create a specialized function for executing just the update hook. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Refactor run_command error handling in receive-packShawn O. Pearce2007-03-111-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm pulling the error handling used to decode the result of run_command up into a new function so that I can reuse it. No changes, just a simple code movement. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Teach run_command how to setup a stdin pipeShawn O. Pearce2007-03-112-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes callers trying to use run_command to execute a child process will want to setup a pipe or file descriptor to redirect into the child's stdin. This idea is completely stolen from builtin-bundle's fork_with_pipe, written by Johannes Schindelin. All credit (and blame) should lie with Dscho. ;-) Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Split run_command into two halves (start/finish)Shawn O. Pearce2007-03-112-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the calling process wants to send data to stdin of a child process it will need to arrange for a pipe and get the child process running, feed data to it, then wait for the child process to finish. So we split the run function into two halves, allowing callers to first start the child then later finish it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Start defining a more sophisticated run_commandShawn O. Pearce2007-03-112-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of places where we do some variation of fork()+exec() but we also need to setup redirection in the process, much like what run_command does for us already with its option flags. It would be nice to reuse more of the run_command logic, especially as that non-fork API helps us to port to odd platforms like Win32. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Remove unused run_command variantsShawn O. Pearce2007-03-113-50/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't actually use these va_list based variants of run_command anymore. I'm removing them before I make further improvements. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Switch to run_command_v_opt in revertShawn O. Pearce2007-03-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another change by me is removing the va_list variants of run_command, one of which is used by builtin-revert.c. To avoid compile errors I'm refactoring builtin-revert to use the char** variant instead, as that variant is staying. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | cvsserver: Use Merged response instead of Update-existing for merged filesFrank Lichtenheld2007-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using Update-existing leads to the client forgetting about the "locally modified" status of the file which can lead to loss of local changes on later updates. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Acked-by: Martin Langhoff <martin.langhoff@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | I like the idea of the new ':/<oneline prefix>' notation, and gave itJim Meyering2007-03-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a try, but all I could get was a segfault. It was dereferencing a NULL commit list. Fix below. With it, this example now works: $ mkdir .j; cd .j; touch f $ git-init; git-add f; git-commit -mc f; echo x >f; git-commit -md f $ git-diff -p :/c :/d diff --git a/f b/f index e69de29..587be6b 100644 --- a/f +++ b/f @@ -0,0 +1 @@ +x Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>