about summary refs log tree commit diff stats
path: root/dev/git/index.html
blob: 198db7cf032f4fee9797e2678459d3fa1641ebd7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html dir="ltr" lang="en">
    <head>
    <meta charset='utf-8'>
    <title>Git</title>
</head>
<body>

    <a href="../index.html">Development Index</a>

    <h1>Git</h1>

    <p>Git user documentation.</p>

	<ul>
            <li><a href="install.html">1. Install and configure</a></li>
	    <li><a href="work.html">2. Work.</a>
		<ul>
	            <li><a href="work.html#local">2.1. Local workflow</a>
		    <li><a href="work.html#logdiff">2.2. Logs and commits</a></li>
		    <li><a href="work.html#remote">2.3. Working with remotes</a></li>
		</ul>
	    </li>

	    <li><a href="branch.html">3. Branches</a>
		<ul>
		    <li><a href="branch.html#teamwork">3.1. Team workflow</a></li>
		    <li><a href="branch.html#feature">3.2. Feature</a></li>
		    <li><a href="branch.html#release">3.3. Release</a></li>
		    <li><a href="branch.html#tags">3.4. Tags</a></li>
		    <li><a href="branch.html#hotfix">3.5. Hotfix</a></li>
		</ul>
	    </li>
	</ul>

        <p>Link to examples of following git commands.</p>

        <ul>
            <li><a href="work.html#init">init</a></li>
            <li><a href="work.html#status">status</a></li>
            <li><a href="../tools/vim.html#vimdiff">vimdiff</a></li>
            <li><a href="work.html#add">add</a></li>
            <li><a href="work.html#commit">commit</a></li>
            <li><a href="work.html#log">log</a></li>
            <li><a href="work.html#ls-files">ls-files</a></li>
            <li><a href="work.html#rev-list">rev-list</a></li>
            <li><a href="work.html#checkout">checkout</a></li>
            <li><a href="work.html#reset">reset</a></li>
            <li><a href="work.html#format-patch">format-patch</a></li>
            <li><a href="work.html#remote">remote</a></li>
            <li><a href="work.html#fetch">fetch</a></li>
            <li><a href="work.html#fetch">pull</a></li>
            <li><a href="branch.html#rebase">rebase</a></li>
	    <li><a href="branch.html#push">push</a></li>
	    <li><a href="branch.html#merge">merge</a></li>
	    <li><a href="branch.html#tag">tag</a></li>
            <li><a href="branch.html#cherry-pick">cherry-pick</a></li>
        </ul>

    <a href="../index.html">Development Index</a>

    <p>This is part of the Tribu System Documentation.
    Copyright (C) 2020
    Tribu Team.
    See the file <a href="../../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
    for copying conditions.</p>
</body>
</html>
ass="p">, fileIdx) result.name = getIdent(graph.cache, splitFile(filename).name) if not isNimIdentifier(result.name.s): rawMessage(graph.config, errGenerated, "invalid module name: " & result.name.s) result.info = newLineInfo(fileIdx, 1, 1) partialInitModule(result, graph, fileIdx, filename) proc compileModule*(graph: ModuleGraph; fileIdx: FileIndex; flags: TSymFlags): PSym = result = graph.getModule(fileIdx) if result == nil: let filename = toFullPath(graph.config, fileIdx) let (r, id) = loadModuleSym(graph, fileIdx, AbsoluteFile filename) result = r if result == nil: result = newModule(graph, fileIdx) result.flags = result.flags + flags if sfMainModule in result.flags: graph.config.mainPackageId = result.owner.id result.id = id registerModule(graph, result) else: partialInitModule(result, graph, fileIdx, filename) result.id = id assert result.id < 0 discard processModule(graph, result, if sfMainModule in flags and graph.config.projectIsStdin: stdin.llStreamOpen else: nil) elif graph.isDirty(result): result.flags.excl sfDirty # reset module fields: initStrTable(result.tab) result.ast = nil discard processModule(graph, result, if sfMainModule in flags and graph.config.projectIsStdin: stdin.llStreamOpen else: nil) graph.markClientsDirty(fileIdx) proc importModule*(graph: ModuleGraph; s: PSym, fileIdx: FileIndex): PSym {.procvar.} = # this is called by the semantic checking phase assert graph.config != nil result = compileModule(graph, fileIdx, {}) graph.addDep(s, fileIdx) #if sfSystemModule in result.flags: # localError(result.info, errAttemptToRedefine, result.name.s) # restore the notes for outer module: graph.config.notes = if s.owner.id == graph.config.mainPackageId: graph.config.mainPackageNotes else: graph.config.foreignPackageNotes proc includeModule*(graph: ModuleGraph; s: PSym, fileIdx: FileIndex): PNode {.procvar.} = result = syntaxes.parseFile(fileIdx, graph.cache, graph.config) graph.addDep(s, fileIdx) graph.addIncludeDep(s.position.FileIndex, fileIdx) proc connectCallbacks*(graph: ModuleGraph) = graph.includeFileCallback = includeModule graph.importModuleCallback = importModule proc compileSystemModule*(graph: ModuleGraph) = if graph.systemModule == nil: connectCallbacks(graph) graph.config.m.systemFileIdx = fileInfoIdx(graph.config, graph.config.libpath / RelativeFile"system.nim") discard graph.compileModule(graph.config.m.systemFileIdx, {sfSystemModule}) proc wantMainModule*(conf: ConfigRef) = if conf.projectFull.isEmpty: fatal(conf, newLineInfo(conf, AbsoluteFile"command line", 1, 1), errGenerated, "command expects a filename") conf.projectMainIdx = fileInfoIdx(conf, addFileExt(conf.projectFull, NimExt)) proc compileProject*(graph: ModuleGraph; projectFileIdx = InvalidFileIDX) = connectCallbacks(graph) let conf = graph.config wantMainModule(conf) let systemFileIdx = fileInfoIdx(conf, conf.libpath / RelativeFile"system.nim") let projectFile = if projectFileIdx == InvalidFileIDX: conf.projectMainIdx else: projectFileIdx graph.importStack.add projectFile if projectFile == systemFileIdx: discard graph.compileModule(projectFile, {sfMainModule, sfSystemModule}) else: graph.compileSystemModule() discard graph.compileModule(projectFile, {sfMainModule}) proc makeModule*(graph: ModuleGraph; filename: AbsoluteFile): PSym = result = graph.newModule(fileInfoIdx(graph.config, filename)) result.id = getID() registerModule(graph, result) proc makeModule*(graph: ModuleGraph; filename: string): PSym = result = makeModule(graph, AbsoluteFile filename) proc makeStdinModule*(graph: ModuleGraph): PSym = graph.makeModule(AbsoluteFile"stdin")