| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merges with a file that lacks newlines (\n) were triggering a fatal error.
This could be easily reproduced with merge(1) and diff3(1):
$ echo foo > foo
$ echo bar > bar
$ echo -n baz > baz
$ merge -p foo bar baz
merge: failed to merge
$ diff3 -E foo bar baz
1a
=======
diff3prog: logic error
$
Fix this by properly handling short reads from the third file argument.
Only the third file argument triggered the problem. The other input
files were already handled correctly.
ok millert@
|
|
|
|
|
|
| |
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
|
|
|
|
| |
a while() loop is a trap for the unwary programmer (albeit a clever
trap). Break this up into two separate assignments and using boolean
OR for clarity. OK otto@
|
|
|
|
| |
It was already removed from the rcs version by nicm@.
|
| |
|
|
|
|
| |
ok mmcc
|
|
|
|
| |
ok deraadt@ looks correct millert@ jung@
|
|
|
|
|
|
|
|
|
| |
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
|
|
| |
reallocarray()... so rename it.
|
|
|
|
|
| |
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
|
|
|
|
| |
From Michael W Bombardieri via ray@.
|
|
|
|
|
|
| |
cvs/rcs.
OK xsa zinovik
|
|
|
|
|
|
| |
prefixes to reduce differences between cvs and rcs files.
"yes!" nicm
|
|
|
|
|
|
|
| |
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms
|
|
|
|
|
|
|
|
|
|
|
| |
1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and
spacing.
2. One strchr -> strncspn.
3. diff had a weird thing where it set file[12] = ofile[12] but
never updated file or ofile, then if file and ofile were different
it freed it. I removed it.
OK millert
|
|
|
|
|
|
|
| |
cvs diff -t now works. There should be no functional change
otherwise.
OK millert
|
| |
|
|
|
|
| |
still has some rough edges.
|
| |
|
|
|
|
|
| |
O_RDWR instead of O_WRONLY so that when we are in server mode
we do not screw up in cvs_remote_send_file().
|
|
|
|
|
|
|
|
| |
matches what gnu cvs does.
fixes the fact that we couldnt update group writable files.
problem report & diff testing by David Crawshaw.
|
| |
|
|
|
|
| |
ok tobias@
|
|
|
|
|
| |
are being merged that have no conflicts will not report the previous
conflicts that might have been found.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't check for NULL on buffer creation, because it calls fatal() when
something's wrong.
* All buffers are supposed to expand if there is no space left in them,
so zap flags as well.
* Remove code that is now dead.
OK joris@
> Inspired by a diff from Igor Zinovik about unchecked return value.
|
|
|
|
| |
Requested by ray@, OK joris@
|
|
|
|
| |
OK joris@, otto@
|
|
|
|
|
| |
Simplifies further size tweaks if needed.
OK niallo@ ray@.
|
|
|
|
|
|
|
|
|
| |
original pointer. Theo agrees, and so does the rest of the tree
(ssh, etc. all do this already).
Saves a bunch of variables and assignments.
OK niallo@
|
| |
|
| |
|
|
|
|
| |
tested by many, thanks.
|
|
|
|
|
|
|
|
|
| |
reduced memory usage. note that only checkout has been fully converted to use the new high-performance
functions. other codepaths (e.g. update) still use the old method which is provided for backwards
compatibility. we can convert the remaining slow bits over to the new api piece-by-piece.
"commit this, now" joris@
brad@ tested, too.
|
|
|
|
|
|
| |
adding/importing binary files now works too
partially taken from openrcs
|
|
|
|
|
|
|
|
| |
which broke things in real-world usage. now a checkout of src should work, albeit using lots of
memory and cpu. fixing this is the next step.
testing by many.
ok & some input joris@
|
| |
|
| |
|
|
|
|
| |
OK xsa@.
|
|
|
|
|
|
|
| |
always set the temporary file to mode 600, which is already done
by mkstemp().
OK joris@ and xsa@ over a month ago.
|
|
|
|
|
|
|
|
|
|
| |
except it takes a decriptor as argument instead of a path.
modified cvs_buf_load() to open the descriptor then pass
it to cvs_buf_load_fd().
change all the calls to cvs_buf_load() that have a descriptor
open for the path to cvs_buf_load_fd() to prevent races.
|
|
|
|
|
|
|
|
|
|
|
|
| |
this for the past 2 weeks now and it should go in at
the start of the hackathon so others can help out.
this code is a lot safer, smarter, faster and best of
all it is actually doing what it is suppose to do!
basic checkout, update, status, diff and commit are
working in local mode only.
there is no support for any remote setups now.
|
| |
|
|
|
|
|
|
| |
use xcalloc and xstrdup where appropriate, and other stuff.
OK joris@
|
|
|
|
|
|
|
| |
- Sync xmalloc.? with ssh versions.
- Change all xrealloc() calls to new API.
``I really like this.'' niallo@
|
|
|
|
|
|
|
|
|
| |
changed to division, KNF, replace unreachable code with goto fail,
et cetera. Found by lint.
The free() -> xfree() as well.
OK niallo@
|
| |
|
|
|
|
| |
commands; fixes rcsmerge -q behaviour. OK niallo@ ray@.
|
| |
|
|
|
|
| |
for the specified file. Fix some error messages while there. OK joris@
|
|
|
|
|
|
|
|
|
|
| |
fatal() instead of returning -1 on failure in patch functions
ed_patch_lines() and rcs_patch_lines(). this can avoid segfault in certain
circumstances.
From: Ray Lai <ray@cyth.net>
discussed with xsa@ and joris@
|