Commits
- Commit:
18877383a0d783b0b642a27b16ccd3d1a212c8a3
- From:
- James Cook <falsifian@falsifian.org>
- Date:
fix option processing for 'got merge'
Don't make -C imply -c (a break statement was missing). Detect -an and
-cn conflicts. Simplify by removing unneeded check for conflicting -aC
(since -C requires -c, we can rely on the -ac conflict being detected).
Update the man page to say -cC is allowed.
- Commit:
481cdc746b012203f39047cbc55f8b65ae40d046
- From:
- James Cook <falsifian@falsifian.org>
- Date:
add -M option: tell got merge not to fast-forward
ok stsp@
- Commit:
f25e229e88a01c4a65fa80f4d5e35cd34309cbf9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
reword user-facing error message which mentions "fast-forward"
For user-facing messages it is better to avoid technical jargon like
this and instead spell out what the fast-forward situation implies: that
one branch is already based on another.
ok jamsek
- Commit:
1334230721068ac62f5ea69c359962cdedb4df60
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
prevent 'got merge' from creating commits on branches outside of "refs/heads/"
ok op, james
- Commit:
179f9db092046395efaa1dc9e767a1ec109e1174
- From:
- James Cook <falsifian@falsifian.org>
- Date:
Implement fast-forward merges.
Split part of got_worktree_merge_prepare into a new function,
got_worktree_merge_write_refs, since that part doesn't make sense in the
fast-forward case.
ok stsp@
- Commit:
9628f36dac5ed5319b482a020f06ff9737a0c1f0
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got tree /' succeed in a work tree
Previously, this command would trigger an error: got: /: bad path
- Commit:
4448825ab554378228429f5ac53c9cf943cc2503
- From:
- Omar Polo <op@omarpolo.com>
- Date:
dropping unnecessary strlen()s
ok jamsek, stsp
- Commit:
39c864a48b9d156c8b748725f5f89b3bd3f65038
- From:
- Omar Polo <op@omarpolo.com>
- Date:
avoid strlen in for(;;)
ok jamsek, stsp
- Commit:
563ffc1b6d823b71bab79a0a75c67524f3d0f447
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got, tog: correctly skip HEAD in build_refs_str()
s[strlen(s)] == '\0' is banally always true, the intent was to not skip
refs that starts with "HEAD".
style nit / ok stsp@
- Commit:
c6119c6d1145977d2ae8fb6754a9c369731d8dec
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got status' error out as intended when invoked in a repository
- Commit:
6b5246e4d4f6c6cbd079a43d14042d998fbc902f
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got merge -c' fail even if new changes only affect unrelated paths
Otherwise, 'got merge -c' can silently revert already committed changes.
Also fix GOT_ERR_MERGE_COMMIT_OUT_OF_DATE by giving it a value distinct
from GOT_ERR_MERGE_STAGED_PATHS.
Patch by James Cook
- Commit:
427615296bc79cda685540d7fc241444b7447980
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
make "got merge" refuse to run if a merge is in progress and the -a or
-c option wasn't passed.
Patch by James Cook.
- Commit:
ad575c3a0f6a3c278002356c0a2cf0142cf1177a
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
simplify ancestry checks in checkout, update, rebase, and merge
No behaviour change as the end result of the rewritten checks should
be the same as before. We are just doing less work where possible.
Patch by James Cook
- Commit:
bfcdc9e9816dc81c90ce2db28ad9b602ec06b95a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got patch' display statistics about files with conflicts and rejects
ok op@
- Commit:
8cdd231889a848b735f84ed6772eab46c2512db9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got: flush stdout before printing the error in main()
Since standard error is unbuffered, it could happen that the error
string is printed immediately while the output from the subcommand
is stuck in a buffer and written later. So flush() standard output
before printing the error message.
Problem reported by naddy@, ok stsp@
- Commit:
7755e2f80723b22eb4fcc203ffd75608db7055c7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
consistently close the struct repository on every cmd_*()
Spotted while looking for leaks using Otto' malloc() new leaks
detection. Harmless in practice since we just forgot to call
got_repo_close() when terminating in some cmd_*() functions, but
still a leak.
ok stsp@
- Commit:
2734319d6bf828cb8fdc44a9030605f7bb4c32d1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix crash in got log due to NULL-deref in got_object_blob_close
Reported by Mikhail (thanks!), ok jamsek
- Commit:
66993e5902f3e39980a0dada0946e146008a35c5
- From:
- Todd C. Miller <Todd.Miller@sudo.ws>
- Date:
Close the message template file before calling edit_logmsg().
Fixes a race condition on NFS where the file's modify time may
change while the file is being edited, causing the editor to complain.
OK stsp
- Commit:
e96d39bf87c8025d794e9c5c5bfcbbca58c216ac
- From:
- Omar Polo <op@omarpolo.com>
- Date:
histedit_parse_list: avoid needless free(line)
getline(3) allows to safely re-use the storage.
While here rename `size' to `linesize', `len' to `linelen', and properly
initialize `linesize' to zero; suggested by tb@
ok tb@
- Commit:
5a53ca9d31c0ec26e10887fb404d63242df55002
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fall back to vi(1) instead of ed(1) if neither EDITOR nor VISUAL are set
ed users are reading files with their minds rather then their eyes, and
might therefore be missing important visual clues we write into files
before the user gets to edit them. Use of vi(1) ensures that such clues
will not be missed.
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done
mechanically with
find . -iname \*.[cy] -exec sam {} +
X ,x/<sha1\.h>/i/\n#include <sha2.h>
- Commit:
d51d11be9ba86c2c5cf8d36994e56eeccb905865
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix 'got merge' so it parses gitconfig for author
cmd_merge is the only subcommand that may create commits that doesn't
parse the git config files, thusly failing for users without GOT_AUTHOR
defined.
Problem reported by James Cook who also provided an initial test case,
thanks!
ok jamsek
- Commit:
123836732402b1204e5be68f98a69084285c316d
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
add ci/he/mg/rb -C option to commit unresolved conflicts
As per stsp's suggestion and building on his initial diff, add the -C option
to enable creating commits with unresolved conflicts to the commit, histedit,
merge, and rebase commands to allow continuing the operation despite files in
conflict status. Also, only search for conflict markers in newly added lines
to enable working with files already under version control that may have
conflict markers embedded verbatim.
lots of tweaks, improvements, and initial diff + ok stsp@
- Commit:
118a625d39930284f891ea1285efc17fb3848cae
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
got: further fetch tweaks to prevent unintended fetches
Implement stsp's suggestion to only fetch remote's HEAD if the symref
refs/remote/*/HEAD exists, and its target no longer matches the remote
HEAD. This ensures users tracking a project won't miss a change in HEAD,
while also fixing the issue reported by naddy where HEAD was fetched by
default even though a specific, potentially less active, branch is cloned,
resulting in a repository with more commits than necessary.
In addition, unless 'got fetch -b <branch>' is used, the remote HEAD branch
will be fetched if branches are not set in got.conf and there is no work
tree to ascertain a branch, or said branches are not found on the server.
ok stsp@
- Commit:
0e0165f13a58bad062d9761626c1b3ba82df671c
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Mark Jamsek <mark@jamsek.dev>
- Date:
add -n to 'got commit' usage; patch by Josiah Frentsos