Commits
- Commit:
e0380e3dfa71712eaaf9642b4d86b53e6a986653
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
special case 'got fetch -b <branch>' to only fetch <branch>
As discussed on irc, this drops the implicit remote HEAD fetch when -b is used.
got.1 has been updated to make the new fetch behaviour clear.
ok stsp@
- Commit:
088f4d22ce3dcd3090bd440308e0b8b4fc8529aa
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make new log message modication check more robust; fixes regress fallout
ok jamsek
- Commit:
64a300dd8d0fd181638cad5dfdeba7582cb92093
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
garbage-collect redundant read_logmsg() parameter
As identified and suggested by stsp, with the previous commit,
'strip_comments' is now always set thus no longer needed.
ok stsp@
- Commit:
83389425cc9afb887c5428f2db3299a1b049d71e
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: use timestamp and emptiness to validate log message
As suggested by naddy: consider commit log messages valid provided the temp
file time stamp has changed and the file is not empty. This heuristic
provides the desired behaviour (i.e., reusing cherrypicked/backed-out log
messages) that's currently provided but is simpler to grok.
Improved by and ok stsp@
- Commit:
75a8c854e063f97e5a2605f5256a1ce15ffb2f24
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make edits made to comments count as a log message modification
This supports use of cherrypick/backout without requiring the user
to modify the log message of the original commit.
ok jamsek, op
- Commit:
4c63d3a5b747a6acb4786af9c9e24d422feff00b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
only fetch the work tree's branch by default if it is inside "refs/heads/"
ok jamsek
- Commit:
9d0a7ee35139cbfd755c1647d0feeaa665e1a2a2
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix interaction of 'got fetch -b', got.conf, and work tree
Without branches in got.conf for a remote, and without -b/-R options,
the fallback to HEAD would only work when not invoked in a work tree.
With this fix 'got fetch' should behave as described in the man page.
The -b option now overrides both got.conf and the fallback to the work
tree's branch.
And fallback to HEAD works as expected when invoked in a repository.
Also, do not strictly require remote repositories to provide a branch
from the refs/heads/ namespace. In such cases users should be able to
use -R to select something to fetch.
ok jamsek
- Commit:
8d0dceb3d76a815a8fbae32091159f8db5672d86
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
improve 'got fetch' behaviour when work tree's branch is not on server
Only fetch the work tree's branch if the -b option is not specified.
This keeps -b functional as an override when invoked in a work tree.
Our previous changes did not consider that got.conf is also a source
of lists of branches to fetch, and that -b is supposed to work as an
override of any default behaviour. We were implicitly appending the
work tree's branch as if it was mentioned as an override on the
command line, which was wrong and based on a misunderstanding of
the intended behaviour.
Without -b on the command line we obtain a list of branches to fetch
from got.conf and use this list if it is not empty. The repository's
HEAD will be fetched only if neither the -b option, nor got.conf, nor
a work tree tell us what to fetch.
Make the man page more clear by moving the explanation of the default
behaviour into the main section of 'got fetch', leaving the -a and -b
option descriptions free of such details.
ok jamsek
- Commit:
a66a4a5063151449b830f5510f00717296fa3c3d
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix mistaken instances returning NULL instead of err
While here, for consistency, check dup() return value for -1 rather than < 0.
ok stsp@
- Commit:
38c5cf99cb18843b733401b41376c563a266641f
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: make fetch default to the work tree's current branch
As per stsp's todo item, if invoked in a work tree, make 'got fetch' default
to fetching the work tree's current branch instead of the branch pointed to
by the remote repository's HEAD.
ok stsp@ and op@
- Commit:
f08f28be8b51ef7b0fba91edf90b81330031fc35
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
zap unused parameter in got_worktree_rebase_complete()
ok stsp@
- Commit:
df07831c37c0df70446d6ff85691ae2f6b242320
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
return err instead of NULL in got.c:print_backup_ref()
ok stsp@
- Commit:
21ad6d7927cc0435b3e896ca401870f855b9f2b8
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
free cwd in cmd_backout() and cmd_cherrypick()
ok stsp@
- Commit:
0b36e980db09c545b0b35d08521d1fd6bb3f2218
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make 'got rebase' work when the to-be-rebased branch has no parent commit
found by and ok op@, who also provided the test case
- Commit:
f35e52a986659efbb797f46df9798c4ad4f36381
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
show worktree UUID in backout/cherrypick -l output
When run from the repository, display the UUID to help the user know which
logmsg refs belong to which work tree. Also, use "backout" or "cherrypick"
in the log message header to distinguish output from 'got log'.
Suggested by stsp on irc.
ok stsp@
- Commit:
54fdcaee61b11a4ba039fce945d3a7e59ef477fc
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add missed option conflict check for histedit -e and -f
Reviewed as part of previous commit adding histedit -d.
ok stsp@
- Commit:
070c80a59d5048ca05990df52d7993f3015c2ee4
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: add 'got histedit -d' flag to drop all commits
Like -f, except drop all commits. Discussed with op and stsp on irc.
ok stsp@
- Commit:
6f12304beddfa5b5c90fe733397f63a3e7432d75
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: don't leave tmp "got-logmsg-*" files in the work tree
Reported by stsp on irc, and reviewed as part of the following regress
commit covering the commit aspect of logmsg refs. Delete temp merge_log
files if created during commits involving backed-out/cherrypicked changes.
ok stsp@
- Commit:
c7d9bedcc682ecd8d2276eec2a87a2fd4072388e
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
abort commit with merged log messages if the log message is left unmodified
ok op@
- Commit:
beb452e226a6110ef7ace94ab1c804f8e5287e04
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
avoid creation of temporary file if no merged log messages will be used
- Commit:
8279ab8c66b2cff381b52f3b30118c624c93088f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
rename a variable for clarity
- Commit:
46f87436943043a275185ab51e86b849d9f27229
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
uppercase cherrypick/backout -X progress output
ok jamsek
- Commit:
eb5dc07888e8e878e5ef3fa2cf3ee77c4e902d13
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
improve heuristics for prepopulated log messages
Small tweak to cover the case where users specify paths to be committed such
that none of the paths modified by a backout or cherrypick operation are in
the commit. In this case, the logmsg ref will remain in refs/got/worktree to
be used when the user does run a commit involving the affected paths.
ok stsp@
- Commit:
bb723b7a6cfcf6937e16863096b630f9d5b324b1
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix invalid assumption in commit_path_changed_in_worktree()
Make sure we have a parent id first to avoid dereferencing a NULL pointer
with the got_object_open_as_commit() call.
ok op@ and stsp@
- Commit:
f6cd0243250112471da1212a1549007367cc32a7
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: load editor with backout/cherrypick commit log messages
Create new logmsg references used to populate the editor with the log messages
of backed-out and cherrypicked commits when 'got commit' is run. We use
versioned path state heuristics during revert and commit commands in an effort
to ensure the editor is only populated with the log messages of backed-out
and/or cherrypicked commits involving paths with local changes that are being
committed. This is an implementation of an initial idea and algorithm designed
by stsp.
inputs, improvments and ok stsp@